-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGES: - `Predicate::from_code` and `Predicate::load_from` use default `ConsensusParameters` for instantiation of the predicate address. To use non-default `ConsensusParameters`, the user should use `Predicate::from_code(...).with_provider()`, that will use the provider's `ConsensusParameters`. - `Provider::new` now takes a `ConsensusParameters` argument, so we can avoid changing the API of downstream clients. - `setup_test_client` now returns `ConsensusParameters` of the client. It is less used than `setup_test_provider` so it's its API that was changed. - `produce_block` API now takes in a `start_time` as an `Option<DateTime<Utc>>` (no need for the `TimeParameters` struct) - To produce blocks, the user now needs to set `block_production` to `Trigger::Interval` (see docs) in `ChainConfig` Internal changes: - The signing of the transaction and predicate id generation requires `ChainId`(`ConsensusParameters`). - Now tokens should be transferred to the contract first, and after you can transfer them via `SMO` or another transfer. So in some tests first we need to transfer money to the contract first. - Replaced all unsafe code from `fuel-crypto` with safe analog. - On the `fuel-tx`/`fuel-core` side now, there is a difference in whether the message contains data. If data is empty, it is `MessageCoin` that acts like a `Coin`(has the same rules during execution). If the data field is not empty, then it is a retryable message(or `MessageData`). Messages like this can't be used to pay a transaction fee, and if the execution fails, the message is not consumed(you can use it again in the next transactions). More about them you can read in FuelLabs/fuel-core#946. Also, the API changed for resources and not it is `Coins` again. Because of that, some tests now require messages with empty data to be able to spend them. - Removed redundant usage of `MessageId`. Now the identifier of the message is a `Nonce`. - Removed `Output::Message`. Now you don't need to specify it in the outputs. Because of that `SMO` opcode doesn't require a message output index anymore. - The proof API is updated with a new design: FuelLabs/fuel-core#1046. If you want to prove the block at height `X` you need at least a committed `X + 1` block. Because some of opcodes were updated the examples require a new `sway`. The corresponding PR: FuelLabs/sway#4525. It creates a cycle of dependencies with this PR. Closes #829 #933 --------- Co-authored-by: iqdecay <[email protected]> Co-authored-by: Brandon Kite <[email protected]> Co-authored-by: Ahmed Sagdati <[email protected]> Co-authored-by: Halil Beglerović <[email protected]> Co-authored-by: hal3e <[email protected]>
- Loading branch information
1 parent
e2ca004
commit bd258b2
Showing
125 changed files
with
663 additions
and
671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.