-
Notifications
You must be signed in to change notification settings - Fork 108
Map the entire Ethereum State into IPFS with ipld #27
Comments
related multiformats/multicodec#16 |
also needed ipld/js-ipld#15 |
Created a tracking issue to aggregate all the endeavours (and to keep everyone updated) ipfs/notes#173 :) |
In order for pathing to work nicely ( and maintain cononical hashes ) for all ethereum objects, I think we will need several ethereum codecs my list so far:
ethereum full blocks (bodies) wont exist in this model, just block headers and separate lookups for the uncles, txs, txReceipts it would be nice if we could just have an rlp single-codec solution, but that doesn't tell ipld what the sub content is or how to resolve paths against it heres an example in cid pseudocode:
with
|
I started my |
That still leaves the question of whether or not we want to maintain these hashes: #29 (comment) |
@Stebalien we need to issue a comment clarifying it better, but tl;dr; is that with CID and IPLD, you won't need to have 'IPLD-CBOR' hashes, the ethereum native data structs will ride IPFS just fine, this means, you don't have to touch those RLP encoded blocks. |
@diasdavid please see my comment. My point is that adding a new format (CID) for every new system we come across will drastically increase the complexity of implementing a feature-complete IPLD library for little to no gain. |
@kumavis is it possible to bundle those ethereum codecs into one? is it possible for one codec to discern between those? For example, in git, the object itself discerns between Basically, one git IPLD codec implements support for all three |
@jbenet the content is not self-identifying so "no", but we may be able to use some clever heuristics. will investigate. |
@kumavis @jbenet I think there is a way. All ethereum objects are encoded as RPL arrays
eth-tx-trie, eth-tx-receipt-trie, eth-state-trie, are all the same thing, they just contain different values at the leaf nodes |
@wanderer for { |
one point of difference between { |
its all binary data. after we RPL.decode, then we can count the array elements and know what type it is.
right, but it shouldn't matter from IPFS view point. It just need a path. The client when it needs to looks up and account will have to hash the address which will then be that path that IPFS resolves |
really ruins human readability of the path. the cost of preserving that is having a couple extra ethereum object types. I think the benefit may outweigh the cost. |
Closing due to staleness as per team agreement to clean up the issue tracker a bit (ipld/team-mgmt#28). This doesn't mean this issue is off the table entirely, it's just not on the current active stack but may be revisited in the near future. If you feel there is something pertinent here, please speak up, reopen, or open a new issue. [/boilerplate] |
It would be super cool if we could map the entire Ethereum state into ipfs with the help of IPLD.
Here is the proposed layout.
some initial work has begun by adding RLP to multicodec
I think the next step is to be able to serialize the ethereum merkle patricia nodes correctly. Where do we start? Where exactly can we plug in the logic for to serialize and unserialize ethereum merkle patricia nodes? :)
The text was updated successfully, but these errors were encountered: