Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Roadmap #1

Open
8 of 32 tasks
kumavis opened this issue Jul 4, 2017 · 28 comments
Open
8 of 32 tasks

Roadmap #1

kumavis opened this issue Jul 4, 2017 · 28 comments

Comments

@kumavis
Copy link
Member

kumavis commented Jul 4, 2017

CLIENT

BEACONS

  • trusted block head publishing (ipns? pubsub?)
  • canonical hash table (merklization and publishing)
  • publish new signed txs over pubsub
  • advertise blockchain data availability (ipns? dht? topic into dht?)

BUCKETS

OTHER

indexing / lookup
  • eth json rpc -> ipfs lookup
    • filters middleware
    • getLogs support (ugh)
    • CHT (block number -> block hash)
    • block tracker / block head syncer
    • tx block references (tx -> block)
    • block expansion (block -> txs)
messaging
  • whisper/swarm over libp2p
testing
  • metamask libp2p test network
monitoring
  • bridge network monitoring (serverless web application)
products and devices
  • serverless block explorer (helps to "pull" IPLD links)
  • daemons to pull / import data into IPFS nodes (kind of a synchronizer)
@ghost
Copy link

ghost commented Jul 4, 2017

Moving up ^^

@danfinlay
Copy link

I like what I see happening over here. Keep up the good work, gentlemen!

@kumavis
Copy link
Member Author

kumavis commented Aug 17, 2017

updated rpc->ipfs TODOs

@ghost
Copy link

ghost commented Sep 4, 2017

@kumavis what is the plan for the smart contract code? Currently, the accounts in the state trie only store the codeHash, which is the keccak256 hash of the EVM Code (as defined in YP 4.1.), leaving open to the implementator how to store it.

Geth at least, just uses this codeHash as key in their levelDB. See here

Are we missing the IPLD codec for this element?

@kumavis
Copy link
Member Author

kumavis commented Sep 5, 2017

@herman correct, we dont have a codec for it -- we should consider making one

i've been using the raw binary codec, but turns out that was actually not supported in js-ipfs and so I created a PR for it -- for sure about go-ipfs

@kumavis
Copy link
Member Author

kumavis commented Sep 5, 2017

got stalled, i need to get back on it
ipld/js-ipld#90

@ghost
Copy link

ghost commented Sep 6, 2017

@kumavis Will do the PR in go-cid as well. What is the link of the PR in js? Which code byte are we going to be using?

@kumavis
Copy link
Member Author

kumavis commented Sep 6, 2017

@hermanjunge bin (raw binary) 0x55

@ghost
Copy link

ghost commented Sep 7, 2017

Asked by @diasdavid to make a write up on my status to-date. Did it here ipfs/notes#261

@daviddias
Copy link

@kumavis just missing ipld/js-ipld#90, need your input there. All the others have been shipped.

@hermanjunge thank you for the write up! ❤️ ipfs/notes#261

@kumavis
Copy link
Member Author

kumavis commented Oct 6, 2017

@kumavis
Copy link
Member Author

kumavis commented Oct 10, 2017

  • cache cht results!
  • add cht middleware for block lookups
  • add all missing middleware (e.g. id mgmt)
  • debug frequent chrome crashes https://support.google.com/chrome/a/answer/6271282
  • verify handling of empty code:
    0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
    zb34WAxFQD4oNVkG9PRFauGV6cu51KgpQbBXARSbVDD5d9Viw
  • verify handling of missing account / storage entry
  • verify handling of empty storageRoot:
    0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421
    z46gvXALNuXdCn6ts67LS6JkPUkZb7zNrH6fMayQM7U9HNLDtWt (aka "Honolulu dittwitt")

@kumavis
Copy link
Member Author

kumavis commented Oct 10, 2017

udapp-ipfs is live!
uses infura for block-by-number lookups and logs, everything else is clientside (vm) or ipfs (state)

@kumavis
Copy link
Member Author

kumavis commented Oct 11, 2017

published:

@kumavis
Copy link
Member Author

kumavis commented Oct 11, 2017

@diasdavid

@kumavis
Copy link
Member Author

kumavis commented Oct 12, 2017

exists, but super crashy and not fully QA'd
https://github.com/MetaMask/metamask-extension/tree/ipfs-client

@ghost
Copy link

ghost commented Oct 23, 2017

Did some editing to the first comment. Divided the goals into CLIENT, BEACONS, BUCKETS and OTHER.

@ghost
Copy link

ghost commented Oct 23, 2017

devp2p -> libp2p bridge in Go Language (a.k.a. "Hot Importer")

  • Instance a node and connect to devp2p.
  • Get Ethereum Data:
    • eth-block
    • eth-block-list (ommers)
    • eth-tx / eth-tx-trie
    • eth-tx-receipt / eth-tx-receipt-trie
    • eth-state-trie eth / eth-account-snapshot
    • eth-storage-trie
    • evm-code
  • Setup a libp2p node with a localstore
  • Logic to ask to the client for an element
    • Ask in the local storage of the client
    • Then in libp2p
    • Then in devp2p
    • If the latter happened, send the result to the local storage (ipfs dag put).
  • Synchronizing daemons
    i.e. "I want the whole data for block B"
  • Metrics API
  • Deploy to musteka.la

@ghost
Copy link

ghost commented Oct 24, 2017

From ipfs/go-ipld-eth-import#9 (comment)

seems actually rlpx is the transport/peer layer and devp2p is some sort of wire (sub)protocol multiplexer

So, I've reading code starting from here and here, and I agree. Also, I learned about transports here. seemed that I was having all nomenclatures wrong in my head: We didn't want to do a different wire protocol, only a transport.

I may then want to build a transport library called go-libp2p-rlpx. For that, My plan should be:

  • Write down the golang APIs needed for a peer in libp2p,
  • Learn how do I send messages to a peer,
  • Learn how do I handle them (so the devp2p peers don´t cancel our connections for being bad neighbors, protocol-wise)

That should suffice to have an example like this running, getting peers and their ethereum data.

What are your thoughts @jwasinger?

@jwasinger
Copy link

This looks good @hermanjunge . As we discussed, I will be working on writing the javascript implementation of the rlpx transport js-libp2p-rlpx.

@dryajov
Copy link

dryajov commented Oct 24, 2017

@hermanjunge that's the approach I was suggesting earlier, it seems tho that according to @whyrusleeping, this might end up being more involved than necessary. An alternative seems to be running both devp2p and libp2p stacks in the client and doing the bridging that way, IIUC. Just leaving this here, for future reference:

whyrusleeping [11:39 AM] 
@dryajov you shouldnt mount devp2p on libp2p
[11:39] 
you want to just run both network stacks separately
[11:39] 
and have logic that ties between them
[11:39] 
a bridge, basically

@AFDudley
Copy link

AFDudley commented Dec 5, 2017

@hermanjunge you were looking into adding postgres support to go-ethereum via https://github.com/ethereum/go-ethereum/tree/master/ethdb

ethereum/go-ethereum#2690

Why was that strategy abandoned and this one adopted? It seems like support ipfs dag put from within go-ethereum would get the job done as well?

Thanks.

@ghost
Copy link

ghost commented Dec 5, 2017

Hi @AFDudley

Why was that strategy abandoned and this one adopted? It seems like support ipfs dag put from within go-ethereum would get the job done as well?

The strategy of implementing RedisDB or PostgreSQL as storages in https://github.com/ethereum/go-ethereum/tree/master/ethdb was abandoned for lack of resources at that time. Now we have the capacity to commit in the area of blockchain storage.

There are several ways to skin a cat. The approach you mention is correct: Instead of making a put into levelDB, we just ipfs dag put. It is very likely to happen that when we are able to reach a good health of nodes running eth-ipld data, we should just implement something that talks to libp2p in the ethdb package.

The devp2p<->libp2p bridge being built is importing the github.com/ethereum/go-ethereum/p2p (and log and common). The idea behind this approach is to enable the user of this program to extract the data from the devp2p network without the need of running an ETH node. Generally speaking, from my experience in Chile, even an Ethereum fast synchronization is a huge pain, and it's getting worse. That's the motivation.

@kumavis
Copy link
Member Author

kumavis commented Feb 10, 2018

break down of rpc methods and node requirements (updated)

client
  eth_protocolVersion
  eth_syncing
  eth_coinbase
  eth_mining
  eth_hashrate
  eth_gasPrice
  eth_accounts
  eth_sign
  eth_sendTransaction
  eth_sendRawTransaction
  eth_newFilter
  eth_newBlockFilter
  eth_newPendingTransactionFilter
  eth_uninstallFilter
  eth_getFilterChanges
  eth_getFilterLogs

client broadcast
  eth_sendRawTransaction

ipfs
  eth_getBlockByHash
  eth_getUncleByBlockHashAndIndex

ipns/block syncing (head tracking)
  eth_blockNumber

ipld:selectors (selectors/transforms)
  eth_getBlockTransactionCountByHash
  eth_getUncleCountByBlockHash

index:txToBlock (coselector)
  eth_getTransactionReceipt
  eth_getTransactionByHash
  eth_getTransactionByBlockHashAndIndex

log query?? / geth bloomFilterTrie / index:logToTx
  eth_getLogs (+index:logToTx)

lazy vm (slow) / remote vm + proofs (faster)
  eth_call
  eth_estimateGas

index:CHT
  eth_call
  eth_estimateGas
  eth_getBalance
  eth_getStorageAt
  eth_getTransactionCount
  eth_getCode
  eth_getBlockByNumber
  eth_getTransactionByBlockNumberAndIndex (+index:txToBlock)
  eth_getBlockTransactionCountByNumber (+ipld:selectors)
  eth_getUncleCountByBlockNumber (+ipld:selectors)
  eth_getUncleByBlockNumberAndIndex
  eth_getLogs (+log query)

@ghost
Copy link

ghost commented Feb 20, 2018

Yet another writeup, older, but wiser. (they say)

ipld/ipld#28 (comment)

@ghost
Copy link

ghost commented Feb 21, 2018

A more polished writeup:

Moving to a problem of maintaining a distributed ethereum snapshot database on js-ipfs browser peers

ipld/ipld#29

@ghost ghost mentioned this issue Feb 22, 2018
37 tasks
@ghost
Copy link

ghost commented Feb 22, 2018

Moving everything here musteka-la/mustekala#2

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

6 participants