wirelineio / wns

Wireline Naming Service
GNU General Public License v3.0
0 stars 1 forks source link

Discover RPC endpoints for lite node using WNS #244

Closed ashwinphatak closed 4 years ago

ashwinphatak commented 4 years ago

Picks a RPC endpoint randomly so as to not load a single server.

ashwinphatak commented 4 years ago

The tendermint lite proxy (github.com/tendermint/tendermint/lite/proxy) needs to be passed a client instance on creation. So we might have to use the current --node enpoint for proof verification and the discovered RPC endpoints for pulling IAVL store data. Need to check how verification works in this scenario.

    node := rpcclient.NewHTTP(nodeAddress, "/websocket")
    verifier, err := tmliteProxy.NewVerifier(
        chainID, filepath.Join(home, "data", ".lite_verifier"),
        node, log.NewNopLogger(), cacheSize,
    )