fix(gno): support inter-realm cross-calls in voyager tx and state plugins - #5478
fix(gno): support inter-realm cross-calls in voyager tx and state plugins#5478aronpark1007 wants to merge 18 commits into
Conversation
|
@aronpark1007 is attempting to deploy a commit to the unionbuild Team on Vercel. A member of the Team first needs to authorize it. |
|
Right now the gno event interface defines every field the on-chain event emits, but most of them end up marked For example, union/voyager/plugins/event-source/gno/src/ibc_events.rs Lines 84 to 96 in 75feaf2 is only actually consumed like this (rest marked union/voyager/plugins/event-source/gno/src/lib.rs Lines 1014 to 1026 in 75feaf2 vs. Sui's equivalent, which only carries the fields it needs: union/voyager/plugins/event-source/sui/src/events.rs Lines 119 to 124 in 75feaf2 |
|
@aronpark1007 the event parsing can also be implemented more intelligently to use all of the emitted fields in the gno event, up to y'all how you want to emit them on-chain |
75feaf2 to
b9f9286
Compare
|
@benluelo Added a BPTREE_PROOF_SPEC/GNO_SPECS in lib/ics23 matching gno's actual bptree spec, wired it into the gno client-bootstrap so new clients use it, and along the way found+fixed an inverted max_depth check bug in ics23 that was silently broken until now. Added a regression test using a real proof pulled from topaz-1 (post-migration) to make sure it actually verifies. |
|
For reference, here is what we had to do for our ts-relayer to support ics23:bptree spec https://github.com/allinbits/ibc-v2-ts-relayer/pull/24/changes |
benluelo
left a comment
There was a problem hiding this comment.
given the changes to the proof format, we'll either 1. need to implement a bptree verifier in solidity or 2. use proof lens clients for gno
|
@benluelo, Confirmed proof-lens bridging works correctly on-chain end to end. One issue we ran into along the way: voyager-plugin-transaction-batch and voyager-plugin-transaction-batch-proof-lens can end up registered on the same chain, but the plain transaction-batch plugin can't handle events for a proof-lens client (encode_proof intentionally errors — "proofs for this client must be encoded for the underlying l1 client"). Since both plugins' interest_filter is effectively "take everything" (Any) or "take only these ids" (Many), leaving either on Any causes it to grab events meant for the other, causing a fatal error. Working around this today by scoping both to Many with disjoint, explicitly-listed client_ids per chain — which works, but means manually maintaining an up-to-date id list any time a client is (re)created on that chain. Is there a better way to handle this scoping, or would you be open to adding a Deny variant to ClientConfigsSerde (exclude a small set of ids, allow everything else) so we only need to track the proof-lens id(s) instead of every other client on the chain? |
|
the normal batch plugin and the proof lens plugin are mutually exclusive; only one needs to be registered for a chain. having both of them registered doesn't make any sense |
You were right — we had transaction-batch and transaction-batch-proof-lens both registered on the same chain, which was unnecessary. Removed the plain transaction-batch entry for that chain and reverted the proof-lens one back to Any. Confirmed bidirectional transfer works end-to-end with this simpler setup. Thank you for the quick feedback! |
gno tx plugin error handlingPreviously every gno tx failure was retried forever. This PR classifies known
@benluelo, Would appreciate confirmation on the Retry (unconfirmed) rows — can any of these actually be permanent, or are they always transient races? |
f630687 to
f35f1a5
Compare
|
looks fine to me, any issues will be sorted out as Voyager is actually run anyways. |
4381311 to
fd1bd97
Compare
… of index 0 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
fyi, gnolang/gno#5937 is merged. |
Summary
Rewrites gno tx plugin msg templates for the new inter-realm cross-call convention, fixes state-module parsing, and completes gno event-source parsing for
batch_send/packet_ackwhich were previously unimplemented stubs.Changes
voyager/plugins/transaction/gno/src/main.rstypes.NewMsg*(...)constructors undercur realm/cross(cur)fee_recipientvoyager/modules/state/gno/src/main.rsparse_gno_string_objectreturn formatsPacketSendevent by type instead of by indexquery_packet_by_hashvoyager/plugins/event-source/gno/src/ibc_events.rschunked_attrhelper to reassemble hex values gno splits across multiple attrs, used forpacket_data,acknowledgement,maker_msgBatchSend { packet_hash, batch_hash, channel_id }parsing (previously{}stub)PacketAck { packet_hash, source_channel_id, source_connection_id, source_connection_client_id, destination_channel_id, destination_channel_version, destination_connection_id, destination_connection_client_id, timeout_timestamp, acknowledgement, maker }parsing (previously{}stub)PacketRecvdown to the fields gno actually emits (packet_hash,destination_channel_id,maker_msg)voyager/plugins/event-source/gno/src/lib.rsBatchSend/PacketAckconstruction (channel/connection state queries →ibc_union_spec::eventassembly)PacketRecvmatch arm to the trimmed field setTest plan
cargo +nightly-2025-12-05 check -p voyager-event-source-plugin-gnopasses cleanly (workspace-widecargo checkis blocked by an unrelated macOS/nightlyembed-commitlink-section issue, not touched by this branch)emitPacketAckEvent) to confirm they match