Repository navigation
Conversation
A trailing `asof:<blockhash>` is the opt-in by itself. It was refused unless the connection had negotiated `1.4.2-asof`, which also held that connection to 1.4.x shapes, so a 1.6 client could not use as-of. `1.4.2-asof` is still accepted for clients that negotiate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
REQUEST_CHANGES
1 bug, 1 nit.
The scripthash and transaction.get rows in COMPAT.md still require negotiating 1.4.2-asof. See the comment on the new paragraph: a 1.6 client that follows those rows still loses 1.6 shapes.
Nit: the updated dispatch assertion message still says "without dialect".
| without the dialect is an error. `server.features.protocol_max` stays | ||
| `"1.6"`. As-of discovery is `asof` / `asof_protocol` (`1.4.2-asof`), not | ||
| `protocol_max`. | ||
| Electrum clients that want as-of add a trailing `asof:<blockhash>` |
There was a problem hiding this comment.
The scripthash row still says a trailing asof: "Requires negotiated 1.4.2-asof (first server.version only)", and the transaction.get / get_merkle row still says "same dialect as scripthash". This paragraph says the token works on any negotiated protocol. A client that follows the method table sends server.version with 1.4.2-asof. negotiate_protocol still returns that string, so protocol_ge_1_6 stays false and blockchain.block.headers stays the 1.4 hex blob. Drop the requirement from both rows. Keep asof_protocol as the legacy version that pins 1.4.x shapes; the last sentence here should not tell a client that negotiating it is how they turn the token on.
There was a problem hiding this comment.
Addressed in 22cdebb: the scripthash and transaction.get / get_merkle rows no longer require the dialect, the server.version row and the paragraph call 1.4.2-asof the legacy dialect that pins 1.4.x shapes, and discovery is server.features.asof.
| assert!(err.contains("1.4.2-asof"), "asof without dialect: {err}"); | ||
| assert!( | ||
| err.contains("asof not on chain"), | ||
| "asof without dialect: {err}" |
There was a problem hiding this comment.
Nit: the failure text still says "asof without dialect". This check is now that an unknown hash returns asof not on chain.
There was a problem hiding this comment.
Addressed in 22cdebb: the message is now "unknown asof hash".
… legacy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
APPROVE
Both earlier findings are fixed. The scripthash and transaction.get / get_merkle rows no longer require negotiating 1.4.2-asof, and asof_protocol is the legacy pin that still forces 1.4.x shapes. The assertion message now says unknown asof hash.
Nothing new. The added commit is those two edits only.
A trailing
asof:<blockhash>is now the opt-in by itself.take_trailing_asofrefused it withasof requires protocol 1.4.2-asofunless the connection had negotiated that dialect. Negotiating it also setsconn.protocolto1.4.2-asof, soprotocol_ge_1_6is false for the whole connection: a client that wanted as-of lost 1.6 shapes such as theblockchain.block.headersheadersarray.take_trailing_asofandelectrum_at_chain_viewlose theasof_okflag; the three per-method callers and the connection path stop computing it.server.version(name, "1.4.2-asof")is still accepted and still echoed, so clients that negotiate it see no change.server.featuresstill reportsasofandasof_protocol.asof:prefix as the last argument, on the five methods inmethod_stamps_chain_tip. A bare trailing hex hash is still not taken as asof.Test:
electrum_and_esplora_asof_hides_later_spendnow opens a 1.6 connection, sendsasof:onget_balanceand gets the as-of balance andchain_tip, then checksblock.headersstill returnsheaders. It failed before the change withasof requires protocol 1.4.2-asof. The rest of the journey still runs on a1.4.2-asofconnection.Local: fmt, clippy, deny, ast-grep and
ci-os-smoke.shpass.cargo test --workspace --no-fail-fasthad two timing failures outside Electrum under full-workspace load (tip_accept::two_full_senders_both_enqueue,cross_surface::sv2_tp_bootstrap); each passes 3 of 3 alone.🤖 Generated with Claude Code