Skip to content

feat: advertise configured account heads during discovery - #404

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

Cryptoloveer wants to merge 8 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 all configured public keys to their current account-head transactions in one repository query.
  • Include those heads alongside the existing random sample without changing the wire protocol.
  • Ignore configured public keys that are not present locally.
  • 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.
  • Addressed maintainer feedback by replacing per-address reads with one bulk query and removing the redundant algorithm check.
  • Awaiting refreshed CI on the synchronized branch before marking the draft ready.

Reward address

atto://ad5mogtl3hfcherkbufxiewl7k74q7svljqdfgnby7d52lj4o2ifh2horqj6u

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?

Comment thread src/main/kotlin/cash/atto/node/bootstrap/discovery/LastDiscoverer.kt Outdated
@rotilho rotilho added the contribution-minor Small improvements or bug fixes label Sep 21, 2026
@atto-reward-bot

Copy link
Copy Markdown

Thank you for your contribution! 🎉 This PR is eligible for an contribution-minor reward as a token of our appreciation. If you'd like to receive it, please add your address to the description of this PR. 🙏

@atto-reward-bot

Copy link
Copy Markdown

Thank you for your contribution! 🎉 This PR is eligible for an contribution-minor reward as a token of our appreciation and will be sent to atto://ad5mogtl3hfcherkbufxiewl7k74q7svljqdfgnby7d52lj4o2ifh2horqj6u once merged. Please note that rewards are not payments but our way of saying thank you. 🙏

@atto-reward-bot atto-reward-bot Bot added the reward-informed Contributor has been informed about their reward. label Oct 3, 2026
@Cryptoloveer

Copy link
Copy Markdown
Author

The requested bulk-read change is now pushed, the review thread has been addressed, and the branch is synchronized with current main. Could a maintainer approve the refreshed CI run? I’ll keep the PR in draft until it passes.

This branch has not been deployed

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

Labels

contribution-minor Small improvements or bug fixes reward-informed Contributor has been informed about their reward.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address Hinting

2 participants