1

In a multi node network, if one node is down (and a majority of nodes are up and running) for a period of time - say its down at block 100 block and rejoins when the network is at block 200.

Q1: Will it copy the entire information from nearby nodes?

Q2: During replication, will it execute transactions in all blocks?

Please let me know what exactly happen in this scenario

1 Answer 1

1

Q1:

It will begin syncing as it hears about higher blocks from nearby nodes.

Q2:

It will verify transactions in the received blocks. This process includes updating its local copy of the state - account balances and contract storage. This means catching up to the rest of the network in all respects.

It will also be able to sign and send transactions. However, it may not receive confirmation nearly as fast as the user expects. This is because the sent transactions would be mined and accepted by the rest of the network at a higher block number because the node is behind. When it catches up, it will discover that the confirmation has been known to other nodes for possibly a long time.

To understand how it can sign and send transactions (propose them to the network) when its behind, it might help to keep in mind that nodes never really know what the highest block in existence actually is. They can never self-assess that they are 100% synced up.

Hope it helps.

6
  • Hi Rob, How this will work in the case if we use oraclize in smartcontract
    – basilji
    Commented Jul 25, 2018 at 4:50
  • Oracles insert transactions in the usual way, so it will find out what the Oracle said when it catches up to the block when the Oracle said it. Commented Jul 25, 2018 at 7:17
  • Hi Rob,The data which we are getting out of oracles will be different time to time, so if it executes the oracles during catch up there is a chance of state variable value conflict. In this case catch up will fail. Let me know is my understanding is correct or not
    – basilji
    Commented Aug 1, 2018 at 5:12
  • Misunderstanding. Contract functions are deterministic and it is not possible to create a function that produces different outputs at the same block height. As such, it is not possible to consult an external data source. The Oracle pattern uses an external actor to speak to the contract at a specific point. The Oracle's input then becomes a fact on the chain. It will not be consulted when nodes catch up. They will know what the Oracle said at the time, and that's all that matters. Commented Aug 1, 2018 at 16:28
  • Have a look over here for a few descriptions of the process: ethereum.stackexchange.com/questions/11589/… Commented Aug 1, 2018 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.