Skip to content

feat: advertise configured account heads during discovery - #404

Draft
Cryptoloveer wants to merge 6 commits into
attocash:mainfrom
Cryptoloveer:feat/address-hinting
Draft

Cryptoloveer wants to merge 6 commits into
attocash:mainfrom
Cryptoloveer:feat/address-hinting

Conversation

@Cryptoloveer

@Cryptoloveer Cryptoloveer commented Sep 14, 2026

Copy link
Copy Markdown

Problem

Last-transaction discovery advertises only a random sample of account heads. Operators cannot ensure that locally important accounts are included in each discovery broadcast, so those accounts may take longer to be discovered by peers.

Fix

  • Add atto.bootstrap.discovery.hinted-addresses as a local configuration property.
  • Resolve configured addresses to their current account heads during each historical-node broadcast.
  • Include those heads alongside the existing random sample without changing the wire protocol.
  • Skip configured addresses that are not present locally or whose stored algorithm does not match.
  • Deduplicate hinted heads that are already present in the random sample.

Validation

  • Added a focused test covering a configured head alongside the random sample.
  • The test verifies that a hinted head already in the random sample is emitted only once.
  • Updated the existing unit-test fixture for the new configuration dependency.
  • Awaiting upstream CI before marking the draft ready for review.

Closes #213.

@Cryptoloveer

Copy link
Copy Markdown
Author

The focused implementation and duplicate-head test are now in place, and the branch is synchronized with current main. Could a maintainer approve the fork workflow run so I can confirm the full test suite before marking this ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address Hinting

1 participant