Skip to content

Commit 2463b67

Browse files
fab-10claude
andcommitted
Document TransactionsLayer.getAllBySender() nonce ordering invariant
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 179f391 commit 2463b67

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Dispatch snap server request processing (GET_ACCOUNT_RANGE, GET_STORAGE_RANGE, GET_BYTECODES, GET_TRIE_NODES, GET_BLOCK_ACCESS_LISTS) off the Netty event loop to prevent heavy trie/DB work from blocking ETH protocol message handling [#10083](https://github.com/besu-eth/besu/pull/10083)
1414
- Add DiscV5 discovery metrics (`discv5_live_nodes_current`, `discv5_total_nodes_current`) to track node counts in the routing table [#9692](https://github.com/besu-eth/besu/issues/9692)
1515
- Add `txpool_contentFrom` JSON-RPC method [#10111](https://github.com/besu-eth/besu/pull/10111)
16+
- Add `txpool_content` JSON-RPC method [#10120](https://github.com/besu-eth/besu/pull/10120)
1617

1718
## 26.3.0
1819

ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/TransactionsLayer.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ void blockAdded(
8787

8888
List<PendingTransaction> getAll();
8989

90+
/**
91+
* Returns all pending transactions across all layers, grouped by sender and sorted by nonce in
92+
* ascending order per sender.
93+
*
94+
* <p>The nonce ordering relies on each layer's internal {@code NavigableMap<Long,
95+
* PendingTransaction>} being nonce-sorted, and on the invariant that a layer always holds
96+
* lower-nonce transactions than its next layer (e.g. ready transactions before sparse ones).
97+
*
98+
* @return a map from sender address to the list of that sender's pending transactions, sorted by
99+
* nonce ascending
100+
*/
90101
Map<Address, List<PendingTransaction>> getAllBySender();
91102

92103
/**

0 commit comments

Comments
 (0)