HelixNetwork / pendulum

Pendulum is a distributed messaging protocol that enables globally available tamper proof timestamps :hourglass_flowing_sand:
https://dev.hlx.ai
Other
10 stars 6 forks source link

Implement non-blocking transaction confirmation #190

Closed dzhelezov closed 4 years ago

dzhelezov commented 4 years ago

Currently a transaction is confirmed only when a round becomes solid. Replace with 2/3+ milestone confirmations.

oracle58 commented 4 years ago

Currently, to get the confirmation state, getInclusionStatesStatement is used. The check evaluates to true if a transaction.snapshotIndex() has been set (roughly speaking). As you say, this requires the respective round to solidify, the snap to be created and to include the transaction in question.

getInclusionStatesStatement will be refactored to: getInclusionStatesStatementObsolete (to temporarily preserve the functionality)

The 2/3rd majority check will be implemented in: getInclusionStatesStatement.

It would be desirable to refactor getInclusionStates to getConfirmationState as soon as possible, but we might not want to touch the command names just yet, as it would also require refactoring in sdk and wallet.

oracle58 commented 4 years ago

addressed in: https://github.com/HelixNetwork/pendulum/pull/206