Skip to content

Commit

Permalink
Bump fuel-vm to 0.35.0 version (#1256)
Browse files Browse the repository at this point in the history
The PR uses the latest `fuel-vm 0.35.0`. It affects the `fuel-core` in
the next way:
- Removes support for `OpaqueReceipt` transaction
- Adds new opcodes `eck1`, `ecr1`, `ed19`
- Adds new `Receipt::Mint` and `Receipt::Burn`

---------

Co-authored-by: Brandon Kite <[email protected]>
  • Loading branch information
xgreenx and Voxelot authored Jul 14, 2023
1 parent d6654c6 commit ed82fb4
Show file tree
Hide file tree
Showing 31 changed files with 278 additions and 81 deletions.
55 changes: 40 additions & 15 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.1", package = "fuel-vm" }
fuel-vm-private = { version = "0.35.0", package = "fuel-vm" }

# Common dependencies
anyhow = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/set/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,14 @@ pub fn run(c: &mut Criterion) {
run_group_ref(
&mut c.benchmark_group("mint"),
"mint",
VmBench::contract(rng, op::mint(RegId::ZERO))
VmBench::contract(rng, op::mint(RegId::ZERO, RegId::ZERO))
.expect("failed to prepare contract"),
);

run_group_ref(
&mut c.benchmark_group("burn"),
"burn",
VmBench::contract(rng, op::mint(RegId::ZERO))
VmBench::contract(rng, op::mint(RegId::ZERO, RegId::ZERO))
.expect("failed to prepare contract"),
);

Expand Down
6 changes: 3 additions & 3 deletions benches/benches/set/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ pub fn run(c: &mut Criterion) {
let signature = Signature::sign(&secret, &message);

run_group_ref(
&mut c.benchmark_group("ecr"),
"ecr",
VmBench::new(op::ecr(0x11, 0x20, 0x21))
&mut c.benchmark_group("eck1"),
"eck1",
VmBench::new(op::eck1(0x11, 0x20, 0x21))
.with_prepare_script(vec![
op::gtf_args(0x20, 0x00, GTFArgs::ScriptData),
op::addi(0x21, 0x20, signature.as_ref().len().try_into().unwrap()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ expression: json
"croo": 20,
"div": 1,
"divi": 1,
"ecr": 1592,
"eck1": 1592,
"ecr1": 3000,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
Expand Down
8 changes: 6 additions & 2 deletions crates/client/assets/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ type GasCosts {
croo: U64!
div: U64!
divi: U64!
ecr: U64!
ecr1: U64!
eck1: U64!
ed19: U64!
eq: U64!
exp: U64!
expi: U64!
Expand Down Expand Up @@ -701,14 +703,14 @@ type Receipt {
rd: U64
len: U64
receiptType: ReceiptType!
rawPayload: HexString!
result: U64
gasUsed: U64
data: HexString
sender: Address
recipient: Address
nonce: Nonce
contractId: ContractId
subId: Bytes32
}

enum ReceiptType {
Expand All @@ -723,6 +725,8 @@ enum ReceiptType {
TRANSFER_OUT
SCRIPT_RESULT
MESSAGE_OUT
MINT
BURN
}

enum ReturnType {
Expand Down
4 changes: 3 additions & 1 deletion crates/client/src/client/schema/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ pub struct GasCosts {
pub croo: U64,
pub div: U64,
pub divi: U64,
pub ecr: U64,
pub eck1: U64,
pub ecr1: U64,
pub ed19: U64,
pub eq: U64,
pub exp: U64,
pub expi: U64,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/client/src/client/schema/chain.rs
assertion_line: 189
expression: operation.query
---
query {
Expand Down Expand Up @@ -71,7 +70,9 @@ query {
croo
div
divi
ecr
eck1
ecr1
ed19
eq
exp
expi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ mutation($tx: HexString!, $utxoValidation: Boolean) {
recipient
nonce
contractId
subId
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,38 @@ query($id: TransactionId!) {
transaction(id: $id) {
rawPayload
receipts {
rawPayload
param1
param2
amount
assetId
gas
digest
contract {
id
}
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to {
id
}
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
status {
__typename
Expand Down
Loading

0 comments on commit ed82fb4

Please sign in to comment.