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

Chain config for beta 5 network #1507

Merged
merged 5 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Description of the upcoming release here.

### Added

- [#1503](https://github.com/FuelLabs/fuel-core/pull/1503): Add `gtf` opcode sanity check
- [#1503](https://github.com/FuelLabs/fuel-core/pull/1503): Add `gtf` opcode sanity check.
- [#1502](https://github.com/FuelLabs/fuel-core/pull/1502): Added price benchmark for `vm_initialization`.
- [#1492](https://github.com/FuelLabs/fuel-core/pull/1492): Support backward iteration in the RocksDB. It allows backward queries that were not allowed before.
- [#1490](https://github.com/FuelLabs/fuel-core/pull/1490): Add push and pop benchmarks.
Expand Down Expand Up @@ -55,6 +55,7 @@ Description of the upcoming release here.

### Changed

- [#1507](https://github.com/FuelLabs/fuel-core/pull/1507): Updated chain configuration to be ready for beta 5 network. It includes opcode prices from the latest benchmark and contract for the block producer.
- [#1477](https://github.com/FuelLabs/fuel-core/pull/1477): Upgraded the Rust version used in CI and containers to 1.73.0. Also includes associated Clippy changes.
- [#1469](https://github.com/FuelLabs/fuel-core/pull/1469): Replaced usage of `MemoryTransactionView` by `Checkpoint` database in the benchmarks.
- [#1466](https://github.com/FuelLabs/fuel-core/pull/1466): Handling overflows during arithmetic operations.
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions benches/benches/block_target_gas.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::block_target_gas_set::default_gas_costs::default_gas_costs;
use block_target_gas_set::{
alu::run_alu,
contract::run_contract,
Expand All @@ -25,7 +24,10 @@ use fuel_core::{
},
txpool::types::Word,
};
use fuel_core_benches::*;
use fuel_core_benches::{
default_gas_costs::default_gas_costs,
*,
};
use fuel_core_chain_config::ContractConfig;
use fuel_core_storage::{
tables::ContractsRawCode,
Expand Down
7 changes: 0 additions & 7 deletions benches/benches/block_target_gas_set/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
use fuel_core_types::fuel_tx::{
DependentCost,
GasCostsValues,
};

pub mod alu;

pub mod crypto;
Expand All @@ -14,5 +9,3 @@ pub mod contract;
pub mod memory;

pub mod other;

pub mod default_gas_costs;
Original file line number Diff line number Diff line change
Expand Up @@ -6,170 +6,170 @@ pub fn default_gas_costs() -> GasCostsValues {
aloc: 1,
and: 2,
andi: 2,
bal: 328,
bhei: 1,
bal: 366,
bhei: 2,
bhsh: 2,
burn: 27738,
burn: 33949,
cb: 2,
cfei: 2,
cfsi: 1,
cfsi: 2,
croo: 40,
div: 2,
divi: 2,
eck1: 3107,
ecr1: 42738,
ed19: 2897,
eck1: 3347,
ecr1: 46165,
ed19: 4210,
eq: 2,
exp: 2,
expi: 2,
flag: 1,
gm: 2,
gt: 2,
gtf: 2,
gtf: 16,
ji: 2,
jmp: 2,
jne: 2,
jnei: 2,
jnzi: 2,
jmpf: 1,
jmpb: 1,
jnzf: 1,
jnzb: 1,
jnef: 1,
jneb: 1,
jmpf: 2,
jmpb: 2,
jnzf: 2,
jnzb: 2,
jnef: 2,
jneb: 2,
lb: 2,
log: 87,
log: 754,
lt: 2,
lw: 2,
mint: 25515,
mint: 35718,
mlog: 2,
vm_initialization: DependentCost::HeavyOperation {
base: 2000,
gas_per_unit: 0,
vm_initialization: DependentCost::LightOperation {
base: 1645,
units_per_gas: 14,
},
modi: 2,
mod_op: 2,
movi: 2,
mroo: 4,
mroo: 5,
mul: 2,
muli: 2,
mldv: 4,
noop: 1,
not: 1,
not: 2,
or: 2,
ori: 2,
poph: 3,
popl: 3,
pshh: 3,
pshl: 3,
move_op: 1,
ret: 127,
pshh: 4,
pshl: 4,
move_op: 2,
ret: 733,
sb: 2,
sll: 2,
slli: 2,
srl: 2,
srli: 2,
srw: 224,
srw: 253,
sub: 2,
subi: 2,
sw: 2,
sww: 26247,
time: 76,
tr: 38925,
tro: 26756,
wdcm: 2,
sww: 29053,
time: 79,
tr: 46242,
tro: 33251,
wdcm: 3,
wqcm: 3,
wdop: 3,
wqop: 3,
wdml: 3,
wqml: 4,
wddv: 5,
wqdv: 6,
wdmd: 10,
wqmd: 17,
wqdv: 7,
wdmd: 11,
wqmd: 18,
wdam: 9,
wqam: 10,
wdmm: 10,
wqmm: 10,
wqam: 12,
wdmm: 11,
wqmm: 11,
xor: 2,
xori: 2,
call: DependentCost::LightOperation {
base: 17510,
units_per_gas: 5,
base: 21687,
units_per_gas: 4,
},
ccp: DependentCost::LightOperation {
base: 54,
units_per_gas: 21,
base: 59,
units_per_gas: 20,
},
csiz: DependentCost::LightOperation {
base: 58,
units_per_gas: 212,
base: 59,
units_per_gas: 195,
},
k256: DependentCost::LightOperation {
base: 259,
units_per_gas: 4,
base: 282,
units_per_gas: 3,
},
ldc: DependentCost::LightOperation {
base: 42,
base: 45,
units_per_gas: 65,
},
logd: DependentCost::LightOperation {
base: 413,
units_per_gas: 3,
base: 1134,
units_per_gas: 2,
},
mcl: DependentCost::LightOperation {
base: 2,
units_per_gas: 568,
base: 3,
units_per_gas: 523,
},
mcli: DependentCost::LightOperation {
base: 3,
units_per_gas: 568,
units_per_gas: 526,
},
mcp: DependentCost::LightOperation {
base: 3,
units_per_gas: 470,
units_per_gas: 448,
},
mcpi: DependentCost::LightOperation {
base: 6,
units_per_gas: 682,
base: 7,
units_per_gas: 585,
},
meq: DependentCost::LightOperation {
base: 10,
units_per_gas: 1161,
base: 11,
units_per_gas: 1097,
},
rvrt: 127,
rvrt: 722,
s256: DependentCost::LightOperation {
base: 42,
base: 45,
units_per_gas: 3,
},
scwq: DependentCost::HeavyOperation {
base: 27337,
gas_per_unit: 25552,
base: 30375,
gas_per_unit: 28628,
},
smo: DependentCost::LightOperation {
base: 55851,
base: 64196,
units_per_gas: 1,
},
srwq: DependentCost::HeavyOperation {
base: 501,
gas_per_unit: 22,
base: 579,
gas_per_unit: 24,
},
swwq: DependentCost::HeavyOperation {
base: 25619,
gas_per_unit: 24002,
base: 28484,
gas_per_unit: 26613,
},
contract_root: DependentCost::LightOperation {
base: 43,
units_per_gas: 2,
base: 45,
units_per_gas: 1,
},
state_root: DependentCost::HeavyOperation {
base: 324,
gas_per_unit: 164,
base: 350,
gas_per_unit: 176,
},
new_storage_per_byte: 1,
new_storage_per_byte: 63,
retd: DependentCost::LightOperation {
base: 434,
units_per_gas: 3,
base: 1086,
units_per_gas: 2,
},
}
}
1 change: 1 addition & 0 deletions benches/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod default_gas_costs;
pub mod import;

use fuel_core::database::vm_database::VmDatabase;
Expand Down
2 changes: 2 additions & 0 deletions bin/e2e-test-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ When `FUEL_CORE_E2E_CONFIG` is unset a default configuration is used which is su
endpoint = "http://localhost:4000"
wallet_sync_timeout = "10s"
full_test = false
coinbase_contract_id = "7777777777777777777777777777777777777777777777777777777777777777"


[wallet_a]
secret = "de97d8624a438121b86a1956544bd72ed68cd69f2c99555b08b1e8c51ffd511c"
Expand Down
16 changes: 14 additions & 2 deletions bin/e2e-test-client/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
use crate::SYNC_TIMEOUT;
use fuel_core_types::fuel_vm::SecretKey;
use fuel_core_types::{
fuel_tx::ContractId,
fuel_vm::SecretKey,
};
use serde::{
Deserialize,
Serialize,
};
use std::time::Duration;
use std::{
str::FromStr,
time::Duration,
};

#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
pub struct SuiteConfig {
Expand All @@ -16,6 +22,8 @@ pub struct SuiteConfig {
pub wallet_sync_timeout: Duration,
/// Enable slower but more stressful tests. Should be used in full E2E tests but not in CI.
pub full_test: bool,
/// The contract id of the coinbase contract.
pub coinbase_contract_id: ContractId,
/// Wallet A must contain pre-existing funds
pub wallet_a: ClientConfig,
pub wallet_b: ClientConfig,
Expand All @@ -33,6 +41,10 @@ impl Default for SuiteConfig {
endpoint: "http://localhost:4000".to_string(),
wallet_sync_timeout: SYNC_TIMEOUT,
full_test: false,
coinbase_contract_id: ContractId::from_str(
"0x7777777777777777777777777777777777777777777777777777777777777777",
)
.unwrap(),
wallet_a: ClientConfig {
endpoint: None,
secret:
Expand Down
9 changes: 9 additions & 0 deletions bin/e2e-test-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ pub fn main_body(config: SuiteConfig, mut args: Arguments) {
})
}),
),
Trial::test(
"can collect fee from alice",
with_cloned(&config, |config| {
async_execute(async {
let ctx = TestContext::new(config).await;
tests::collect_fee::collect_fee(&ctx).await
})
}),
),
Trial::test(
"can execute script and get receipts",
with_cloned(&config, |config| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ expression: serialized
endpoint = "http://localhost:4000"
wallet_sync_timeout = "10s"
full_test = false
coinbase_contract_id = "7777777777777777777777777777777777777777777777777777777777777777"

[wallet_a]
secret = "de97d8624a438121b86a1956544bd72ed68cd69f2c99555b08b1e8c51ffd511c"
Expand Down
Loading
Loading