Repository navigation
Relayer: record of sent transactions (R15), IPv6 by /64 (R16), URLs cut in logs (R17) - #267
Merged
Merged
Conversation
…its (R16), URLs cut in logs (R17) Audit 2026-11-24: - R15: every relay transaction is written, signed, to relay-sends.json in the state directory before it is broadcast. An answer lost on sending with the transaction not found is "unknown", not forgotten: the UP stays blocked and the same operation sent again gets the same signed transaction broadcast again, never a second one. A transaction is settled when mined, when its operation's nonce is used, or when another relayer transaction used its nonce while it was never seen (the UP is then unblocked); one not seen is broadcast again meanwhile. The record is read again after a restart; an unreadable one is moved aside. The relayer unit gets StateDirectory=crosschain-relayer (shared with the monitor). - R16: the per-IP limit keys an IPv6 address by its /64 (ipKey, as the signing service), nginx's zone too (tools/nginx/relay-limit.conf: a map from $remote_addr, checked against ipKey on 400 random addresses with nginx 1.24); the global limit is charged after the shape checks and the lookup of an operation already sent; the per-UP lock is taken after the handleOps simulation. - R17: log lines keep only the scheme and host of URLs; the monitor's findings and emails too. README: the record, the order of the limits, the nginx step (sparse checkout of tools/nginx), tests. Tests: test/limits.js 32/32 (13 new). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three findings of the 2026-11-24 review, all in
tools/relayerandtools/nginx. Nothing changes in the pages.R15: record of sent transactions (Medium)
Every relay transaction is now written, signed, to a record before it is broadcast. The record is
relay-sends.jsonin/var/lib/crosschain-relayer, mode 600.notSent: false, as before;StateDirectory=crosschain-relayer, the same directory as the monitor.R16: one IPv6 /64 could deny the relayer (Low)
ipKey()as the signing service.tools/nginx/relay-limit.confnow has amapfrom$remote_addr.handleOpssimulation, so a forged operation never holds it.R17: raw errors in the logs (Low)
….Tests
npm testintools/relayer: 32/32 (13 new):nginx -tpasses with the new file.ipKey(), and that key is their first 64 bits.::1,::, IPv4,::ffff:1.2.3.4,2001:db8::1,fe80::1:2:3:4:5.Deploy (after merge)
StateDirectory).tools/nginxto the server clone's sparse checkout, copyrelay-limit.confinto/etc/nginx/conf.d/, runnginx -tand reload nginx.The README has the commands.
Generated by Claude Code