Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: upgrade fuel-core to 24.2 #1319

Merged
merged 38 commits into from Apr 10, 2024
Merged

Conversation

MujkicA
Copy link
Contributor

@MujkicA MujkicA commented Mar 31, 2024

  • With the state configuration now separate in StateConfig instead of being part of ChainConfig, I had to make some breaking changes. We agreed to keep these changes minimal until we revisit things for V1, so I went with breaking FuelService::new to keep setup_test_provider stable.

BREAKING CHANGE

  • Renamed Config to NodeConfig
  • NodeConfig no longer holds ChainConfig`
  • fuel-core now separates the initial state config from ChainConfig in StateConfig
  • as a consequence of the above changes, FuelService::start() now accepts NodeConfig, ChainConfig and StateConfig as arguments to startup a node.
  • fuel-core has switched to ConsensusParameters being an enum to support versioning, when instantiating it, we need to make use of setters if we want to avoid committing to a specific version:
let mut consensus_parameters = ConsensusParameters::default();
consensus_parameters.set_tx_params(tx_params);
consensus_parameters.set_fee_params(fee_params);

Fields need to be accessed via methods:

self.consensus_parameters.chain_id
// becomes
self.consensus_parameters.chain_id()
  • The same applies to other parameter structs used when setting up the node, like TxParameters, ContractParameters, PredicateParameters etc.

  • The witness_index parameters in CreateTransactionBuilder::with_bytecode_witness_index is now a u16

  • NodeInfo no longer has min_gas_price

  • CreateTransaction no longer hasbytecode_length()

  • Header no longer has message_receipt_root but gains:

pub message_outbox_root: Bytes32,
pub event_inbox_root: Bytes32,
pub consensus_parameters_version: u32,
pub state_transition_bytecode_version: u32

Checklist

  • I have linked to any relevant issues.
  • I have updated the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary labels.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@MujkicA MujkicA self-assigned this Apr 4, 2024
@MujkicA MujkicA added the enhancement New feature or request label Apr 4, 2024
@MujkicA MujkicA marked this pull request as ready for review April 4, 2024 14:11
Cargo.toml Outdated Show resolved Hide resolved
packages/fuels-test-helpers/Cargo.toml Outdated Show resolved Hide resolved
packages/fuels-test-helpers/src/node_types.rs Show resolved Hide resolved
packages/fuels/Cargo.toml Outdated Show resolved Hide resolved
packages/fuels/tests/contracts.rs Outdated Show resolved Hide resolved
packages/fuels/tests/providers.rs Outdated Show resolved Hide resolved
@MujkicA
Copy link
Contributor Author

MujkicA commented Apr 5, 2024

Our rocksdb test is failing due to a bug on the core side. Disabling it for now

Tracked here: #1324

Copy link
Contributor

@hal3e hal3e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Left some comments.

@MujkicA MujkicA changed the title feat!: upgrade fuel-core to 24.1 feat!: upgrade fuel-core to 24.2 Apr 5, 2024
@digorithm
Copy link
Member

CI isn't passing :(

@MujkicA MujkicA requested a review from hal3e April 9, 2024 00:23
packages/fuels-test-helpers/Cargo.toml Outdated Show resolved Hide resolved
packages/fuels-test-helpers/Cargo.toml Outdated Show resolved Hide resolved
packages/fuels/tests/contracts.rs Outdated Show resolved Hide resolved
MujkicA and others added 4 commits April 10, 2024 06:00
Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com>
Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com>
…s/fuels-rs into feature/upgrade-fuel-core-0.24.1
@MujkicA MujkicA merged commit 1857c23 into master Apr 10, 2024
42 checks passed
@MujkicA MujkicA deleted the feature/upgrade-fuel-core-0.24.1 branch April 10, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants