Skip to content

Memory optimization for RPC Jumpdests fetching #767

@einar-polygon

Description

@einar-polygon

This continues the work in #427 and addresses one problem: CREATE and CREATE2 required memory dumps to obtain the relevant contract code and code_hash for call stack simulation, and we opted instead to fail over to simulation, since memory dumps were slow.

This branch introduces the following changes:

  • Reinstantiate the match case for CREATE and CREATE2, but ignore code and code_hash.
  • Prove only the current context. The old version generates all Jumpdest proofs in the very first context. This meant that the witness had to provide the relevant mapping between code_hash and context. This change means two things: current_code and current_code_hash is always available, so we do away with the mapping in the witness, essentially simplifying it to a mapping ctx->[offset].
  • Simplify the witness including removal of the tracking of code and code_hash in the Jumpdest generation.

Work has started in PR: Prefetch JUMPDESTs through RPC with progressive proving #765

Status: The first 100 blocks on testchain2 succeed, but there are still many errors later.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions