This repository was archived by the owner on Apr 18, 2025. It is now read-only.
[Fix] code hash do not use rlc in 'poseidon-codehash' feature #456
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 'poseidon-codehash' feature is specified for our l2geth, in which 'dual codehash' has applied so the codehash field in account can be always contained in a single scalar of the field (even the code hash for empty code). It would be waste of cost if we still apply it as a rlc of the bytes of codehash.
This PR switch each place refering codehash and assign the codehash as single scalar when 'poseidon-codehash' feature is enabled. Execpt for bytecode circuit, only unified change is required for most places in the code (replacing the calling of
word_rlc
to a specifiedcode_hash
function)Following test should be passed:
bytecode_invalid_hash_data
test before