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-core 0.34.1 with updated gas prices #1214

Merged
merged 7 commits into from
Jun 16, 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
29 changes: 15 additions & 14 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 @@ -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.34", package = "fuel-vm" }
fuel-vm-private = { version = "0.34.1", package = "fuel-vm" }

# Common dependencies
anyhow = "1.0"
Expand Down
1 change: 1 addition & 0 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ rand = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_yaml = "0.9.13"
tikv-jemallocator = { workspace = true }

[[bench]]
harness = false
Expand Down
2 changes: 1 addition & 1 deletion benches/benches/set/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ pub fn run(c: &mut Criterion) {
run_group_ref(
&mut c.benchmark_group("cfsi"),
"cfsi",
VmBench::new(op::cfsi(1)),
VmBench::new(op::cfsi(0)),
);

{
Expand Down
20 changes: 11 additions & 9 deletions benches/benches/set/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,22 @@ pub fn run(c: &mut Criterion) {
run_group_ref(
&mut c.benchmark_group("mcpi"),
"mcpi",
VmBench::new(op::mcpi(0x10, RegId::ZERO, 4000)).with_prepare_script(vec![
op::movi(0x11, 4000),
op::aloc(0x11),
op::move_(0x10, RegId::HP),
]),
VmBench::new(op::mcpi(0x10, RegId::ZERO, Imm12::MAX.to_u16()))
.with_prepare_script(vec![
op::movi(0x11, Imm12::MAX.to_u16() as u32),
op::aloc(0x11),
op::move_(0x10, RegId::HP),
]),
);

let mut mem_meq = c.benchmark_group("meq");
for i in &linear {
mem_meq.throughput(Throughput::Bytes(*i as u64));
let i = *i as u64;
mem_meq.throughput(Throughput::Bytes(i));

let mut prepare_script = vec![op::movi(0x11, 0)];
prepare_script.extend(set_full_word(0x12, (i * 3) as u64));
prepare_script.extend(set_full_word(0x13, (*i) as u64));
let mut prepare_script =
vec![op::move_(0x11, RegId::SP), op::move_(0x12, RegId::SP)];
prepare_script.extend(set_full_word(0x13, i));

run_group_ref(
&mut mem_meq,
Expand Down
4 changes: 4 additions & 0 deletions benches/benches/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ use fuel_core_storage::transactional::Transaction;
use fuel_core_types::fuel_asm::Instruction;
use set::*;

// Use Jemalloc during benchmarks
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

pub fn run_group_ref<I>(group: &mut BenchmarkGroup<WallTime>, id: I, bench: VmBench)
where
I: AsRef<str>,
Expand Down
14 changes: 11 additions & 3 deletions benches/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ use fuel_core_types::{
fuel_tx::*,
fuel_types::BlockHeight,
fuel_vm::{
checked_transaction::builder::TransactionBuilderExt,
checked_transaction::{
EstimatePredicates,
IntoChecked,
},
consts::*,
interpreter::diff,
*,
Expand Down Expand Up @@ -375,14 +378,19 @@ impl TryFrom<VmBench> for VmBenchPrepared {
tx.add_witness(w);
});

// add at least one coin input
tx.add_random_fee_input();

let mut p = params;
p.gas_per_byte = 0;
let tx = tx
let mut tx = tx
.gas_price(gas_price)
.gas_limit(gas_limit)
.maturity(maturity)
.with_params(p)
.finalize_checked(height, &Default::default());
.finalize();
tx.estimate_predicates(&p, &GasCosts::free()).unwrap();
let tx = tx.into_checked(height, &p, &GasCosts::free()).unwrap();

let mut txtor = Transactor::new(db, params, GasCosts::free());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/chain-config/src/config.rs
assertion_line: 91
expression: json
---
{
Expand Down Expand Up @@ -32,17 +31,17 @@ expression: json
"aloc": 1,
"and": 1,
"andi": 1,
"bal": 21,
"bal": 22,
"bhei": 1,
"bhsh": 1,
"burn": 35,
"cb": 2,
"burn": 126,
"cb": 1,
"cfei": 1,
"cfsi": 1,
"croo": 28,
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1703,
"ecr": 1592,
"eq": 1,
"exp": 1,
"expi": 1,
Expand All @@ -61,13 +60,13 @@ expression: json
"jnzb": 1,
"jnef": 1,
"jneb": 1,
"k256": 19,
"k256": 16,
"lb": 1,
"log": 40,
"log": 43,
"lt": 1,
"lw": 1,
"mcpi": 3,
"mint": 35,
"mint": 127,
"mlog": 1,
"mod": 1,
"modi": 1,
Expand All @@ -76,92 +75,92 @@ expression: json
"mroo": 2,
"mul": 1,
"muli": 1,
"mldv": 2,
"mldv": 1,
"noop": 1,
"not": 1,
"or": 1,
"ori": 1,
"ret_contract": 61,
"rvrt_contract": 61,
"s256": 5,
"ret_contract": 63,
"rvrt_contract": 65,
"s256": 4,
"sb": 1,
"scwq": 11,
"scwq": 23,
"sll": 1,
"slli": 1,
"srl": 1,
"srli": 1,
"srw": 23,
"srw": 21,
"sub": 1,
"subi": 1,
"sw": 1,
"sww": 79,
"swwq": 72,
"sww": 67,
"swwq": 68,
"time": 1,
"tr": 120,
"tro": 99,
"wdcm": 2,
"wqcm": 4,
"wdop": 2,
"wqop": 4,
"wdml": 2,
"wqml": 4,
"wddv": 4,
"wqdv": 8,
"wdmd": 5,
"wqmd": 10,
"wdam": 2,
"tr": 255,
"tro": 196,
"wdcm": 1,
"wqcm": 1,
"wdop": 1,
"wqop": 1,
"wdml": 1,
"wqml": 2,
"wddv": 2,
"wqdv": 3,
"wdmd": 4,
"wqmd": 7,
"wdam": 3,
"wqam": 4,
"wdmm": 4,
"wqmm": 8,
"wqmm": 4,
"xor": 1,
"xori": 1,
"call": {
"base": 116,
"dep_per_unit": 14
"base": 173,
"dep_per_unit": 180
},
"ccp": {
"base": 24,
"dep_per_unit": 13
"base": 22,
"dep_per_unit": 152
},
"csiz": {
"base": 17,
"dep_per_unit": 15
"base": 16,
"dep_per_unit": 868
},
"ldc": {
"base": 23,
"dep_per_unit": 14
"base": 22,
"dep_per_unit": 150
},
"logd": {
"base": 46,
"dep_per_unit": 19
"base": 48,
"dep_per_unit": 18
},
"mcl": {
"base": 1,
"dep_per_unit": 2359
"dep_per_unit": 2503
},
"mcli": {
"base": 1,
"dep_per_unit": 2322
"dep_per_unit": 2559
},
"mcp": {
"base": 1,
"dep_per_unit": 1235
"dep_per_unit": 1301
},
"meq": {
"base": 1,
"dep_per_unit": 2343
"dep_per_unit": 1747
},
"retd_contract": {
"base": 65,
"dep_per_unit": 19
"base": 71,
"dep_per_unit": 18
},
"smo": {
"base": 84,
"dep_per_unit": 13
"base": 207,
"dep_per_unit": 18
},
"srwq": {
"base": 54,
"dep_per_unit": 2
"base": 44,
"dep_per_unit": 5
}
},
"consensus": {
Expand Down
Loading
Loading