Finally implement the "sticky" chain node #9

Merged
zxq9 merged 3 commits from designated-hitter into master 2025-10-29 15:50:10 +09:00
Owner

The first node in the list of chain nodes you configure is considered "sticky".

What this means is that posting transactions and requesting "next nonce" will always be directed to that node, but other queries will be submitted to the rest of the nodes in a round-robin fashion.
This solves the problem of high frequency TX posting being dangerous (you can get into a nonce nightmare that takes a generation or two to sort out) if you have more than one post TX coming from the same sender in quick succession posting to different backend nodes.

The first node in the list of chain nodes you configure is considered "sticky". What this means is that posting transactions and requesting "next nonce" will always be directed to that node, but other queries will be submitted to the rest of the nodes in a round-robin fashion. This solves the problem of high frequency TX posting being dangerous (you can get into a nonce nightmare that takes a generation or two to sort out) if you have more than one post TX coming from the same sender in quick succession posting to different backend nodes.
zxq9 added 1 commit 2025-10-25 13:49:24 +09:00
zxq9 requested review from dimitar.p.ivanov 2025-10-25 13:50:18 +09:00
zxq9 requested review from spivee 2025-10-25 13:50:19 +09:00
zxq9 requested review from uwiger 2025-10-25 13:50:20 +09:00
zxq9 added 1 commit 2025-10-25 13:51:39 +09:00
spivee approved these changes 2025-10-25 14:25:35 +09:00
spivee left a comment
Member

Nice! Nonce issues get pretty annoying, so this is super handy. I like that the user can decide whether the sticky node can help bear the dry run load by putting it in the list twice or just once.

Also connect_slowly made me laugh.

Nice! Nonce issues get pretty annoying, so this is super handy. I like that the user can decide whether the sticky node can help bear the dry run load by putting it in the list twice or just once. Also `connect_slowly` made me laugh.
Author
Owner

I should do a little documentation update to this, now that I think about it. I don't know that the purpose is explained well in the project docs, and this is a fairly significant, if small in terms of code size, change.

I should do a little documentation update to this, now that I think about it. I don't know that the purpose is explained well in the project docs, and this is a fairly significant, if small in terms of code size, change.
zxq9 added 1 commit 2025-10-29 15:34:50 +09:00
zxq9 merged commit 823291986e into master 2025-10-29 15:50:10 +09:00
zxq9 deleted branch designated-hitter 2025-10-29 15:50:11 +09:00
Sign in to join this conversation.
No Milestone
No project
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/hakuzaru#9
No description provided.