TezosRio / TezosJ_plainJava

Java Software Development Kit for Tezos blockchain
MIT License
32 stars 7 forks source link

Update HEAD to HEAD~2 according to changes in Tenderbake to follow consensus branch #13

Open csoreff opened 2 years ago

csoreff commented 2 years ago

Tenderbake changes:

The branch field of non-consensus operations is set by default by the Octez client to HEAD~2. Setting the branch field to HEAD or HEAD~1 may result in the operation not being included because it will not be anchored on a block belonging to the chain. (The blocks at the current and previous levels are not necessary final.)

https://tezos.gitlab.io/protocols/tenderbake.html#operations

Without this, you will often end up using a branch that is orphaned and not finalized by consensus. This results in missing txs that had seemed to be injected successfully, etc.