(v5) Publish uncle*s* IPLD block keccak256(rlp(uncles)) => rlp(uncles) #218

Closed
opened 2022-03-28 23:09:05 +00:00 by i-norden · 5 comments
Member

Whereas right now we are treating each uncle as an IPLD (keccak256(rlp(uncle)) => rlp(uncle)), using Header multicodec instead of HeaderList multicodec) rather than the entire list of uncles. Relatively minor issue/low priority since uncles are arguably the least interesting object in Ethereum and are not used by any currently conceived watcher... but we should fix this at some point.

Whereas right now we are treating each uncle as an IPLD (`keccak256(rlp(uncle)) => rlp(uncle))`, using Header multicodec instead of HeaderList multicodec) rather than the entire list of uncles. Relatively minor issue/low priority since uncles are arguably the least interesting object in Ethereum and are not used by any currently conceived watcher... but we should fix this at some point.
abdulrabbani00 commented 2022-06-14 17:27:33 +00:00 (Migrated from github.com)

@i-norden - I've spent a bit of time snooping through the codebase, I am still trying to wrap my head around the ask. Do you want us to create a single entry in the eth.uncle_cids table for a list of uncles at a given block?

I also see the following line in several places (within the same file):

commonHashToCid(MEthHeaderList, b.UncleHash)

Any insight regarding what we want the end result to be versus what it is would be very helpful. Thank you

@i-norden - I've spent a bit of time snooping through the codebase, I am still trying to wrap my head around the ask. Do you want us to create a single entry in the `eth.uncle_cids` table for a list of uncles at a given block? I also see the following line in [several places](https://github.com/vulcanize/go-ethereum/blob/v1.10.18-statediff-v4/statediff/indexer/ipld/eth_header.go#L218) (within the same file): `commonHashToCid(MEthHeaderList, b.UncleHash)` Any insight regarding what we want the end result to be versus what it is would be very helpful. Thank you
Author
Member

@abdulrabbani00 currently when indexing the uncles, we publish and reference each individual header as an IPLD object e.g. https://github.com/vulcanize/go-ethereum/blob/v1.10.18-statediff-v4/statediff/indexer/database/sql/indexer.go#L273 and https://github.com/vulcanize/go-ethereum/blob/v1.10.18-statediff-v4/statediff/indexer/database/sql/indexer.go#L284 but what we should be doing is publishing the RLP encoded list of uncles (headers) as a single IPLD object. Each separate uncles_cids record at a given block would then reference that same uncles IPLD (or we could consider getting rid of the uncle_cids table altogether and embedding that reference in header_cids but that's a separate discussion).

@abdulrabbani00 currently when indexing the uncles, we publish and reference each individual header as an IPLD object e.g. https://github.com/vulcanize/go-ethereum/blob/v1.10.18-statediff-v4/statediff/indexer/database/sql/indexer.go#L273 and https://github.com/vulcanize/go-ethereum/blob/v1.10.18-statediff-v4/statediff/indexer/database/sql/indexer.go#L284 but what we should be doing is publishing the RLP encoded list of uncles (headers) as a single IPLD object. Each separate `uncles_cids` record at a given block would then reference that same uncles IPLD (or we could consider getting rid of the uncle_cids table altogether and embedding that reference in `header_cids` but that's a separate discussion).
abdulrabbani00 commented 2022-06-15 15:13:21 +00:00 (Migrated from github.com)

Need an index for the uncles

Need an index for the uncles
abdulrabbani00 commented 2022-06-27 21:29:45 +00:00 (Migrated from github.com)
PR's: `ipld-eth-db`: https://github.com/vulcanize/ipld-eth-db/pull/95 `go-ethereum`: https://github.com/vulcanize/go-ethereum/pull/250
abdulrabbani00 commented 2022-06-28 12:33:51 +00:00 (Migrated from github.com)

@i-norden - Can you please review the two above PR's

@i-norden - Can you please review the two above PR's
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#218
No description provided.