Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Figure out why codehash=>code is not being stored correctly #27

Closed
3 of 5 tasks
i-norden opened this issue Aug 21, 2020 · 2 comments
Closed
3 of 5 tasks

Figure out why codehash=>code is not being stored correctly #27

i-norden opened this issue Aug 21, 2020 · 2 comments
Assignees

Comments

@i-norden
Copy link
Collaborator

i-norden commented Aug 21, 2020

Currently writing the tx_data for deployment txs as the codebytes, this is not producing the correct code hashes. There must be some processing step on the tx_data before it is stored as codebytes.

  • Create http endpoint for statediffing geth to fetch all codehash => code pairs

  • Modify the statediffing service to emit codehash => code pairs for any deployment txs at the payload's block height

  • Adjust ipld-eth-indexer sync/backfill/resync to consume and index emitted pairs

  • Script/ipld-eth-indexer command to fetch missing historical from the http endpoints

  • Script to remove malformed entries (optional)

@i-norden
Copy link
Collaborator Author

i-norden commented Oct 12, 2020

Deployed data can be modified by the EVM before it is stored by geth as a codehash=>code mapping. The EVM requires a state database, which complicates modifying the code on the ipld-eth-indexer end.

Alternative approach:

  1. Create http endpoint for statediffing geth to fetch all codehash => code pairs
  2. Modify the statediffing service to emit codehash => code pairs for any deployment txs at the payload's block height
  3. Adjust ipld-eth-indexer sync/backfill/resync to consume and index emitted pairs
  4. Script/ipld-eth-indexer command to fetch missing historical from the http endpoints
  5. Script to remove malformed entries (optional)

@stellarmagnet
Copy link

Closing this issue - it is captured here now:
cerc-io/go-ethereum#90

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants