Skip to content

Commit 68afb22

Browse files
authored
chore(deps): bump to latest tempo main (#413)
1 parent f5e6736 commit 68afb22

22 files changed

Lines changed: 873 additions & 839 deletions

Cargo.lock

Lines changed: 560 additions & 616 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -78,79 +78,79 @@ codegen-units = 1
7878

7979
[workspace.dependencies]
8080
# tempo (from upstream)
81-
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4" }
82-
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
83-
tempo-consensus = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
84-
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false, features = ["serde"] }
85-
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
86-
tempo-node = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4" }
87-
tempo-payload-types = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
88-
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
89-
tempo-precompiles-macros = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4" }
90-
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false, features = [
81+
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651" }
82+
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
83+
tempo-consensus = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
84+
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false, features = ["serde"] }
85+
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
86+
tempo-node = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651" }
87+
tempo-payload-types = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
88+
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
89+
tempo-precompiles-macros = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651" }
90+
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false, features = [
9191
"reth",
9292
"serde",
9393
"serde-bincode-compat",
9494
"reth-codec",
9595
] }
96-
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
97-
tempo-transaction-pool = { git = "https://github.com/tempoxyz/tempo", rev = "e331e2f488a368ea9ca76c422e12fedbfb6eb3b4", default-features = false }
96+
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
97+
tempo-transaction-pool = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb905b6ee13fafe046aa9531aea2cdf60651", default-features = false }
9898

9999
# zones
100100
zone-precompiles = { path = "crates/precompiles", default-features = false }
101101
zone-primitives = { path = "crates/primitives", default-features = false }
102102
zone-rpc = { path = "crates/rpc" }
103103

104104
# reth
105-
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
106-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
107-
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
108-
reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
109-
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
110-
reth-errors = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
111-
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
112-
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
113-
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
114-
reth-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
115-
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
116-
reth-node-api = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
117-
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
118-
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
119-
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
120-
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
121-
reth-primitives-traits = { version = "0.1.0", default-features = false }
122-
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
123-
reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0", features = [
105+
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
106+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
107+
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
108+
reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
109+
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
110+
reth-errors = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
111+
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
112+
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
113+
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
114+
reth-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
115+
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
116+
reth-node-api = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
117+
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
118+
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
119+
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
120+
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
121+
reth-primitives-traits = { version = "0.3.0", default-features = false }
122+
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
123+
reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057", features = [
124124
"std",
125125
"optional-checks",
126126
] }
127-
reth-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
128-
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
129-
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
130-
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
131-
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
132-
reth-tasks = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
133-
reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
134-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "7f4a9a0" }
135-
revm = { version = "36.0.0", features = ["optional_fee_charge"] }
127+
reth-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
128+
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
129+
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
130+
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
131+
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
132+
reth-tasks = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
133+
reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
134+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "0b33057" }
135+
revm = { version = "37.0.0", features = ["optional_fee_charge"], default-features = false }
136136

137137
# alloy
138-
alloy = { version = "1.6.1", default-features = false }
139-
alloy-consensus = { version = "1.6.1", default-features = false }
140-
alloy-contract = { version = "1.6.1", default-features = false }
141-
alloy-eips = { version = "1.8.3", default-features = false }
142-
alloy-evm = "0.29.2"
143-
alloy-network = { version = "1.6.1", default-features = false }
138+
alloy = { version = "2.0.0", default-features = false }
139+
alloy-consensus = { version = "2.0.0", default-features = false }
140+
alloy-contract = { version = "2.0.0", default-features = false }
141+
alloy-eips = { version = "2.0.0", default-features = false }
142+
alloy-evm = { version = "0.32.0", default-features = false }
143+
alloy-network = { version = "2.0.0", default-features = false }
144144
alloy-primitives = { version = "1.5.7", default-features = false }
145-
alloy-provider = { version = "1.6.1", default-features = false }
146-
alloy-rlp = { version = "0.3.13", default-features = false }
147-
alloy-rpc-client = "1.6.1"
148-
alloy-rpc-types-engine = "1.8.3"
149-
alloy-rpc-types-eth = { version = "1.8.3" }
150-
alloy-signer = "1.6.1"
151-
alloy-signer-local = "1.6.1"
145+
alloy-provider = { version = "2.0.0", default-features = false }
146+
alloy-rlp = { version = "0.3.15", default-features = false }
147+
alloy-rpc-client = "2.0.0"
148+
alloy-rpc-types-engine = "2.0.0"
149+
alloy-rpc-types-eth = { version = "2.0.0" }
150+
alloy-signer = "2.0.0"
151+
alloy-signer-local = "2.0.0"
152152
alloy-sol-types = { version = "1.5.7", default-features = false }
153-
alloy-transport = "1.6.1"
153+
alloy-transport = "2.0.0"
154154

155155
# commonware
156156
commonware-codec = "2026.2.0"

crates/precompiles/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ tempo-contracts = { workspace = true, default-features = false }
2020
tempo-precompiles = { workspace = true, default-features = false }
2121
tempo-precompiles-macros.workspace = true
2222

23-
# alloy (direct versions for no_std — workspace versions have default-features = true)
24-
alloy = { version = "1.6.1", default-features = false }
25-
alloy-evm = { version = "0.29.2", default-features = false }
26-
alloy-primitives = { version = "1.5.7", default-features = false }
27-
alloy-sol-types = { version = "1.5.7", default-features = false }
23+
# alloy
24+
alloy = { workspace = true, default-features = false }
25+
alloy-evm = { workspace = true, default-features = false }
26+
alloy-primitives = { workspace = true, default-features = false }
27+
alloy-sol-types = { workspace = true, default-features = false }
2828

2929
# revm
30-
revm = { version = "36.0.0", default-features = false }
30+
revm = { workspace = true, default-features = false }
3131

3232
# crypto
3333
aes-gcm = { version = "0.10.3", default-features = false, features = ["aes", "alloc"] }

crates/precompiles/src/aes_gcm.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use aes_gcm::{
1616
use alloy_evm::precompiles::{DynPrecompile, Precompile, PrecompileInput};
1717
use alloy_primitives::{Address, Bytes, address};
1818
use alloy_sol_types::SolCall;
19-
use revm::precompile::{PrecompileError, PrecompileId, PrecompileOutput, PrecompileResult};
19+
use revm::precompile::{PrecompileId, PrecompileOutput, PrecompileResult};
2020
use tracing::{debug, warn};
2121

2222
/// AES-256-GCM Decrypt precompile address on Zone L2.
@@ -57,19 +57,21 @@ impl Precompile for AesGcmDecrypt {
5757
fn call(&self, input: PrecompileInput<'_>) -> PrecompileResult {
5858
let data = input.data;
5959
if data.len() < 4 {
60-
return Ok(PrecompileOutput::new_reverted(0, Bytes::new()));
60+
return Ok(PrecompileOutput::revert(0, Bytes::new(), input.reservoir));
6161
}
6262

6363
let selector: [u8; 4] = data[..4].try_into().expect("len >= 4");
6464
if selector != decryptCall::SELECTOR {
6565
warn!(target: "zone::precompile", ?selector, "AesGcmDecrypt: unknown selector");
66-
return Ok(PrecompileOutput::new_reverted(0, Bytes::new()));
66+
return Ok(PrecompileOutput::revert(0, Bytes::new(), input.reservoir));
6767
}
6868

6969
debug!(target: "zone::precompile", "AesGcmDecrypt: decrypt");
7070

71-
let call = decryptCall::abi_decode(data)
72-
.map_err(|_| PrecompileError::other("ABI decode failed"))?;
71+
let call = match decryptCall::abi_decode(data) {
72+
Ok(call) => call,
73+
Err(_) => return Ok(PrecompileOutput::revert(0, Bytes::new(), input.reservoir)),
74+
};
7375

7476
let gas = AES_GCM_BASE_GAS + AES_GCM_PER_BYTE_GAS * call.ciphertext.len() as u64;
7577

@@ -86,7 +88,7 @@ impl Precompile for AesGcmDecrypt {
8688
valid,
8789
};
8890
let encoded = decryptCall::abi_encode_returns(&ret);
89-
Ok(PrecompileOutput::new(gas, encoded.into()))
91+
Ok(PrecompileOutput::new(gas, encoded.into(), input.reservoir))
9092
}
9193
}
9294

crates/precompiles/src/chaum_pedersen.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use k256::{
2020
sec1::{FromEncodedPoint, ToEncodedPoint},
2121
},
2222
};
23-
use revm::precompile::{PrecompileError, PrecompileId, PrecompileOutput, PrecompileResult};
23+
use revm::precompile::{PrecompileId, PrecompileOutput, PrecompileResult};
2424
use tracing::{debug, warn};
2525

2626
/// Chaum-Pedersen Verify precompile address on Zone L2.
@@ -73,19 +73,21 @@ impl Precompile for ChaumPedersenVerify {
7373
fn call(&self, input: PrecompileInput<'_>) -> PrecompileResult {
7474
let data = input.data;
7575
if data.len() < 4 {
76-
return Ok(PrecompileOutput::new_reverted(0, Bytes::new()));
76+
return Ok(PrecompileOutput::revert(0, Bytes::new(), input.reservoir));
7777
}
7878

7979
let selector: [u8; 4] = data[..4].try_into().expect("len >= 4");
8080
if selector != verifyProofCall::SELECTOR {
8181
warn!(target: "zone::precompile", ?selector, "ChaumPedersenVerify: unknown selector");
82-
return Ok(PrecompileOutput::new_reverted(0, Bytes::new()));
82+
return Ok(PrecompileOutput::revert(0, Bytes::new(), input.reservoir));
8383
}
8484

8585
debug!(target: "zone::precompile", "ChaumPedersenVerify: verifyProof");
8686

87-
let call = verifyProofCall::abi_decode(data)
88-
.map_err(|_| PrecompileError::other("ABI decode failed"))?;
87+
let call = match verifyProofCall::abi_decode(data) {
88+
Ok(call) => call,
89+
Err(_) => return Ok(PrecompileOutput::revert(0, Bytes::new(), input.reservoir)),
90+
};
8991

9092
let valid = verify_chaum_pedersen(
9193
&call.ephemeralPubX.0,
@@ -99,7 +101,11 @@ impl Precompile for ChaumPedersenVerify {
99101
);
100102

101103
let encoded = verifyProofCall::abi_encode_returns(&valid);
102-
Ok(PrecompileOutput::new(CP_VERIFY_GAS, encoded.into()))
104+
Ok(PrecompileOutput::new(
105+
CP_VERIFY_GAS,
106+
encoded.into(),
107+
input.reservoir,
108+
))
103109
}
104110
}
105111

crates/precompiles/src/ecies.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ pub fn compute_ecdh_proof(
9393
Some(EcdhProofResult {
9494
shared_secret: B256::from(shared_secret_x),
9595
shared_secret_y_parity,
96-
cp_proof_s: B256::from(s.to_repr().as_ref()),
97-
cp_proof_c: B256::from(c.to_repr().as_ref()),
96+
cp_proof_s: B256::from_slice(s.to_repr().as_ref()),
97+
cp_proof_c: B256::from_slice(c.to_repr().as_ref()),
9898
})
9999
}
100100

crates/precompiles/src/tip20_factory.rs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
//! Only [`ZONE_INBOX_ADDRESS`] may call this precompile; all other callers are
1515
//! reverted with `OnlyZoneInbox()`.
1616
17-
use alloc::format;
18-
1917
use alloy_primitives::{Address, Bytes};
2018
use alloy_sol_types::{SolCall, SolError};
21-
use revm::precompile::{PrecompileError, PrecompileOutput, PrecompileResult};
19+
use revm::precompile::PrecompileResult;
2220
use tempo_precompiles::{
2321
PATH_USD_ADDRESS, Precompile as TempoPrecompile, TIP20_FACTORY_ADDRESS,
2422
tip20::{ISSUER_ROLE, TIP20Token},
@@ -98,15 +96,17 @@ impl ZoneTokenFactory {
9896
PrecompileId::Custom("ZoneTokenFactory".into()),
9997
move |input| {
10098
if !input.is_direct_call() {
101-
return Ok(PrecompileOutput::new_reverted(
99+
return Ok(PrecompileOutput::revert(
102100
0,
103101
SolError::abi_encode(&DelegateCallNotAllowed {}).into(),
102+
input.reservoir,
104103
));
105104
}
106105

107106
let mut storage = EvmPrecompileStorageProvider::new(
108107
input.internals,
109108
input.gas,
109+
input.reservoir,
110110
spec,
111111
input.is_static,
112112
gas_params.clone(),
@@ -120,19 +120,21 @@ impl ZoneTokenFactory {
120120

121121
impl TempoPrecompile for ZoneTokenFactory {
122122
fn call(&mut self, calldata: &[u8], msg_sender: Address) -> PrecompileResult {
123+
let storage = tempo_precompiles::storage::StorageCtx;
124+
123125
if msg_sender != ZONE_INBOX_ADDRESS {
124-
return Ok(PrecompileOutput::new_reverted(
125-
0,
126-
OnlyZoneInbox {}.abi_encode().into(),
127-
));
126+
return Ok(storage.revert_output(OnlyZoneInbox {}.abi_encode().into()));
128127
}
129128

130-
let call = enableTokenCall::abi_decode(calldata)
131-
.map_err(|_| PrecompileError::other("ABI decode failed"))?;
129+
let call = match enableTokenCall::abi_decode(calldata) {
130+
Ok(call) => call,
131+
Err(_) => return Ok(storage.revert_output(Bytes::new())),
132+
};
132133

133-
self.enable_token(call)
134-
.map_err(|e| PrecompileError::other(format!("{e}")))?;
134+
if let Err(err) = self.enable_token(call) {
135+
return storage.error_result(err);
136+
}
135137

136-
Ok(PrecompileOutput::new(0, Bytes::new()))
138+
Ok(storage.success_output(Bytes::new()))
137139
}
138140
}

0 commit comments

Comments
 (0)