Skip to content

[#767] Use `head~2` block in `branch` field of RPC operations

Diogo Castro requested to merge diogo/#767-ithaca-branch-field into ithaca

Description

Problem: We use the head block ID in the branch field of the run_operation, forge and preapply operations.

However, with the introduction of the ithaca protocol and the Tenderbake consensus algorithm, it is no longer safe to use the head block as the branch of those operations, because that block "is not necessarily final".

Solution: Use the head~2 block instead, as recommended by the docs: https://web.archive.org/web/20220305165609/https://tezos.gitlab.io/protocols/tenderbake.html

Related issue(s)

Resolves #767 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Diogo Castro

Merge request reports