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 fuel-vm 0.49.0 with new transactions types #1822

Merged
merged 44 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 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
2071f84
Use `fuel-vm 0.49.0` with new transactions types
xgreenx Apr 11, 2024
4d487e1
Fixed tests
xgreenx Apr 11, 2024
c44661d
Forgot to commit schema
xgreenx Apr 11, 2024
1d3e1e2
Forgot to commit schema
xgreenx Apr 11, 2024
5f0d9bb
Added several e2e to test upgrades
xgreenx Apr 11, 2024
003cba2
Merge branch 'master' into feature/use-bytecode-from-database
xgreenx Apr 11, 2024
41ad02d
Merge branch 'feature/use-bytecode-from-database' into feature/fuel-v…
xgreenx Apr 11, 2024
71464bf
Applied comments from the PR
xgreenx Apr 11, 2024
106284b
Merge remote-tracking branch 'origin/feature/fuel-vm-0.49.0' into fea…
xgreenx Apr 11, 2024
b14be52
Merge branch 'master' into feature/use-bytecode-from-database
xgreenx Apr 13, 2024
ad4cd1c
Merge branch 'feature/use-bytecode-from-database' into feature/fuel-v…
xgreenx Apr 13, 2024
7c2d65a
Merge with `master`
xgreenx Apr 13, 2024
759798f
Merge branch 'master' into feature/fuel-vm-0.49.0
xgreenx Apr 15, 2024
9491663
Merge branch 'master' into feature/fuel-vm-0.49.0
xgreenx Apr 15, 2024
c52c0e7
Use `master` branch
xgreenx Apr 15, 2024
c7a7923
Use `fuel-vm 0.49.0`
xgreenx Apr 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Description of the upcoming release here.
- [#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.

#### Breaking

- [#1822](https://github.com/FuelLabs/fuel-core/pull/1822): Removed support of `Create` transaction from debugger since it doesn't have any script to execute.
- [#1822](https://github.com/FuelLabs/fuel-core/pull/1822): Use `fuel-vm 0.49.0` with new transactions types - `Upgrade` and `Upload`. Also added `max_bytecode_subsections` field to the `ConsensusParameters` to limit the number of bytecode subsections in the state transition bytecode.
- [#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.

## [Version 0.24.2]

### Changed
Expand Down
34 changes: 18 additions & 16 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fuel-core-wasm-executor = { version = "0.24.2", path = "./crates/services/upgrad
fuel-core-xtask = { version = "0.0.0", path = "./xtask" }

# Fuel dependencies
fuel-vm-private = { version = "0.48.0", package = "fuel-vm", default-features = false }
fuel-vm-private = { version = "0.49.0", package = "fuel-vm", default-features = false }

# Common dependencies
anyhow = "1.0"
Expand Down
28 changes: 19 additions & 9 deletions benches/benches/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ use fuel_core_storage::{
vm_storage::VmStorage,
};
use fuel_core_types::{
blockchain::header::GeneratedConsensusFields,
blockchain::{
header::{
ApplicationHeader,
ConsensusHeader,
},
primitives::Empty,
},
fuel_tx::Bytes32,
fuel_types::ContractId,
fuel_vm::InterpreterStorage,
Expand Down Expand Up @@ -73,9 +79,10 @@ fn insert_state_single_contract_database(c: &mut Criterion) {
let mut elapsed_time = Duration::default();
for _ in 0..iters {
let inner = outer.read_transaction();
let mut inner_db = VmStorage::new::<GeneratedConsensusFields>(
let mut inner_db = VmStorage::new(
inner,
&Default::default(),
&ConsensusHeader::<Empty>::default(),
&ApplicationHeader::<Empty>::default(),
Default::default(),
);
let start = std::time::Instant::now();
Expand Down Expand Up @@ -134,9 +141,10 @@ fn insert_state_single_contract_transaction(c: &mut Criterion) {
let mut elapsed_time = Duration::default();
for _ in 0..iters {
let inner = outer.read_transaction();
let mut inner_db = VmStorage::new::<GeneratedConsensusFields>(
let mut inner_db = VmStorage::new(
inner,
&Default::default(),
&ConsensusHeader::<Empty>::default(),
&ApplicationHeader::<Empty>::default(),
Default::default(),
);
let start = std::time::Instant::now();
Expand Down Expand Up @@ -198,9 +206,10 @@ fn insert_state_multiple_contracts_database(c: &mut Criterion) {
let contract: ContractId = rng.gen();
for _ in 0..iters {
let inner = outer.read_transaction();
let mut inner_db = VmStorage::new::<GeneratedConsensusFields>(
let mut inner_db = VmStorage::new(
inner,
&Default::default(),
&ConsensusHeader::<Empty>::default(),
&ApplicationHeader::<Empty>::default(),
Default::default(),
);
let start = std::time::Instant::now();
Expand Down Expand Up @@ -262,9 +271,10 @@ fn insert_state_multiple_contracts_transaction(c: &mut Criterion) {
let contract: ContractId = rng.gen();
for _ in 0..iters {
let inner = outer.read_transaction();
let mut inner_db = VmStorage::new::<GeneratedConsensusFields>(
let mut inner_db = VmStorage::new(
inner,
&Default::default(),
&ConsensusHeader::<Empty>::default(),
&ApplicationHeader::<Empty>::default(),
Default::default(),
);
let start = std::time::Instant::now();
Expand Down
16 changes: 13 additions & 3 deletions benches/benches/vm_set/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ use fuel_core_storage::{
StorageAsMut,
};
use fuel_core_types::{
blockchain::header::ConsensusHeader,
blockchain::header::{
ApplicationHeader,
ConsensusHeader,
},
fuel_asm::{
op,
GTFArgs,
Expand Down Expand Up @@ -123,15 +126,22 @@ impl BenchDb {

/// Creates a `VmDatabase` instance.
fn to_vm_database(&self) -> VmStorage<StorageTransaction<Database>> {
let header = ConsensusHeader {
let consensus = ConsensusHeader {
prev_root: Default::default(),
height: 1.into(),
time: Tai64::UNIX_EPOCH,
generated: (),
};
let application = ApplicationHeader {
da_height: Default::default(),
consensus_parameters_version: 0,
generated: (),
state_transition_bytecode_version: 0,
};
VmStorage::new(
self.db.clone().into_transaction(),
&header,
&consensus,
&application,
ContractId::zeroed(),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 1000000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
}
},
"predicate_params": {
Expand Down
3 changes: 2 additions & 1 deletion bin/fuel-core/chainspec/dev-testnet/chain_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 1000000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
}
},
"predicate_params": {
Expand Down
3 changes: 2 additions & 1 deletion bin/fuel-core/chainspec/testnet/chain_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 30000000,
"max_size": 112640
"max_size": 112640,
"max_bytecode_subsections": 256
}
},
"predicate_params": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 112640
"max_size": 112640,
"max_bytecode_subsections": 255
}
},
"predicate_params": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ expression: json
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_size": 17825792
"max_size": 17825792,
"max_bytecode_subsections": 256
},
"predicate_params": {
"max_predicate_length": 1048576,
Expand Down
Loading
Loading