Skip to content

Peering Issues - master branch #144

@araskachoi

Description

@araskachoi

1/2/2019 Analysis:

Peering Issues

  • commands to run sharding application
docker exec -d whiteblock-node0 sharding-p2p-poc -seed=0 -port=5566 -rpcport=7788 ip=0.0.0.0
docker exec -d whiteblock-node1 sharding-p2p-poc -seed=1 -port=5566 -rpcport=7788 -bootstrap -bootnodes=/ip4/10.2.0.2/tcp/5566/ipfs/Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi -ip=0.0.0.0
docker exec -d whiteblock-node2 sharding-p2p-poc -seed=2 -port=5566 -rpcport=7788 -bootstrap -bootnodes=/ip4/10.2.0.2/tcp/5566/ipfs/Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi -ip=0.0.0.0
docker exec -d whiteblock-node3 sharding-p2p-poc -seed=3 -port=5566 -rpcport=7788 -bootstrap -bootnodes=/ip4/10.2.0.2/tcp/5566/ipfs/Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi -ip=0.0.0.0
docker exec -d whiteblock-node4 sharding-p2p-poc -seed=4 -port=5566 -rpcport=7788 -bootstrap -bootnodes=/ip4/10.2.0.2/tcp/5566/ipfs/Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi -ip=0.0.0.0
docker exec -d whiteblock-node5 sharding-p2p-poc -seed=5 -port=5566 -rpcport=7788 -bootstrap -bootnodes=/ip4/10.2.0.2/tcp/5566/ipfs/Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi -ip=0.0.0.0
  • bootstrap peering issue
    • using dockerfile from the master branch (commit 66ca4fc)
    • all docker containers can ping one another so not a networking issue
    • when the client nodes use the bootstrap flag and the bootnode address when starting the application, the following error is thrown
/bin # sharding-p2p-poc -seed=1 -port=5566 -rpcport=7788 -bootstrap -bootnodes=/ip4/10.2.0.2/tcp/5566/ipfs/Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi -ip=0.0.0.0
20:04:01.543 ERROR sharding-p: Failed to bootstrap with <peer.ID Qm*zMzwwi>: dial attempt failed: <peer.ID Qm*57Yrmd> --> <peer.ID Qm*zMzwwi> dial attempt failed: connection refused bootstrap.go:50
  • manually call addPeer
    • the bootnode can manually add peers using the cli, but when the other client nodes try to add the bootnode as a peer, an error is thrown (below)
    • when the bootstrap node manually adds the peer to a client node, that client node can call addPeer to the bootstrap node without any error (but they are already peered so this is not useful to peer again)
    • addpeer call from QmXtW5fXrrvmHWPhq3FLHdm4zKnC5FZdhTRynSQT57Yrmd to Qmd8vXqRiFVkcXcB1nigjCDuUyHcFkja6fQcU9w2zMzwwi (node1 -> bootnode) gives error:
/bin # sharding-p2p-poc -client -rpcport=7788 addpeer 10.2.0.2 5566 0
19:46:43.019 CRITI sharding-p: Failed to add peer at 10.2.0.2:5566, err: rpc error: code = Unknown desc = Failed to connect to peer <peer.ID Qm*zMzwwi>, err: dial attempt failed: <peer.ID Qm*57Yrmd> --> <peer.ID Qm*zMzwwi> dial attempt failed: connection refused cli.go:199

RPC call changes

  • changed the format of subshard
    • what is numShardPeerToConnect?
    • is this a hard limit on how many peers can join this shard?
  • it would be nice to have a readme section to describe the rpc calls and what arguments are required for those calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions