Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5545d7c
Add blob tx support
Dentosal Jun 26, 2024
9e4c221
Add changelog entry
Dentosal Jun 26, 2024
97592f6
Merge branch 'master' into dento/blob-tx
Dentosal Jun 26, 2024
e7d724e
FIx changelog after merge
Dentosal Jun 26, 2024
bd4aae7
Merge branch 'master' into dento/blob-tx
Dentosal Jul 11, 2024
c3cba47
fmt
Dentosal Jul 11, 2024
d8ea550
Update benches to use the LDCv1
Dentosal Jul 26, 2024
d137b4b
Update crates/fuel-core/src/schema/dap.rs
Dentosal Jul 29, 2024
b9c610e
Merge branch 'master' into dento/blob-tx
Dentosal Jul 29, 2024
266a474
Update to fuel-vm 0.56.0 proper
Dentosal Jul 29, 2024
968781d
Add regenesis support for blobs
Dentosal Jul 29, 2024
bae0a87
Fix issues with exporting tables
Dentosal Jul 29, 2024
2260d80
Update changelog
Dentosal Jul 29, 2024
f30853b
Add tests for blob uploading and access
Dentosal Jul 29, 2024
ebfc6a9
Cleanup
Dentosal Jul 29, 2024
b07688f
Move an import to comply with feature flags
Dentosal Jul 29, 2024
7b3d3ad
Fix link to BlobData table
Dentosal Jul 29, 2024
0fe1e1f
Fix JSON snapshot merging
Dentosal Jul 29, 2024
71b7e88
Fix backwards compatibility for chainconfig fields
Dentosal Jul 29, 2024
819d77e
Update GraphQL schema with new gas costs
Dentosal Jul 29, 2024
550cee7
Gas price API fix
Dentosal Jul 29, 2024
6c66c45
Clippy
Dentosal Jul 29, 2024
2f4393a
Update local configs to match
Dentosal Jul 29, 2024
de85def
More "fun" with gas and snapshots
Dentosal Jul 29, 2024
68cb46f
Typo removal
Dentosal Jul 29, 2024
a0bdfcc
Comply better with G/W/T ordering
Dentosal Jul 30, 2024
1c6fb2d
Remove unused import
Dentosal Jul 30, 2024
b4fb62e
Detect and show errors in produce_block_with_tx
Dentosal Jul 30, 2024
15cbafb
Update state transition bytecode
Dentosal Jul 30, 2024
baae7f5
Address some of the PR feedback
Dentosal Jul 30, 2024
ebe4c21
ed19_dependent_cost
Dentosal Jul 30, 2024
9555ef9
add blobs to roundtrip json/parquet encoding/decoding tests
segfault-magnet Aug 1, 2024
eb454c2
Merge branch 'master' into dento/blob-tx
Voxelot Aug 1, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

### Added
- [#1988](https://github.com/FuelLabs/fuel-core/pull/1988): Updated `fuel-vm` to `0.56.0` ([release notes](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.55.0)). Adds Blob transaction support.
- [1983](https://github.com/FuelLabs/fuel-core/pull/1983): Add adapters for gas price service for accessing database values

### Breaking
Expand Down
32 changes: 16 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 @@ -85,7 +85,7 @@ fuel-core-xtask = { version = "0.0.0", path = "./xtask" }
fuel-gas-price-algorithm = { version = "0.31.0", path = "crates/fuel-gas-price-algorithm" }

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

# Common dependencies
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion benches/benches-outputs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use fuel_core_types::fuel_tx::{
consensus_parameters::gas::GasCostsValuesV3,
consensus_parameters::gas::GasCostsValuesV4,
DependentCost,
GasCostsValues,
};
Expand Down
2 changes: 1 addition & 1 deletion benches/benches/block_target_gas_set/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ pub fn run_contract(group: &mut BenchmarkGroup<WallTime>) {
let mut instructions = setup_instructions();
instructions.extend(vec![
op::movi(0x13, size),
op::ldc(CONTRACT_ID_REGISTER, RegId::ZERO, 0x13),
op::ldc(CONTRACT_ID_REGISTER, RegId::ZERO, 0x13, 0),
op::jmpb(RegId::ZERO, 0),
]);
let id = format!("contract/ldc {:?}", size);
Expand Down
71 changes: 37 additions & 34 deletions benches/benches/block_target_gas_set/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,43 +97,46 @@ pub fn run_crypto(group: &mut BenchmarkGroup<WallTime>) {
.collect(),
);

let message = Message::new(b"foo");
let ed19_secret = ed25519_dalek::SigningKey::generate(&mut rand::rngs::OsRng {});
let ed19_signature = ed19_secret.sign(&*message);

run(
"crypto/ed19 opcode",
group,
vec![
op::gtf_args(0x20, 0x00, GTFArgs::ScriptData),
op::addi(
0x21,
0x20,
ed19_secret
.verifying_key()
.as_ref()
.len()
.try_into()
.unwrap(),
),
op::addi(
0x22,
0x21,
ed19_signature.to_bytes().len().try_into().unwrap(),
),
op::addi(0x22, 0x21, message.as_ref().len().try_into().unwrap()),
op::ed19(0x20, 0x21, 0x22),
op::jmpb(RegId::ZERO, 0),
],
ed19_secret
.verifying_key()
.to_bytes()
.iter()
.copied()
.chain(ed19_signature.to_bytes())
.chain(message.as_ref().iter().copied())
.collect(),
);
for i in arb_dependent_cost_values() {
let id = format!("crypto/ed19 opcode {:?}", i);
let message = vec![1u8; i as usize];
run(
&id,
group,
vec![
op::gtf_args(0x20, 0x00, GTFArgs::ScriptData),
op::addi(
0x21,
0x20,
ed19_secret
.verifying_key()
.as_ref()
.len()
.try_into()
.unwrap(),
),
op::addi(
0x22,
0x21,
ed19_signature.to_bytes().len().try_into().unwrap(),
),
op::movi(0x23, message.len().try_into().unwrap()),
op::ed19(0x20, 0x21, 0x22, 0x23),
op::jmpb(RegId::ZERO, 0),
],
ed19_secret
.verifying_key()
.to_bytes()
.iter()
.copied()
.chain(ed19_signature.to_bytes())
.chain(message.iter().copied())
.collect(),
);
}

for i in arb_dependent_cost_values() {
let id = format!("crypto/s256 opcode {:?}", i);
Expand Down
2 changes: 1 addition & 1 deletion benches/benches/vm_set/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ pub fn run(c: &mut Criterion) {
run_group_ref(
&mut ldc,
format!("{i}"),
VmBench::new(op::ldc(0x10, RegId::ZERO, 0x13))
VmBench::new(op::ldc(0x10, RegId::ZERO, 0x13, 0))
.with_contract_code(code)
.with_data(data)
.with_prepare_script(prepare_script),
Expand Down
67 changes: 37 additions & 30 deletions benches/benches/vm_set/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,37 +114,44 @@ pub fn run(c: &mut Criterion) {
let ed19_secret = ed25519_dalek::SigningKey::generate(&mut rand::rngs::OsRng {});
let ed19_signature = ed19_secret.sign(&*message);

run_group_ref(
&mut c.benchmark_group("ed19"),
"ed19",
VmBench::new(op::ed19(0x20, 0x21, 0x22))
.with_prepare_script(vec![
op::gtf_args(0x20, 0x00, GTFArgs::ScriptData),
op::addi(
0x21,
0x20,
let mut bench_ed19 = c.benchmark_group("ed19");
for i in &linear {
bench_ed19.throughput(Throughput::Bytes(*i as u64));
run_group_ref(
&mut bench_ed19,
format!("{i}"),
VmBench::new(op::ed19(0x20, 0x21, RegId::ZERO, 0x10))
.with_prepare_script(vec![
op::gtf_args(0x20, 0x00, GTFArgs::ScriptData),
op::addi(
0x21,
0x20,
ed19_secret
.verifying_key()
.as_bytes()
.len()
.try_into()
.unwrap(),
),
op::addi(
0x22,
0x21,
ed19_signature.to_bytes().len().try_into().unwrap(),
),
op::movi(0x10, *i),
op::cfe(0x10),
])
.with_data(
ed19_secret
.verifying_key()
.as_bytes()
.len()
.try_into()
.unwrap(),
),
op::addi(
0x22,
0x21,
ed19_signature.to_bytes().len().try_into().unwrap(),
.to_bytes()
.iter()
.chain(ed19_signature.to_bytes().iter())
.chain(message.iter())
.copied()
.collect(),
),
])
.with_data(
ed19_secret
.verifying_key()
.to_bytes()
.iter()
.chain(ed19_signature.to_bytes().iter())
.chain(message.iter())
.copied()
.collect(),
),
);
);
}
bench_ed19.finish();
}
6 changes: 3 additions & 3 deletions benches/src/bin/collect.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clap::Parser;
use fuel_core_types::fuel_tx::{
consensus_parameters::gas::GasCostsValuesV3,
consensus_parameters::gas::GasCostsValuesV4,
ConsensusParameters,
GasCosts,
};
Expand Down Expand Up @@ -371,7 +371,7 @@ pub const GIT: &str = ""#,
r#"";"#,
r##"
pub fn default_gas_costs() -> GasCostsValues {
GasCostsValuesV3 {"##,
GasCostsValuesV4 {"##,
r##" }.into()
}
"##,
Expand Down Expand Up @@ -495,7 +495,7 @@ impl State {
)
}

fn to_gas_costs(&self) -> GasCostsValuesV3 {
fn to_gas_costs(&self) -> GasCostsValuesV4 {
serde_yaml::from_value(self.to_yaml()).unwrap()
}

Expand Down
17 changes: 14 additions & 3 deletions benches/src/default_gas_costs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;
use fuel_core_types::fuel_tx::consensus_parameters::gas::GasCostsValuesV3;
use fuel_core_types::fuel_tx::consensus_parameters::gas::GasCostsValuesV4;
pub fn default_gas_costs() -> GasCostsValues {
GasCostsValuesV3 {
GasCostsValuesV4 {
add: 2,
addi: 2,
and: 2,
Expand All @@ -16,7 +16,6 @@ pub fn default_gas_costs() -> GasCostsValues {
divi: 2,
eck1: 1907,
ecr1: 26135,
ed19: 1893,
eq: 2,
exp: 2,
expi: 2,
Expand Down Expand Up @@ -95,6 +94,14 @@ pub fn default_gas_costs() -> GasCostsValues {
base: 2,
units_per_gas: 15,
},
bldd: DependentCost::LightOperation {
base: 15,
units_per_gas: 272,
},
bsiz: DependentCost::LightOperation {
base: 17,
units_per_gas: 790,
},
cfe: DependentCost::LightOperation {
base: 10,
units_per_gas: 1818181,
Expand All @@ -119,6 +126,10 @@ pub fn default_gas_costs() -> GasCostsValues {
base: 31,
units_per_gas: 438,
},
ed19: DependentCost::LightOperation {
base: 3000,
units_per_gas: 214,
},
k256: DependentCost::LightOperation {
base: 27,
units_per_gas: 5,
Expand Down
Loading