diff --git a/CHANGELOG.md b/CHANGELOG.md index 1647b24f191..82c6c9f0448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,4 +46,5 @@ Description of the upcoming release here. ### Removed #### Breaking +- [#1338](https://github.com/FuelLabs/fuel-core/pull/1338): Updated GraphQL client to use `DependentCost` for `k256`, `mcpi`, `s256`, `scwq`, `swwq` opcodes. - [#1322](https://github.com/FuelLabs/fuel-core/pull/1322): The `manual_blocks_enabled` flag is removed from the CLI. The analog is a `debug` flag. diff --git a/Cargo.lock b/Cargo.lock index 7f420468739..fd9ac84ee2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -307,7 +307,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -319,7 +319,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -2706,11 +2706,12 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "fuel-asm" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73bc3c43b0b6e55857fcdc135333e9199ca8baf257aeba64ada0b91a33dac19a" +checksum = "fe3bb19d130cae1b52bf46be4bdc3e8ef7180bd1edb552498521341d6a46ebff" dependencies = [ "bitflags 1.3.2", + "fuel-types", "serde", "strum", ] @@ -3209,9 +3210,9 @@ dependencies = [ [[package]] name = "fuel-crypto" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0bca1bea96b565784f2b31a31e763435a74cc123d5f3651a3058c856279339" +checksum = "21ff085e978bf0bcc94733853a59856083accf4685b436d81c53f092afa24324" dependencies = [ "borrown", "coins-bip32 0.8.7", @@ -3228,11 +3229,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "fuel-derive" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125d226cf182f812ff104bd6315c15b2ed452a5953052c20493455e3d9dddffb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", + "synstructure 0.13.0", +] + [[package]] name = "fuel-merkle" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34c426b1928010fdae28c58932c414b0cd4024577103d8ac6bc666d17d76a26e" +checksum = "8aef206a98a380615bf711dc6b4b7328dac4002c4df278f8a43d3d16c2bfa330" dependencies = [ "digest 0.10.7", "fuel-storage", @@ -3244,15 +3257,15 @@ dependencies = [ [[package]] name = "fuel-storage" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599c2c49270b3c473d7da954629e59b9f8b1c95409a79bacf5736127747b7a3" +checksum = "6a8e7a3bd721e8556c319af4c0e88d1f82ec54a48fa1b9136603f2fb0bb6ceb9" [[package]] name = "fuel-tx" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc80a5c95d93871df5960c6d9b1dcb43e22d15d68c44577c0e94699208d1e6c" +checksum = "97e75c84495162671e29ef72d961c4ca06b4f62c77949e525f8d19003a3012e2" dependencies = [ "derivative", "fuel-asm", @@ -3261,6 +3274,7 @@ dependencies = [ "fuel-types", "itertools", "num-integer", + "num_enum", "rand 0.8.5", "serde", "serde_json", @@ -3270,10 +3284,11 @@ dependencies = [ [[package]] name = "fuel-types" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2efb8908ba7e03f2b0b83f38d9853d6741f2f21ac0c35b32036ad25625136f2" +checksum = "9963e48971e652a8da3626424c6d77e6b1117559149d5aa323df9ada6080baa5" dependencies = [ + "fuel-derive", "hex", "rand 0.8.5", "serde", @@ -3281,9 +3296,9 @@ dependencies = [ [[package]] name = "fuel-vm" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1155796c26e6e96696d8ce95865346dd50e10fe577392d86fa8c28c193dde8" +checksum = "d5d48c0c0f8381efde94d53050e08f0caed7fa91b687347c5f65efcb26367264" dependencies = [ "anyhow", "async-trait", @@ -5080,7 +5095,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -5276,6 +5291,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "object" version = "0.32.0" @@ -7443,6 +7479,18 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", + "unicode-xid", +] + [[package]] name = "system-configuration" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 210745c5b7d..09ab1ab6318 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ fuel-core-tests = { version = "0.0.0", path = "./tests" } fuel-core-xtask = { version = "0.0.0", path = "./xtask" } # Fuel dependencies -fuel-vm-private = { version = "0.36.0", package = "fuel-vm" } +fuel-vm-private = { version = "0.37.0", package = "fuel-vm" } # Common dependencies anyhow = "1.0" diff --git a/bin/e2e-test-client/src/test_context.rs b/bin/e2e-test-client/src/test_context.rs index ac97fbff8b4..a2c14e8dd4d 100644 --- a/bin/e2e-test-client/src/test_context.rs +++ b/bin/e2e-test-client/src/test_context.rs @@ -32,7 +32,7 @@ use fuel_core_types::{ UtxoId, }, fuel_types::{ - bytes::SizedBytes, + canonical::SerializedSize, Address, AssetId, }, @@ -253,7 +253,7 @@ impl Wallet { }); let tx = tx.finalize(); - println!("The size of the transaction is {}", tx.serialized_size()); + println!("The size of the transaction is {}", tx.size()); let status = self .client diff --git a/bin/e2e-test-client/src/tests/script.rs b/bin/e2e-test-client/src/tests/script.rs index 0440d3cdee1..128c0761686 100644 --- a/bin/e2e-test-client/src/tests/script.rs +++ b/bin/e2e-test-client/src/tests/script.rs @@ -9,7 +9,7 @@ use fuel_core_types::{ ScriptExecutionResult, Transaction, }, - fuel_types::bytes::Deserializable, + fuel_types::canonical::Deserialize, }; use libtest_mimic::Failed; use std::time::Duration; diff --git a/ci_checks.sh b/ci_checks.sh index da51bcce0c2..749628218db 100755 --- a/ci_checks.sh +++ b/ci_checks.sh @@ -3,7 +3,7 @@ # The script runs almost all CI checks locally. # # Requires installed: -# - Rust `1.71.0` +# - Rust `1.72.0` # - Nightly rust formatter # - `cargo install cargo-sort` diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_configurable_block_height.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_configurable_block_height.snap index c858551034d..573f5e0f4e7 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_configurable_block_height.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_configurable_block_height.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 91 expression: json --- { @@ -72,12 +71,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -98,9 +95,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -109,8 +104,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -142,6 +136,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -162,6 +160,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -170,6 +172,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -177,8 +187,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_balances.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_balances.snap index dd5e976dd17..5056d1b1797 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_balances.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_balances.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 146 expression: json --- { @@ -84,12 +83,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -110,9 +107,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -121,8 +116,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -154,6 +148,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -174,6 +172,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -182,6 +184,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -189,8 +199,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_state.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_state.snap index 8e5ed0dd16a..c47a5c878bc 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_state.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_state.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 130 expression: json --- { @@ -84,12 +83,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -110,9 +107,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -121,8 +116,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -154,6 +148,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -174,6 +172,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -182,6 +184,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -189,8 +199,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_tx_pointer.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_tx_pointer.snap index 000f92c612b..0fbbe161f91 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_tx_pointer.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_tx_pointer.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 178 expression: json --- { @@ -80,12 +79,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -106,9 +103,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -117,8 +112,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -150,6 +144,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -170,6 +168,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -178,6 +180,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -185,8 +195,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_utxo_id.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_utxo_id.snap index f9f85c10a0f..6946e3af72a 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_utxo_id.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_contract_with_utxo_id.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 162 expression: json --- { @@ -80,12 +79,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -106,9 +103,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -117,8 +112,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -150,6 +144,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -170,6 +168,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -178,6 +180,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -185,8 +195,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_local_testnet_config.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_local_testnet_config.snap index 1a99665f2d7..e2a5e8784e6 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_local_testnet_config.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_local_testnet_config.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 68 expression: json --- { @@ -98,12 +97,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -124,9 +121,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -135,8 +130,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -168,6 +162,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -188,6 +186,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -196,6 +198,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -203,8 +213,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_coin_state.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_coin_state.snap index 837665bd876..8b6739f9787 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_coin_state.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_coin_state.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 194 expression: json --- { @@ -83,12 +82,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -109,9 +106,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -120,8 +115,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -153,6 +147,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -173,6 +171,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -181,6 +183,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -188,8 +198,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_contract.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_contract.snap index 122afd88a46..2871145e04b 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_contract.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_contract.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 114 expression: json --- { @@ -78,12 +77,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -104,9 +101,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -115,8 +110,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -148,6 +142,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -168,6 +166,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -176,6 +178,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -183,8 +193,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_message_state.snap b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_message_state.snap index d77a57dee6e..6414c0bb00b 100644 --- a/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_message_state.snap +++ b/crates/chain-config/src/snapshots/fuel_core_chain_config__config__tests__snapshot_simple_message_state.snap @@ -1,6 +1,5 @@ --- source: crates/chain-config/src/config.rs -assertion_line: 210 expression: json --- { @@ -81,12 +80,10 @@ expression: json "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -107,9 +104,7 @@ expression: json "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -118,8 +113,7 @@ expression: json "sub": 1, "subi": 1, "sw": 1, - "sww": 43, - "swwq": 44, + "sww": 67, "time": 1, "tr": 105, "tro": 60, @@ -151,6 +145,10 @@ expression: json "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -171,6 +169,10 @@ expression: json "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -179,6 +181,14 @@ expression: json "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -186,8 +196,13 @@ expression: json "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/crates/client/assets/schema.sdl b/crates/client/assets/schema.sdl index af4228b4f30..b234edd1ad3 100644 --- a/crates/client/assets/schema.sdl +++ b/crates/client/assets/schema.sdl @@ -316,12 +316,10 @@ type GasCosts { jnzb: U64! jnef: U64! jneb: U64! - k256: U64! lb: U64! log: U64! lt: U64! lw: U64! - mcpi: U64! mint: U64! mlog: U64! modOp: U64! @@ -342,9 +340,7 @@ type GasCosts { pshl: U64! ret: U64! rvrt: U64! - s256: U64! sb: U64! - scwq: U64! sll: U64! slli: U64! srl: U64! @@ -354,7 +350,6 @@ type GasCosts { subi: U64! sw: U64! sww: U64! - swwq: U64! time: U64! tr: U64! tro: U64! @@ -377,15 +372,20 @@ type GasCosts { call: DependentCost! ccp: DependentCost! csiz: DependentCost! + k256: DependentCost! ldc: DependentCost! logd: DependentCost! mcl: DependentCost! mcli: DependentCost! mcp: DependentCost! + mcpi: DependentCost! meq: DependentCost! retd: DependentCost! + s256: DependentCost! + scwq: DependentCost! smo: DependentCost! srwq: DependentCost! + swwq: DependentCost! } type Genesis { diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 7867a5020fe..7fa4eae42f8 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -42,7 +42,7 @@ use fuel_core_types::{ }, fuel_types, fuel_types::{ - bytes::SerializableVec, + canonical::SerializedSize, BlockHeight, MessageId, Nonce, diff --git a/crates/client/src/client/schema.rs b/crates/client/src/client/schema.rs index 3dac319fc2c..2ede5eaf7a6 100644 --- a/crates/client/src/client/schema.rs +++ b/crates/client/src/client/schema.rs @@ -4,7 +4,10 @@ pub mod schema { cynic::use_schema!("./assets/schema.sdl"); } -use fuel_core_types::fuel_tx; +use fuel_core_types::{ + fuel_tx, + fuel_types::canonical, +}; use hex::FromHexError; use std::{ array::TryFromSliceError, @@ -289,9 +292,9 @@ pub enum ConversionError { #[error("failed integer conversion")] IntegerConversion, #[error("failed to deserialize transaction from bytes {0}")] - TransactionFromBytesError(std::io::Error), + TransactionFromBytesError(canonical::Error), #[error("failed to deserialize receipt from bytes {0}")] - ReceiptFromBytesError(std::io::Error), + ReceiptFromBytesError(canonical::Error), #[error("failed to convert from bytes due to unexpected length")] BytesLength, #[error("Unknown variant of the {0} enum")] diff --git a/crates/client/src/client/schema/chain.rs b/crates/client/src/client/schema/chain.rs index 18c3f857607..28980d3f633 100644 --- a/crates/client/src/client/schema/chain.rs +++ b/crates/client/src/client/schema/chain.rs @@ -1,6 +1,7 @@ use crate::client::schema::{ block::Block, schema, + AssetId, U32, U64, }; @@ -164,12 +165,10 @@ include_from_impls_and_cynic! { pub jnzb: U64, pub jnef: U64, pub jneb: U64, - pub k256: U64, pub lb: U64, pub log: U64, pub lt: U64, pub lw: U64, - pub mcpi: U64, pub mint: U64, pub mlog: U64, pub mod_op: U64, @@ -190,9 +189,7 @@ include_from_impls_and_cynic! { pub pshl: U64, pub ret: U64, pub rvrt: U64, - pub s256: U64, pub sb: U64, - pub scwq: U64, pub sll: U64, pub slli: U64, pub srl: U64, @@ -202,7 +199,6 @@ include_from_impls_and_cynic! { pub subi: U64, pub sw: U64, pub sww: U64, - pub swwq: U64, pub time: U64, pub tr: U64, pub tro: U64, @@ -226,15 +222,20 @@ include_from_impls_and_cynic! { pub call: DependentCost, pub ccp: DependentCost, pub csiz: DependentCost, + pub k256: DependentCost, pub ldc: DependentCost, pub logd: DependentCost, pub mcl: DependentCost, pub mcli: DependentCost, pub mcp: DependentCost, + pub mcpi: DependentCost, pub meq: DependentCost, pub retd: DependentCost, + pub s256: DependentCost, + pub scwq: DependentCost, pub smo: DependentCost, pub srwq: DependentCost, + pub swwq: DependentCost, } } @@ -264,6 +265,7 @@ impl From for fuel_core_types::fuel_tx::ConsensusParameters fee_params: params.fee_params.into(), chain_id: params.chain_id.0.into(), gas_costs: params.gas_costs.into(), + base_asset_id: AssetId::default().into(), } } } diff --git a/crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__chain__tests__chain_gql_query_output.snap b/crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__chain__tests__chain_gql_query_output.snap index 3e7451a622b..cb9d72df04f 100644 --- a/crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__chain__tests__chain_gql_query_output.snap +++ b/crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__chain__tests__chain_gql_query_output.snap @@ -1,6 +1,5 @@ --- source: crates/client/src/client/schema/chain.rs -assertion_line: 295 expression: operation.query --- query { @@ -101,12 +100,10 @@ query { jnzb jnef jneb - k256 lb log lt lw - mcpi mint mlog modOp @@ -127,9 +124,7 @@ query { pshl ret rvrt - s256 sb - scwq sll slli srl @@ -139,7 +134,6 @@ query { subi sw sww - swwq time tr tro @@ -171,6 +165,10 @@ query { base depPerUnit } + k256 { + base + depPerUnit + } ldc { base depPerUnit @@ -191,6 +189,10 @@ query { base depPerUnit } + mcpi { + base + depPerUnit + } meq { base depPerUnit @@ -199,6 +201,14 @@ query { base depPerUnit } + s256 { + base + depPerUnit + } + scwq { + base + depPerUnit + } smo { base depPerUnit @@ -207,6 +217,10 @@ query { base depPerUnit } + swwq { + base + depPerUnit + } } } } diff --git a/crates/client/src/client/schema/tx.rs b/crates/client/src/client/schema/tx.rs index ec5d80f15f6..35d14d441d6 100644 --- a/crates/client/src/client/schema/tx.rs +++ b/crates/client/src/client/schema/tx.rs @@ -19,7 +19,7 @@ use crate::client::{ use fuel_core_types::{ fuel_tx, fuel_types::{ - bytes::Deserializable, + canonical::Deserialize, Bytes32, }, fuel_vm, @@ -319,7 +319,7 @@ pub struct AllReceipts { pub mod tests { use super::*; use crate::client::schema::Bytes; - use fuel_core_types::fuel_types::bytes::SerializableVec; + use fuel_core_types::fuel_types::canonical::SerializedSize; #[test] fn transparent_transaction_by_id_query_gql_output() { @@ -368,7 +368,7 @@ pub mod tests { #[test] fn dry_run_tx_gql_output() { use cynic::MutationBuilder; - let mut tx = fuel_tx::Transaction::default_test_tx(); + let tx = fuel_tx::Transaction::default_test_tx(); let query = DryRun::build(DryRunArg { tx: HexString(Bytes(tx.to_bytes())), utxo_validation: None, @@ -379,7 +379,7 @@ pub mod tests { #[test] fn submit_tx_gql_output() { use cynic::MutationBuilder; - let mut tx = fuel_tx::Transaction::default_test_tx(); + let tx = fuel_tx::Transaction::default_test_tx(); let query = Submit::build(TxArg { tx: HexString(Bytes(tx.to_bytes())), }); diff --git a/crates/client/src/client/types.rs b/crates/client/src/client/types.rs index 77971dca695..471b7db9e54 100644 --- a/crates/client/src/client/types.rs +++ b/crates/client/src/client/types.rs @@ -43,13 +43,9 @@ use crate::client::schema::{ }; use fuel_core_types::{ fuel_tx::Transaction, - fuel_types::bytes::Deserializable, + fuel_types::canonical::Deserialize, fuel_vm::ProgramState, }; -use serde::{ - Deserialize, - Serialize, -}; use tai64::Tai64; pub mod primitives { @@ -79,13 +75,13 @@ pub mod primitives { pub type TransactionId = Bytes32; } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct TransactionResponse { pub transaction: Transaction, pub status: TransactionStatus, } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub enum TransactionStatus { Submitted { submitted_at: Tai64, diff --git a/crates/client/src/client/types/gas_costs.rs b/crates/client/src/client/types/gas_costs.rs index c23321ca380..92dce12da78 100644 --- a/crates/client/src/client/types/gas_costs.rs +++ b/crates/client/src/client/types/gas_costs.rs @@ -68,12 +68,10 @@ include_from_impls! { pub jnzb: u64, pub jnef: u64, pub jneb: u64, - pub k256: u64, pub lb: u64, pub log: u64, pub lt: u64, pub lw: u64, - pub mcpi: u64, pub mint: u64, pub mlog: u64, pub mod_op: u64, @@ -94,9 +92,7 @@ include_from_impls! { pub pshl: u64, pub ret: u64, pub rvrt: u64, - pub s256: u64, pub sb: u64, - pub scwq: u64, pub sll: u64, pub slli: u64, pub srl: u64, @@ -106,7 +102,6 @@ include_from_impls! { pub subi: u64, pub sw: u64, pub sww: u64, - pub swwq: u64, pub time: u64, pub tr: u64, pub tro: u64, @@ -130,15 +125,20 @@ include_from_impls! { pub call: DependentCost, pub ccp: DependentCost, pub csiz: DependentCost, + pub k256: DependentCost, pub ldc: DependentCost, pub logd: DependentCost, pub mcl: DependentCost, pub mcli: DependentCost, pub mcp: DependentCost, + pub mcpi: DependentCost, pub meq: DependentCost, pub retd: DependentCost, + pub s256: DependentCost, + pub scwq: DependentCost, pub smo: DependentCost, pub srwq: DependentCost, + pub swwq: DependentCost, } } diff --git a/crates/fuel-core/src/executor.rs b/crates/fuel-core/src/executor.rs index f25a50e49f7..9a5f850ee82 100644 --- a/crates/fuel-core/src/executor.rs +++ b/crates/fuel-core/src/executor.rs @@ -26,6 +26,7 @@ use fuel_core_storage::{ StorageAsRef, StorageInspect, }; +#[allow(unused_imports)] use fuel_core_types::{ blockchain::{ block::{ @@ -78,6 +79,7 @@ use fuel_core_types::{ UtxoId, }, fuel_types::{ + canonical::SerializedSize, BlockHeight, MessageId, }, @@ -1719,7 +1721,6 @@ mod tests { TransactionBuilder, }, fuel_types::{ - bytes::SerializableVec, ChainId, ContractId, Salt, @@ -4103,7 +4104,7 @@ mod tests { &CompressedCoin { owner: *coin_input.input_owner().unwrap(), amount: coin_input.amount().unwrap(), - asset_id: *coin_input.asset_id().unwrap(), + asset_id: *coin_input.asset_id(&AssetId::BASE).unwrap(), maturity: coin_input.maturity().unwrap(), tx_pointer: TxPointer::new(Default::default(), block_tx_idx), }, @@ -4180,7 +4181,7 @@ mod tests { &CompressedCoin { owner: *coin_input.input_owner().unwrap(), amount: coin_input.amount().unwrap(), - asset_id: *coin_input.asset_id().unwrap(), + asset_id: *coin_input.asset_id(&AssetId::BASE).unwrap(), maturity: coin_input.maturity().unwrap(), tx_pointer: TxPointer::default(), }, diff --git a/crates/fuel-core/src/schema/chain.rs b/crates/fuel-core/src/schema/chain.rs index 0d015b61fa4..e61e7f8ddeb 100644 --- a/crates/fuel-core/src/schema/chain.rs +++ b/crates/fuel-core/src/schema/chain.rs @@ -322,10 +322,6 @@ impl GasCosts { self.0.jneb.into() } - async fn k256(&self) -> U64 { - self.0.k256.into() - } - async fn lb(&self) -> U64 { self.0.lb.into() } @@ -342,10 +338,6 @@ impl GasCosts { self.0.lw.into() } - async fn mcpi(&self) -> U64 { - self.0.mcpi.into() - } - async fn mint(&self) -> U64 { self.0.mint.into() } @@ -426,18 +418,10 @@ impl GasCosts { self.0.rvrt.into() } - async fn s256(&self) -> U64 { - self.0.s256.into() - } - async fn sb(&self) -> U64 { self.0.sb.into() } - async fn scwq(&self) -> U64 { - self.0.scwq.into() - } - async fn sll(&self) -> U64 { self.0.sll.into() } @@ -474,10 +458,6 @@ impl GasCosts { self.0.sww.into() } - async fn swwq(&self) -> U64 { - self.0.swwq.into() - } - async fn time(&self) -> U64 { self.0.time.into() } @@ -566,6 +546,10 @@ impl GasCosts { self.0.csiz.into() } + async fn k256(&self) -> DependentCost { + self.0.k256.into() + } + async fn ldc(&self) -> DependentCost { self.0.ldc.into() } @@ -586,6 +570,10 @@ impl GasCosts { self.0.mcp.into() } + async fn mcpi(&self) -> DependentCost { + self.0.mcpi.into() + } + async fn meq(&self) -> DependentCost { self.0.meq.into() } @@ -594,6 +582,14 @@ impl GasCosts { self.0.retd.into() } + async fn s256(&self) -> DependentCost { + self.0.s256.into() + } + + async fn scwq(&self) -> DependentCost { + self.0.scwq.into() + } + async fn smo(&self) -> DependentCost { self.0.smo.into() } @@ -601,6 +597,10 @@ impl GasCosts { async fn srwq(&self) -> DependentCost { self.0.srwq.into() } + + async fn swwq(&self) -> DependentCost { + self.0.swwq.into() + } } #[Object] diff --git a/crates/fuel-core/src/schema/tx.rs b/crates/fuel-core/src/schema/tx.rs index 8754af77d16..b8a6b4d151e 100644 --- a/crates/fuel-core/src/schema/tx.rs +++ b/crates/fuel-core/src/schema/tx.rs @@ -48,7 +48,7 @@ use fuel_core_types::{ UniqueIdentifier, }, fuel_types, - fuel_types::bytes::Deserializable, + fuel_types::canonical::Deserialize, fuel_vm::checked_transaction::EstimatePredicates, services::txpool, }; diff --git a/crates/fuel-core/src/schema/tx/types.rs b/crates/fuel-core/src/schema/tx/types.rs index f2e92ae8b26..22ca2cbf0fe 100644 --- a/crates/fuel-core/src/schema/tx/types.rs +++ b/crates/fuel-core/src/schema/tx/types.rs @@ -60,7 +60,8 @@ use fuel_core_types::{ Chargeable, Executable, }, - fuel_types::bytes::SerializableVec, + fuel_types, + fuel_types::canonical::SerializedSize, fuel_vm::ProgramState as VmProgramState, services::{ txpool, @@ -278,12 +279,18 @@ impl Transaction { async fn input_asset_ids(&self) -> Option> { match &self.0 { - fuel_tx::Transaction::Script(script) => { - Some(script.input_asset_ids().map(|c| AssetId(*c)).collect()) - } - fuel_tx::Transaction::Create(create) => { - Some(create.input_asset_ids().map(|c| AssetId(*c)).collect()) - } + fuel_tx::Transaction::Script(script) => Some( + script + .input_asset_ids(&fuel_types::AssetId::BASE) + .map(|c| AssetId(*c)) + .collect(), + ), + fuel_tx::Transaction::Create(create) => Some( + create + .input_asset_ids(&fuel_types::AssetId::BASE) + .map(|c| AssetId(*c)) + .collect(), + ), fuel_tx::Transaction::Mint(_) => None, } } diff --git a/crates/services/src/service.rs b/crates/services/src/service.rs index ab78de7519c..726573ed3f2 100644 --- a/crates/services/src/service.rs +++ b/crates/services/src/service.rs @@ -419,14 +419,13 @@ impl From for SharedMutex { } fn panic_to_string(e: Box) -> String { - let panic_information = match e.downcast::() { + match e.downcast::() { Ok(v) => *v, Err(e) => match e.downcast::<&str>() { Ok(v) => v.to_string(), _ => "Unknown Source of Error".to_owned(), }, - }; - panic_information + } } #[cfg(test)] diff --git a/crates/services/txpool/src/service/update_sender.rs b/crates/services/txpool/src/service/update_sender.rs index 955bd341441..349e34b8fcb 100644 --- a/crates/services/txpool/src/service/update_sender.rs +++ b/crates/services/txpool/src/service/update_sender.rs @@ -304,7 +304,7 @@ where // Insert a new vec into the senders map if not exists, // and then push the sender to the vec. - senders.entry(tx_id).or_insert_with(Vec::new).push(Sender { + senders.entry(tx_id).or_default().push(Sender { _permit: permit, stream: TxUpdateStream::new(), tx, diff --git a/crates/services/txpool/src/service/update_sender/tests/test_e2e.rs b/crates/services/txpool/src/service/update_sender/tests/test_e2e.rs index 73fc6437aa1..f178f11d0f7 100644 --- a/crates/services/txpool/src/service/update_sender/tests/test_e2e.rs +++ b/crates/services/txpool/src/service/update_sender/tests/test_e2e.rs @@ -177,7 +177,7 @@ fn model_subscribe( // Only add a new sender if the model is not full. if model.values().map(|v| v.len()).sum::() < CAPACITY { // Insert new senders with an empty state. - let senders = model.entry(id).or_insert_with(HashMap::new); + let senders = model.entry(id).or_default(); senders.insert(*sender_id, State::Empty); // Add a new receiver to the model. diff --git a/crates/services/txpool/src/test_helpers.rs b/crates/services/txpool/src/test_helpers.rs index d1ad0c87532..02419cdeb1b 100644 --- a/crates/services/txpool/src/test_helpers.rs +++ b/crates/services/txpool/src/test_helpers.rs @@ -49,7 +49,7 @@ pub(crate) fn add_coin_to_state(input: Input, mock_db: Option<&MockDb>) -> (Coin let coin = CompressedCoin { owner: *input.input_owner().unwrap(), amount: TEST_COIN_AMOUNT, - asset_id: *input.asset_id().unwrap(), + asset_id: *input.asset_id(&AssetId::BASE).unwrap(), maturity: Default::default(), tx_pointer: Default::default(), }; diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index 3c2a8dbe8d1..d488b3e51eb 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -19,7 +19,7 @@ version = { workspace = true } [dependencies] anyhow = { workspace = true } derive_more = { version = "0.99" } -fuel-vm-private = { workspace = true, features = ["debug"] } +fuel-vm-private = { workspace = true } secrecy = "0.8" serde = { workspace = true, features = ["derive"], optional = true } tai64 = { version = "4.0", features = ["serde"] } diff --git a/crates/types/src/blockchain/header.rs b/crates/types/src/blockchain/header.rs index 30bfa112cb1..b449359afd4 100644 --- a/crates/types/src/blockchain/header.rs +++ b/crates/types/src/blockchain/header.rs @@ -12,7 +12,7 @@ use crate::{ fuel_merkle, fuel_tx::Transaction, fuel_types::{ - bytes::SerializableVec, + canonical::SerializedSize, BlockHeight, Bytes32, MessageId, diff --git a/deployment/scripts/chainspec/beta_chainspec.json b/deployment/scripts/chainspec/beta_chainspec.json index dcde979a818..0ff0c01a1db 100644 --- a/deployment/scripts/chainspec/beta_chainspec.json +++ b/deployment/scripts/chainspec/beta_chainspec.json @@ -103,12 +103,10 @@ "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -129,9 +127,7 @@ "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -141,7 +137,6 @@ "subi": 1, "sw": 1, "sww": 43, - "swwq": 44, "time": 1, "tr": 105, "tro": 60, @@ -173,6 +168,10 @@ "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -193,6 +192,10 @@ "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -201,6 +204,14 @@ "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -208,8 +219,13 @@ "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/deployment/scripts/chainspec/dev_chainspec.json b/deployment/scripts/chainspec/dev_chainspec.json index 35491b9221c..1161a9ec83f 100644 --- a/deployment/scripts/chainspec/dev_chainspec.json +++ b/deployment/scripts/chainspec/dev_chainspec.json @@ -73,12 +73,10 @@ "jnzb": 1, "jnef": 1, "jneb": 1, - "k256": 11, "lb": 1, "log": 9, "lt": 1, "lw": 1, - "mcpi": 33, "mint": 135, "mlog": 1, "mod": 1, @@ -99,9 +97,7 @@ "pshl": 2, "ret_contract": 13, "rvrt_contract": 13, - "s256": 2, "sb": 1, - "scwq": 13, "sll": 1, "slli": 1, "srl": 1, @@ -111,7 +107,6 @@ "subi": 1, "sw": 1, "sww": 43, - "swwq": 44, "time": 1, "tr": 105, "tro": 60, @@ -143,6 +138,10 @@ "base": 17, "dep_per_unit": 790 }, + "k256": { + "base": 11, + "dep_per_unit": 214 + }, "ldc": { "base": 15, "dep_per_unit": 272 @@ -163,6 +162,10 @@ "base": 1, "dep_per_unit": 2000 }, + "mcpi": { + "base": 3, + "dep_per_unit": 2000 + }, "meq": { "base": 1, "dep_per_unit": 2500 @@ -171,6 +174,14 @@ "base": 29, "dep_per_unit": 62 }, + "s256": { + "base": 2, + "dep_per_unit": 214 + }, + "scwq": { + "base": 13, + "dep_per_unit": 5 + }, "smo": { "base": 209, "dep_per_unit": 55 @@ -178,8 +189,13 @@ "srwq": { "base": 47, "dep_per_unit": 5 + }, + "swwq": { + "base": 44, + "dep_per_unit": 5 } - } + }, + "base_asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, "consensus": { "PoA": { diff --git a/tests/tests/contract.rs b/tests/tests/contract.rs index ce02749b8db..551a8cb4e57 100644 --- a/tests/tests/contract.rs +++ b/tests/tests/contract.rs @@ -18,7 +18,7 @@ use fuel_core_types::{ fuel_asm::*, fuel_tx::*, fuel_types::{ - bytes::*, + canonical::SerializedSize, ChainId, }, fuel_vm::*,