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

Use state transition bytecode from the database #1816

Merged
merged 30 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
310a6dc
Fetch consensus parameters from the provider
xgreenx Apr 6, 2024
d8ee459
Self review
xgreenx Apr 6, 2024
48d373b
Merge branch 'master' into feature/use-conensus-params-provider
xgreenx Apr 6, 2024
14ca7c8
Fetch `ConsensusParameters` from the database
xgreenx Apr 6, 2024
28a3045
Updated CHANGELOG.md
xgreenx Apr 6, 2024
bc19087
Merge branch 'feature/use-conensus-params-provider' into feature/feat…
xgreenx Apr 6, 2024
4e3cf61
Removed redundant `Arc`
xgreenx Apr 6, 2024
08de09d
Merge remote-tracking branch 'origin/feature/featch-consensus-paramet…
xgreenx Apr 6, 2024
b4fba35
Merge branch 'master' into feature/use-conensus-params-provider
xgreenx Apr 9, 2024
e4a9a62
Merge branch 'feature/use-conensus-params-provider' into feature/feat…
xgreenx Apr 9, 2024
9ede6dd
Merge branch 'master' into feature/use-conensus-params-provider
xgreenx Apr 9, 2024
38ea324
Merge branch 'feature/use-conensus-params-provider' into feature/feat…
xgreenx Apr 9, 2024
dd15952
Merge branch 'master' into feature/use-conensus-params-provider
xgreenx Apr 9, 2024
e1bf37e
Merge branch 'feature/use-conensus-params-provider' into feature/feat…
xgreenx Apr 9, 2024
1d5dbd8
Use state transition bytecode from the database
xgreenx Apr 10, 2024
d4164e4
Updated CHANGELOG.md
xgreenx Apr 10, 2024
e12cca6
Fixed a comment
xgreenx Apr 10, 2024
316de9a
Merge branch 'feature/featch-consensus-parameters-from-database' into…
xgreenx Apr 10, 2024
eaffb17
Increased timeout for the CI. 40 seconds not even closer to real comp…
xgreenx Apr 10, 2024
f7cb1dd
Merge remote-tracking branch 'origin/feature/use-bytecode-from-databa…
xgreenx Apr 10, 2024
28152b3
Merge branch 'master' into feature/featch-consensus-parameters-from-d…
xgreenx Apr 10, 2024
6ec1a6b
Added tests for the service
xgreenx Apr 10, 2024
9e20a2c
Merge branch 'feature/featch-consensus-parameters-from-database' into…
xgreenx Apr 10, 2024
3f06311
Applied comment from PR.
xgreenx Apr 10, 2024
41ca96d
Merge remote-tracking branch 'origin/feature/use-bytecode-from-databa…
xgreenx Apr 10, 2024
874b119
Increase the memory for the docker
xgreenx Apr 10, 2024
3217787
Increase memory to 48g, if it is possible=D
xgreenx Apr 10, 2024
a6df714
Use 64 GB builder
xgreenx Apr 11, 2024
003cba2
Merge branch 'master' into feature/use-bytecode-from-database
xgreenx Apr 11, 2024
b14be52
Merge branch 'master' into feature/use-bytecode-from-database
xgreenx Apr 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
RUSTFLAGS: -D warnings
REGISTRY: ghcr.io
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
FUEL_ALWAYS_USE_WASM: true

jobs:
check-changelog:
Expand Down Expand Up @@ -317,7 +318,7 @@ jobs:
publish-docker-image-profiling:
needs:
- verifications-complete
runs-on: buildjet-4vcpu-ubuntu-2204
runs-on: buildjet-16vcpu-ubuntu-2204
permissions:
contents: read
packages: write
Expand Down
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

Description of the upcoming release here.

### Fixed

- [#1814](https://github.com/FuelLabs/fuel-core/pull/1814): Bugfix: the `iter_all_by_prefix` was not working for all tables. The change adds a `Rust` level filtering.
=======

### Added

- [#1813](https://github.com/FuelLabs/fuel-core/pull/1813): Added back support for `/health` endpoint.
- [#1799](https://github.com/FuelLabs/fuel-core/pull/1799): Snapshot creation is now concurrent.

### Changed

- [#1816](https://github.com/FuelLabs/fuel-core/pull/1816): Updated the upgradable executor to fetch the state transition bytecode from the database when the version doesn't match a native one. This change enables the WASM executor in the "production" build and requires a `wasm32-unknown-unknown` target.
- [#1812](https://github.com/FuelLabs/fuel-core/pull/1812): Follow-up PR to simplify the logic around parallel snapshot creation.

### Changed
- [#1808](https://github.com/FuelLabs/fuel-core/pull/1808): Fetch consensus parameters from the database.
- [#1809](https://github.com/FuelLabs/fuel-core/pull/1809): Fetch `ConsensusParameters` from the database
- [#1808](https://github.com/FuelLabs/fuel-core/pull/1808): Fetch consensus parameters from the provider.

## [Version 0.24.2]

Expand Down
36 changes: 36 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bin/fuel-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ clap = { workspace = true, features = ["derive", "env", "string"] }
const_format = { version = "0.2", optional = true }
dirs = "4.0"
dotenvy = { version = "0.15", optional = true }
fuel-core = { workspace = true }
fuel-core = { workspace = true, features = ["wasm-executor"] }
fuel-core-chain-config = { workspace = true }
fuel-core-types = { workspace = true }
hex = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ cargo clippy -p fuel-core-wasm-executor --target wasm32-unknown-unknown --no-def
cargo clippy --all-targets --all-features &&
cargo doc --all-features --workspace --no-deps &&
cargo make check --locked &&
cargo make check --all-features --locked &&
FUEL_ALWAYS_USE_WASM=true cargo make check --all-features --locked &&
cargo check -p fuel-core-types --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-client --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-chain-config --target wasm32-unknown-unknown --no-default-features &&
cargo check -p fuel-core-executor --target wasm32-unknown-unknown --no-default-features &&
cargo test --workspace &&
cargo test --all-features --workspace &&
FUEL_ALWAYS_USE_WASM=true cargo test --all-features --workspace &&
cargo test -p fuel-core --no-default-features &&
cargo test -p fuel-core-client --no-default-features &&
cargo test -p fuel-core-chain-config --no-default-features &&
Expand Down
2 changes: 1 addition & 1 deletion crates/fuel-core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ mod tests {

// current services: graphql, graphql worker, txpool, PoA
#[allow(unused_mut)]
let mut expected_services = 4;
let mut expected_services = 5;

// Relayer service is disabled with `Config::local_node`.
// #[cfg(feature = "relayer")]
Expand Down
10 changes: 4 additions & 6 deletions crates/fuel-core/src/service/adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use fuel_core_services::stream::BoxStream;
#[cfg(feature = "p2p")]
use fuel_core_types::services::p2p::peer_reputation::AppScore;
use fuel_core_types::{
fuel_tx::ConsensusParameters,
fuel_types::BlockHeight,
services::block_importer::SharedImportResult,
};
Expand All @@ -25,6 +24,7 @@ use std::sync::Arc;

pub mod block_importer;
pub mod consensus_module;
pub mod consensus_parameters_provider;
pub mod executor;
pub mod graphql_api;
#[cfg(feature = "p2p")]
Expand All @@ -38,14 +38,12 @@ pub mod txpool;

#[derive(Debug, Clone)]
pub struct ConsensusParametersProvider {
consensus_parameters: Arc<ConsensusParameters>,
shared_state: consensus_parameters_provider::SharedState,
}

impl ConsensusParametersProvider {
pub fn new(consensus_parameters: ConsensusParameters) -> Self {
Self {
consensus_parameters: Arc::new(consensus_parameters),
}
pub fn new(shared_state: consensus_parameters_provider::SharedState) -> Self {
Self { shared_state }
}
}

Expand Down