Skip to content

Commit

Permalink
Stardust ledger (#977)
Browse files Browse the repository at this point in the history
* Changed variants of `ConflictReason`

* Stardust ledger start

* Fix compilation

* Use wildcards for invalid input/output types

* Add alias_chain_constraint

* Add unlock_foundry_output

* Add unlock_address

* HashMap -> Vec

* Complete unlock_address

* check_input_unlock_conditions

* Fix timelock unlock condition

* check_output_feature_blocks

* Remove unlock block code duplication

* Explicit/Implicit AliasId/NftId

* Add Foundry to ChainId

* Fix compilation

* Add note to check inputs commitment

* Fix compilation

* Fix compilation

* Improve unlock_alias_output

* Fix compilation

* Some ValidationContext changes

* Fmt

* Output::chain_id

* Set up output_chains

* Set up input_chains

* Set up state transitions

* Move ValidationContext to bee-message

* Pass context to state transition

* Faillible state transitions

* Alias transition example

* ChainId::or_from_output_id

* More state transition

* Created foundries count consistency

* Pubify associated consts

* Nit

* Finish Foundry transition

* TIP

* Use ed25 PUBLIC_KEY_LENGTH constant

* Return correct error variant

* Nits

* Move ConflictReason to semantic module of bee-message

* Some Foundry nits

* Rework inputs validation

* Actually implement Id::is_null

* TIP

* Add Foundry::token_id method

* Rename to treasury_transaction

* ReceiptPayload::treasury_transaction return actual type

* TreasuryTransaction returns actual input/output types

* Fmt

* Replace N2 loop with hashset

* Inputs commitment check

* Move signature validation from address module to signature module

* Add issuer check

* Return error instead of panic

* Add sender check

* Add timelock check

* Clean MilestoneEssence

* Check state_transition return

* Fix tests

* Setup locked addresses

* Fix compilation

* Fix Signature/Reference unlock

* Actually unlock Alias/NFT

* Add unlocked Alias/NFT to to the unlocked addresses

* Check created alias state index and foundry counter

* Move unlocks to bee-message

* Fix clippy

* Fix docs

* AliasId/NftId::or_from_output_id

* Fmt

Co-Authored-By: Thoralf-M <[email protected]>

* TIP

Co-Authored-By: Thoralf-M <[email protected]>

* Add StorageDepositReturnMismatch check

Co-Authored-By: Thoralf-M <[email protected]>

* Address comments

* Fix clippy

* Remove dead code

* pub OutputAmount

* Fix storage deposit return

* Nits

* Address some comments

* Fmt

* Address more comments

* StateTransitionVerifier rename

Co-authored-by: Thoralf-M <[email protected]>
  • Loading branch information
thibault-martinez and Thoralf-M committed Mar 24, 2022
1 parent d307ed3 commit d1a6b27
Show file tree
Hide file tree
Showing 51 changed files with 1,312 additions and 706 deletions.
88 changes: 48 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use crate::{
types::{dtos::LedgerInclusionStateDto, responses::MessageMetadataResponse},
};

use bee_message::{payload::Payload, MessageId};
use bee_message::{payload::Payload, semantic::ConflictReason, MessageId};
use bee_runtime::resource::ResourceHandle;
use bee_tangle::{ConflictReason, Tangle};
use bee_tangle::Tangle;

use warp::{filters::BoxedFilter, reject, Filter, Rejection, Reply};

Expand Down
Loading

0 comments on commit d1a6b27

Please sign in to comment.