Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
91af5ba
init reconstruct
lightsing Oct 7, 2023
94a09a8
add StackPopOnlyOpcode
lightsing Oct 7, 2023
1fa6145
impl arthmetic opcode stack output
lightsing Oct 7, 2023
e54f3ed
impl get block header field opcode
lightsing Oct 8, 2023
b80d86a
impl blockhash
lightsing Oct 8, 2023
675bb28
impl PC, MSIZE, GAS
lightsing Oct 8, 2023
94ae09f
remove StackOnlyOpcode
lightsing Oct 8, 2023
2807586
add strict check
lightsing Oct 8, 2023
f2efe91
impl PUSHn
lightsing Oct 8, 2023
9ad25a0
impl Address
lightsing Oct 8, 2023
49be48c
cleanup stack usage
lightsing Oct 9, 2023
1ac20fc
impl ORIGIN
lightsing Oct 9, 2023
d1c970c
use prestate
lightsing Oct 13, 2023
1af14aa
rename to enable-stack
lightsing Oct 17, 2023
1e19026
cleanup stack usage
lightsing Oct 18, 2023
20a9185
disable trace_tests
lightsing Oct 18, 2023
332b186
fix and add assert
lightsing Oct 19, 2023
5279b69
fix doc test
lightsing Oct 19, 2023
c6cbfbd
fix cfg
lightsing Oct 19, 2023
fd79956
Merge branch 'develop' into feat/stack-reconstruct
lightsing Oct 31, 2023
6b2ad38
use callTracer
lightsing Nov 9, 2023
f083cc1
do not parse call when is_precheck not ok
lightsing Nov 14, 2023
50ebc44
do not parse call in create precheck not ok
lightsing Nov 14, 2023
0cbed73
fix offset
lightsing Nov 14, 2023
4e5a97c
fix compile
lightsing Nov 14, 2023
909a5e7
disable tracer_tests
lightsing Nov 14, 2023
e081e2e
fix test
lightsing Nov 14, 2023
3ebc850
fix caller_address
lightsing Nov 14, 2023
ad13923
fix parse_call
lightsing Nov 14, 2023
781c083
silent more fields
lightsing Nov 14, 2023
b514744
unbound recursion
lightsing Nov 14, 2023
059424c
Merge branch 'develop' into feat/stack-reconstruct
lightsing Nov 15, 2023
8fceb1b
Merge branch 'develop' into calltracer
lightsing Nov 15, 2023
7e0d7db
Merge branch 'develop' into feat/stack-reconstruct
lightsing Nov 15, 2023
631c837
remove stack usage
lightsing Nov 16, 2023
841575d
update LoggerConfig
lightsing Nov 16, 2023
524bbb5
cleanup
lightsing Nov 16, 2023
b4c5578
fix root
lightsing Nov 16, 2023
0a157e5
fix test
lightsing Nov 16, 2023
8389092
fix doc test
lightsing Nov 16, 2023
28ff550
cleanup
lightsing Nov 16, 2023
cd99f3a
upgrade geth version
lightsing Nov 16, 2023
b6f0eaf
add feature switch
lightsing Nov 17, 2023
51cd8bf
add missing
lightsing Nov 20, 2023
ea9fa0a
Merge branch 'develop' into feat/feature-switch
lightsing Nov 22, 2023
1002dfd
add call tracer and prestate tracer
lightsing Nov 23, 2023
e3f284d
handle precheck failed call
lightsing Nov 23, 2023
c3462b0
why ignore not working
lightsing Nov 23, 2023
87e0a80
Merge branch 'develop' into feat/more-tracer
lightsing Nov 24, 2023
1a43b24
Merge branch 'develop' into feat/more-tracer
lightsing Nov 25, 2023
bfdf777
impl arithmetic/environment opcodes
lightsing Nov 27, 2023
8eadba8
Merge branch 'feat/arithmetic-opcode' into feat/remove-tsack
lightsing Nov 27, 2023
b419d1d
save
lightsing Nov 27, 2023
ce1a983
add l2 prestate
lightsing Nov 27, 2023
662e146
use go1.20
lightsing Nov 27, 2023
69dfd11
Merge branch 'feat/more-tracer' into feat/remove-stack
lightsing Nov 27, 2023
7cce89e
fix
lightsing Nov 27, 2023
741ab3a
0x5c/5e assigned by cankun
lightsing Nov 27, 2023
0bf2040
Merge branch 'develop' into feat/more-tracer
lightsing Jan 16, 2024
f83fb1e
update l2geth
lightsing Jan 17, 2024
1f8b769
Merge branch 'feat/more-tracer' into feat/stack-reconstruct
lightsing Jan 18, 2024
813e85a
Merge branch 'develop' into feat/stack-reconstruct
lightsing Jan 24, 2024
8ad89c3
fix merge
lightsing Jan 24, 2024
cfb7286
Merge remote-tracking branch 'origin/develop' into feat/stack-reconst…
lightsing Jan 24, 2024
47d5fb9
clippy
lightsing Jan 24, 2024
93a7a2f
fix call trace
lightsing Jan 24, 2024
0a3eecd
fix call trace
lightsing Jan 24, 2024
254a181
Merge remote-tracking branch 'origin/develop' into feat/stack-reconst…
lightsing Jan 26, 2024
7c84b7c
Merge branch 'develop' into feat/stack-reconstruct
lightsing Jan 30, 2024
bed75af
fix merge
lightsing Jan 30, 2024
3c757a2
Merge branch 'feat/stack-reconstruct' into feat/remove-stack
lightsing Jan 30, 2024
2b92e3b
Merge branch 'develop' into feat/remove-stack
lightsing Feb 7, 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 bus-mapping/src/evm/opcodes/callop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ impl<const N_ARGS: usize> Opcode for CallOpcode<N_ARGS> {

let mut oog_step =
ErrorOOGPrecompile::gen_associated_ops(state, &geth_steps[1], callee_call)?;
oog_step.stack_size += 1; // since the return value is pushed on the stack

oog_step.gas_left = Gas(callee_gas_left_with_stipend);
oog_step.gas_cost = GasCost(precompile_call_gas_cost);
Expand Down
3 changes: 1 addition & 2 deletions bus-mapping/src/evm/opcodes/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ impl<const IS_CREATE2: bool> Opcode for Create<IS_CREATE2> {

let tx_id = state.tx_ctx.id();
let caller = state.call()?.clone();

let address = if IS_CREATE2 {
state.create2_address(&geth_steps[0])?
} else {
Expand All @@ -54,8 +55,6 @@ impl<const IS_CREATE2: bool> Opcode for Create<IS_CREATE2> {
let callee = if is_precheck_ok && !is_address_collision {
state.parse_call(geth_step)?
} else {
// if precheck not ok, the call won't appear in call trace since it never happens
// we need to increase the offset and mannually set the is_success
state.tx_ctx.call_is_success_offset += 1;
let mut call = state.parse_call_partial(geth_step)?;
call.is_success = false;
Expand Down
3 changes: 2 additions & 1 deletion bus-mapping/src/evm/opcodes/precompiles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ pub fn gen_associated_ops(
output_bytes: &[u8],
return_bytes: &[u8],
) -> Result<ExecStep, Error> {
let input_step = state.new_step(&geth_step)?;
let mut input_step = state.new_step(&geth_step)?;
input_step.stack_size += 1; // since the return value is pushed on the stack

gen_ops(
state,
Expand Down
2 changes: 1 addition & 1 deletion testool/tests
Submodule tests updated 306 files
18 changes: 9 additions & 9 deletions zkevm-circuits/src/super_circuit/precompile_block_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ pub(crate) fn block_invalid_precompile() -> BlockTrace {
let addr_d = address!("0x000000000000000000000000000000000000DDDD");

// 4 accounts and 3 txs.
TestContext::<4, 3>::new(
TestContext::<4, 1>::new(
Some(vec![Word::zero()]),
|accs| {
accs[0].address(addr_a).balance(Word::from(1u64 << 24));
Expand All @@ -831,14 +831,14 @@ pub(crate) fn block_invalid_precompile() -> BlockTrace {
.from(wallet_a.clone())
.to(accs[1].address)
.gas(Word::from(2_000_000u64));
txs[1]
.from(wallet_a.clone())
.to(accs[2].address)
.gas(Word::from(2_000_000u64));
txs[2]
.from(wallet_a.clone())
.to(accs[3].address)
.gas(Word::from(2_000_000u64));
// txs[1]
// .from(wallet_a.clone())
// .to(accs[2].address)
// .gas(Word::from(2_000_000u64));
// txs[2]
// .from(wallet_a.clone())
// .to(accs[3].address)
// .gas(Word::from(2_000_000u64));
},
|block, _tx| block.number(0xcafeu64),
)
Expand Down