Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

gadget for CREATE(2) #981

Closed
wants to merge 73 commits into from
Closed

gadget for CREATE(2) #981

wants to merge 73 commits into from

Conversation

z2trillion
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-eth-types Issues related to the eth-types workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member labels Dec 13, 2022
@github-actions github-actions bot added crate-integration-tests Issues related to the integration-tests workspace member crate-keccak Issues related to the keccak workspace member crate-mock Issues related to the mock workspace member T-bench Type: benchmark improvements labels Jan 11, 2023
@github-actions github-actions bot removed crate-gadgets Issues related to the gadgets workspace member crate-keccak Issues related to the keccak workspace member crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member T-bench Type: benchmark improvements CI Issues related to the Continuous Integration mechanisms of the repository. crate-mock Issues related to the mock workspace member crate-integration-tests Issues related to the integration-tests workspace member labels Jan 11, 2023
// and code_hash. Each sequence of bytes occurs in a fixed position, so to
// compute the RLC of the input, we only need to compute some fixed powers of
// the randomness.
let randomness_raised_to_16 = cb.power_of_randomness()[15].clone();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems the rlc here assumes randomness of evm_word be equal to randomness of keccak_input? it will be incorrect after the evm circuit challenge api refactor

@lispc
Copy link
Collaborator

lispc commented Jan 18, 2023

another issue is after #1046, some codes in this PR may also need to be updated.

@@ -95,6 +95,12 @@ impl<F: Field> MemoryAddressGadget<F> {
}
}

pub(crate) fn construct_2(cb: &mut ConstraintBuilder<F>) -> Self {
let offset = cb.query_cell();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phase2

})
});

let keccak_input = cb.query_cell();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phase2 cell

@adria0
Copy link
Member

adria0 commented Jan 23, 2023

Very excited to see this merged 🥇 !

@lispc
Copy link
Collaborator

lispc commented Feb 7, 2023

@roynalnaruto will work on this issue now


let mut exec_step = state.new_step(geth_step)?;

let callee = state.parse_call(geth_step)?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the above line "let mut exec_step = state.new_step(geth_step)?;" should be put before memory expansion. Or mem_size inside exec_step will be incorrect

@lispc
Copy link
Collaborator

lispc commented Feb 24, 2023

CallContext Value should also be written with state.call_context_write. Missing?

@lispc
Copy link
Collaborator

lispc commented Mar 8, 2023

@roynalnaruto this PR is relatively outdated with upstream changes. I made some updates in scroll-stable fork, at least it can. pass tests. You can have a look

} else {
0
})
.into(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read the gas_left from rw, then debug_assert_eq

state.block.sha3_inputs.push(keccak_input);

if length == 0 {
state.handle_return(geth_step)?;
Copy link
Collaborator

@lispc lispc Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle_restore_context? or write CallContextField::LastCalleeId/CallContextField::LastCalleeReturnDataOffset/CallContextField::LastCalleeReturnDataLength?

@lispc
Copy link
Collaborator

lispc commented Mar 9, 2023

CallContext Value fixed in scroll-stable branch

@ChihChengLiang
Copy link
Collaborator

@lispc Is this pr superseded by #1356?

@lispc
Copy link
Collaborator

lispc commented Apr 28, 2023

Yes

@lispc lispc closed this Apr 28, 2023
noel2004 pushed a commit to noel2004/zkevm-circuits that referenced this pull request Nov 29, 2023
* construct Address direct

* aggressive inline hotspot

* cache key

* don't sort for from_rws_with_mock_state_roots

* mark possible optimization

* wrap error string with arc

* Revert "wrap error string with arc"

This reverts commit ad05aff.

* exclude original_rws for release build

* [wip] reduce clone in ccc path (privacy-scaling-explorations#973)

* estimate_circuit_capacity take BlockTrace ownership

* Convert ExecutionResult with explicit clone

* add block_trace_to_witness_block

* construct from ref

* sync default mod

* fix order

* clippy

* assertion

* dirty fix

* extract common

* clippy && fmt

* fix clippy

* async drop (privacy-scaling-explorations#981)

* skip small drop

* add comments

* fix typo

---------

Co-authored-by: Zhang Zhuo <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crate-bus-mapping Issues related to the bus-mapping workspace member crate-eth-types Issues related to the eth-types workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants