all: Revert some unifications of keccaking #595
Closed
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.
This PR reverts part of the changes introduced in #580. Both are part of NIT-4123, where we care that every single Keccak 256 hash function used in
replay.wasmcan be intercepted and outsourced to external utility (either native implementation or SP1 precompile). According to @tsahee onlycore/vm,core/typesandtriedirectories lie in our field of interest (I will confirm it soon). Since upstream maintainers won't accept this kind of changes, we drop unification in other places to keep the diff between our fork and upstream as small as possible.To ensure that neither of the remaining 'incorrect' keccaking affects
replay.wasmI addedpanicin all these places: 3fb364d (branch https://github.com/OffchainLabs/go-ethereum/tree/pmikolajczyk/detect-keccaking) and run system tests inblock_validator_test.go. No panics.companion nitro PR: OffchainLabs/nitro#4123