hiero-ledger / hiero-ledger/hiero-consensus-node

(Dynamic address book) Invalidate `PreHandleResult` if node account id changes from pre-handle

Open
#10,514 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Problem

With a completely dynamic address book, it becomes possible for a node's `accountId` to change from e.g. `0.0.X -> 0.0.Y` between pre-handle and consensus for a transaction it submitted when its id was still `0.0.X`.

In this case we need to invalidate any `PreHandleResult` computed during pre-handle and reconstruct the result from scratch in `handleTransaction()`.

### Solution

Invalidate `PreHandleResult`s when either the configuration version or the node's account id changes between pre-handle and consensus.

### Alternatives

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing PreHandleResult from pre-handle into handleTransaction(). Check how configuration version and the node account ID are compared between pre-handle and consensus. Done means a change in either value invalidates the result and causes handleTransaction() to reconstruct it from scratch.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.