Skip to content

Treat an event no relay accepted as a failed send - #1001

Merged
kwsantiago merged 2 commits into
mainfrom
require-relay-accept
Oct 6, 2026
Merged

kwsantiago merged 2 commits into
mainfrom
require-relay-accept

Conversation

@kwsantiago

@kwsantiago kwsantiago commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Client::send_event in nostr-relay-pool 0.44 returns Ok even when every relay refused the event; the refusals are only listed in the returned output. The FROST transport, the DKG transport and frost network group-create ignored that output, so a refused event counted as sent: group-create --publish reported the roster as published when no relay stored it, and signing or DKG rounds later timed out without saying why.

All three now fail when no relay accepted the event, naming each relay's reason.

Where a refused send must not end the operation:

  • DKG rounds log it and retry on the next pass, and a participant leaves each round only once a relay has accepted its own round event (round 1, each round-2 share, the confirmation). Before, a participant whose only send was refused could still finish the round, leaving its peers to time out.
  • A refused first announce in run() is logged and left to the periodic re-announce; other failures, such as a TPM quote, still stop the node.
  • A signature share refused for one participant is still sent to the others, failing only when no participant was reached, since the nonces are already spent.

Tests: a unit test covers accepted, partly refused and fully refused sends. The in-memory test transport can now refuse matching events: a DKG whose first send of each round is refused completes (it timed out before), a node whose first announce is refused keeps running, and a 3-of-3 round signs when one cosigner's share to another is refused. The first two fail without their fix; the signing test depends on peer order and failed in 4 of 6 runs without it. keep-frost-net and keep-cli tests pass, and both real-relay multinode tests (signing, and learning followed by interactive signing) pass against a public relay, so relays acknowledge the ephemeral protocol events as before.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c7346377-0aac-406e-8443-97da896ac7c7
📥 Commits

Reviewing files that changed from the base of the PR and between fa9acb9 and 62b8036.

📒 Files selected for processing (7)
  • keep-cli/src/commands/frost_network/dkg.rs
  • keep-frost-net/src/dkg.rs
  • keep-frost-net/src/node/mod.rs
  • keep-frost-net/src/node/signing.rs
  • keep-frost-net/src/node/transport.rs
  • keep-frost-net/src/test_support.rs
  • keep-frost-net/tests/signing_memory_test.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kwsantiago
kwsantiago merged commit f72c8b1 into main Oct 6, 2026
12 checks passed
@kwsantiago
kwsantiago deleted the require-relay-accept branch October 6, 2026 22:46
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.

1 participant