Permission to connect revoked, but still second node is connecting.

+1 vote

Hi,
I am running a chain on node1 and had granted permission to connect ,send and receive to an address of node2.
Later, I shutdown the node2 and revoked the granted permissions to the node2.
But when I try to connect again to the chain from Node2 , I'm able to connect ( probably its only fetching the data from the local copy of the blokchain node) , However the client in node2 does not do a check whether its able to connect to the node1's chain.

cli output in Node1

docRepo: getblockcount
{"method":"getblockcount","params":[],"id":1,"chain_name":"docRepo"}

4687
docRepo: listpermissions connect
{"method":"listpermissions","params":["connect"],"id":1,"chain_name":"docRepo"}

[
    {
        "address" : "1RgeFTjyUzeudygDEvqTruKdKRhhaDpH2c3P4z",
        "type" : "connect",
        "startblock" : 0,
        "endblock" : 4294967295
    }
]


----------------

cli output from node2

docRepo: getblockcount
{"method":"getblockcount","params":[],"id":1,"chain_name":"docRepo"}

537
docRepo: listpermissions connect
{"method":"listpermissions","params":["connect"],"id":1,"chain_name":"docRepo"}

[
    {
        "address" : "1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9",
        "type" : "connect",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "1RgeFTjyUzeudygDEvqTruKdKRhhaDpH2c3P4z",
        "type" : "connect",
        "startblock" : 0,
        "endblock" : 4294967295
    }
]

 

Probably this is an expected behaviour, not sure, but I felt while trying to connect again from Node2, the client application should check if it has permission to sync with the original chain.

The Logs in the node1 displays permission denied error:

2016-04-20 10:08:35 mchn: Sending minimal parameter set to 192.168.100.21:4249
2016-04-20 10:08:35 receive version message: /MultiChain:0.1.0.5/: version 70002, blocks=537, us=192.168.100.1:39706, peer=1172
2016-04-20 10:08:35 mchn: Connection from 1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9 received on peer=1172 in verack
2016-04-20 10:08:35 mchn: Connection from 1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9 received on peer=1172 in verackack (192.168.100.21:4249)
2016-04-20 10:08:35 mchn: Permission denied for address 1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9 received from peer=1172
2016-04-20 10:08:35 mchn: Invalid verackack message from peer=1172, disconnecting
2016-04-20 10:08:35 ProcessMessage(verackack, 141 bytes) FAILED peer=1172
2016-04-20 10:08:38 mchn: Sending minimal parameter set to 192.168.100.21:41006
2016-04-20 10:08:38 receive version message: /MultiChain:0.1.0.5/: version 70002, blocks=537, us=192.168.100.1:4249, peer=1173
2016-04-20 10:08:39 mchn: Connection from 1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9 received on peer=1173 in verack
2016-04-20 10:08:39 mchn: Connection from 1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9 received on peer=1173 in verackack (192.168.100.21:41006)
2016-04-20 10:08:39 mchn: Permission denied for address 1CDdN5acaZmsiCfvzp8sBmbpCXuXxfBz97oAL9 received from peer=1173
2016-04-20 10:08:39 mchn: Invalid verackack message from peer=1173, disconnecting
2016-04-20 10:08:39 ProcessMessage(verackack, 141 bytes) FAILED peer=1173

 

 

asked Apr 20, 2016 by sanmadhavan

1 Answer

0 votes
It is the intended behavior. Node2 never heard about losing connect permissions, because it was shut down when the transaction removing those permissions was broadcast. So it is just stuck on its own, unable to connect to any other nodes, and it will never hear about losing that connect permission unless it can regain the ability to connect using that or another address.
answered Apr 20, 2016 by MultiChain
...