BuildOnViction / tomochain-v1

The efficient blockchain for the token economy
https://tomochain.com
GNU Lesser General Public License v3.0
51 stars 22 forks source link

Double validation #78

Closed ngtuna closed 6 years ago

ngtuna commented 6 years ago

A masternode only signs a block if he sees two signatures of M1 and M2 in that block.

ngtuna commented 6 years ago

related issue: #27

ngtuna commented 6 years ago

So the current proposal is:

once M2 get the block created by M1, he validates his turn and then creates a sign transaction. This transaction will be broadcasting in the network as soon as possible (we need some prioritization getting involved). The other masternodes will only sign the block if two conditions are satisfied:

ngtuna commented 6 years ago

Detailed flow:

When a new block comes in:

1) Masternode A verifies its header and body 2) Masternode A check m2 by its m1 (the creator) 3) If masternode A == m2:

ngtuna commented 6 years ago

@dinhln89 suggests to use map[blkno]tnx to trace signing transaction instead of looking into transaction pool