-
Notifications
You must be signed in to change notification settings - Fork 16
Next steps #1
Comments
also cc @kumavis |
Once all the above is done, building ipfs with ethereum support would still require running a custom binary. I'm really wanting to add support for plugins to ipfs, and that would nicely solve the issue. You could just build this package as a plugin, put it in the ipfs/plugins directory, and bam! you have the ability to traverse ethereum dags |
yeah i agree plugins would be awesome - look forward to that |
currently eth-ipfs bridge only serves blocks, transactions (no tries), state and storage tries, no tx receipts or no tx receipt tries. These are missing b/c parity does not index them by hash (tx receipt) or doesn't store them at all (tx trie, tx receipt tree). |
Done
Next Steps
|
Paging @Kubuxu @Stebalien as per @whyrusleeping advice. |
And linking to our evil world domination plan repo MetaMask/eth-ipfs-browser-client#1 |
FYI, we've stopped doing this. Instead, just call |
@Stebalien It's already done by Why. See https://github.com/ipfs/go-ipld-eth/blob/master/plugin/eth.go#L36-L38 |
Ah, ok. Just wanted to make sure there wasn't out-of-date information floating around. |
@Stebalien please, if you have some time, take a look at the attempt of documenting each public function PR, so I am building from this first PR. |
Moving forward with this. A big refactor was already done here in #5. Some time will be spent on working on an importer. We can use the material in the plugin's directory README to make a blog post in the future. |
Got some interesting data on my first attempt to import
|
There should also be a major perf improvement if you switch your IPFS node from flatfs to bager (still WIP) right now but what you can do is:
|
OK. #7 is the second (and hopefully last) heavy overhaul. Now we can talk about organic growth, continuous improvements and the such. Current focus is making a fast and decent importer (https://github.com/hermanjunge/go-ipld-eth-import, to be someday gave away to TODO
|
This one PR moves the needle to the right. DocsWe have a pretty decent doc to make a huge blog post on this! Pinging @whyrusleeping as you requested this. TODOOperational
Remaining codecs to implement
Ideas
|
This is a write up on IPFS/notes I made the other day. |
Remaining codecs to implement
|
@hermanjunge How did you fetch the state trie rlp data that's in the test data directory? I see that you mentioned using the parity ipfs api - how did you determine the cid to pass in? Did you use this tool? If so, did you generate the eth-state-trie cid from a block hash, a state root hash, or something different? |
That's correct, https://github.com/kumavis/eth-ipld-cli
The root state trie can be obtained from the block header. Succesive trie hashes are obtained when you retrieve this first element from a database (i.e. The ipfs-parity API), and then continue traversing. To know the traversal path, you need to hash (keccak-256) the value of the ethereum address. There is section documenting this example of performing the former operation manually with the ipfs client and the plugin in this repository. You can even find code to create the hash in that section. Hope this answers your question. |
Thanks for the quick reply, @hermanjunge! That example is really helpful, and I'm super excited to see where this project goes/potentially contribute. Quick follow up - the example works for fetching the state root of the genesis block (and for traversing to accounts from there). Do you know whether it's possible to perform similar operations on subsequent blocks? For example, with the genesis block, I know that the cid for the header is However, for block 5,000,000, it appears that the cid for the header is |
Is highly probable that your parity client has pruned that state from the database, or have not even obtained that element from its synchronization. You may want to try with a latter block and state trie. |
I checked with my running server and failed for block https://etherscan.io/block/5614095 gave me its hash
|
Hi Herman! I was able to run: and get this result:
But when I ran it with could you explain what's going on? Thanks! |
|
Yes. your line (with the typo fixed): returns: Not: Are we using different versions of Thanks again. |
You are right @AFDudley , I checked my |
Thanks, I was able to replicate that with a more recent block. |
To get this integrated more officially into go-ipfs, we will need to first clean the code here up a little (make sure it complies with golint and vetting tools) and then make it confirm to the newer go-ipld-format plugin semantics (it needs a DecodeBlock method matching this: https://github.com/ipfs/go-ipld-format/blob/master/coding.go#L13) Then in an init function, it needs to register itself in the decoders map.
Then, any build of go-ipfs that imports this package will automatically be able to handle ethereum types.
There are also a few changes from https://github.com/ipfs/go-ipfs/compare/feat/zcash that we will need to get merged (primarily the changes to the
ipfs dag put
command that allows hex input).And finally, this package doesnt implement handling for all the different ethereum object types. I only did block, transaction, and transaction trie parsing. Working on support for state trie processing will be nice.
cc @hermanjunge
The text was updated successfully, but these errors were encountered: