Skip to content

docs: Extractor-based foreign chain transaction validation design update#1931

Merged
DSharifi merged 5 commits intomainfrom
1926-extend-foreign-chain-transaction-design-to-allow-validating-logs-events-and-execution-status-for-certain-chains
Feb 3, 2026
Merged

docs: Extractor-based foreign chain transaction validation design update#1931
DSharifi merged 5 commits intomainfrom
1926-extend-foreign-chain-transaction-design-to-allow-validating-logs-events-and-execution-status-for-certain-chains

Conversation

@netrome
Copy link
Collaborator

@netrome netrome commented Feb 1, 2026

closes #1926

This PR extends the foreign chain transaction verification design with extractor-based requests, enabling more fine-grained observations (e.g. receipts, logs, events) to be signed by the MPC network.

@netrome netrome self-assigned this Feb 1, 2026
@netrome netrome changed the title 1926 extend foreign chain transaction design to allow validating logs events and execution status for certain chains docs: Extractor-based foreign chain transaction validation design update Feb 1, 2026

1. **Extractor set required by the bridge team:**

* Which EVM extractors are needed (confirmations, success, specific log digest, log topic0, etc.)?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is cool to have topics, but maybe this will complicate the request a little bit. It will be much easier for us to adopt the contract to post the message as raw data.

More info about the difference between topics and data:
https://medium.com/@andrey_obruchkov/understanding-events-the-evms-built-in-log-system-2c94e448acbd

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The emitter event is the most import part, we have to verify that the event has been emited by our contract address

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, for EVMs we already know how generate proof for event based on the block hash, so if we are in rush then we are ok to have just the block hash extractor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful. I've updated the list of initial extractors in d547048 as per our discussions. Let me know if this matches your needs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the BlockHash extractor for the EVM and Bitcoin, and the two Solana extractors.

1. **Extractor set required by the bridge team:**

* Which EVM extractors are needed (confirmations, success, specific log digest, log topic0, etc.)?
* Which Solana extractors are needed (tx success, slot, instruction digest vs account-state digest)?
Copy link

@karim-en karim-en Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimal requirement for Solana is to verify the cpi events.
But we have to take into account that the RPC response is tricky, here is an example
We want to get the data in this instruction, but you can see that the emitter address is programIdIndex: 12, it is the 12th account, so we have to use the accounts array to get the real address

          {
              "accounts": [
                2,
                3,
                10,
                5,
                0,
                7,
                15,
                9,
                18,
                14,
                12
              ],
              "data": "ErVLopvJcPTFcfg8wd8xfj9MSrKGWTANBwwQQDex865F7DtBNnYLnodbhzFb8Y4Xxd79w228czP8pupG3RDaiCFtAhkW4ZsKmGSsVmgU9Vr5ira5aZztvYvNtYPCKAoujSXQWFTW5VK22W4QDPTuz3UuLoKM1591fxj9yo6oEemF9SYcpfSAf9aZqjDmSMZ8Wri2mT7kY5hYGy8Tm9UXJ9NRkcvkC1sU24FxJtoCGPBh8Ji9ZNGYCHqkqYUDSeUPdZJNwMAmsaFmcHPnSkWVMzGBcYg",
              "programIdIndex": 12,
              "stackHeight": 2
            },
        "accountKeys": [
          "9WL2A89YBr6X47ABKYNzPentWiBA3H8tpaiuf5CaYHx6",
          "BFasrjBGJmBsjj9rp1QJiXJsqi34yP4Y1dr2bomKezhD",
          "2yVjuQwpsvdsrywzsJJVs9Ueh4zayyo5DYJbBNc3DDpn",
          "4NKTVpUKP3Qn7nZtnZbuddr1CC8JYjqFhtEGDTsz4MKj",
          "6tckHFBpiJ8YgYN8FUskvtvTpXQZ55g5LHeo1kvELoDQ",
          "79nePUUxtfJSdrkbririgL5YMaoEh5g4HNQaar2EuJ7",
          "8DeAMZyCsXfGysyGyfdpL35KhBAaBQm9rqJUGYhK6dJG",
          "9bFNrXNb2WTx8fMHXCheaZqkLZ3YCCaiqTftHxeintHy",
          "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
          "11111111111111111111111111111111",
          "2iANpDh96GgithLPTVMZjZFtnbrYBUCLqnEvaytbwTQq",
          "dahPEoZGXfyV58JqqH85okdHmpN8U2q8owgPUXSCPxe",
          "EtZMZM22ViKMo4r5y4Anovs3wKQ2owUmDpjygnMMcdEX",
          "FvULawNPGBbuwYus74ECaQoV1oH9Tk6XPN7VPN51NYds",
          "HQS31aApX3DDkuXgSpV9XyDUNtFgQ31pUn5BNWHG2PSp",
          "SysvarC1ock11111111111111111111111111111111",
          "SysvarRent111111111111111111111111111111111",
          "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
          "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"
        ],
        

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that is just an implementation of the extractor right? Since the implementation would be defined in the MPC code, it is fine if we need to index an array

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we synced on this in the meeting. We'll add two extractors for Solana: SolanaProgramIdIndex and SolanaDataHash. They will extract the "programIdIndex" and a hash of the "data" field above. @karim-en confirmed this should be sufficient.

Note: if we need more information later, it will be easy to add extractors.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the extractors in d547048

@netrome netrome force-pushed the 1926-extend-foreign-chain-transaction-design-to-allow-validating-logs-events-and-execution-status-for-certain-chains branch from bc700f1 to 224c3e4 Compare February 2, 2026 08:44
Base automatically changed from 1924-initial-round-of-updates-to-foreign-chain-transaction-design-doc to main February 2, 2026 12:59
@netrome
Copy link
Collaborator Author

netrome commented Feb 2, 2026

We just had a meeting on this. We're aligned that this design makes sense, and initially it seems we only need three extractors:

  • BlockHash for Bitcoin + EVM chains. (Might want to add these as specific extractors per chain, but that's not important right now).
  • SolanaProgramIdIndex and SolanaDataHash for Solana. These are a bit more complicated but should be fairly isolated.

I'll update the design doc, @DSharifi will account for this in his DTO PR and we'll take it from there.

@netrome netrome force-pushed the 1926-extend-foreign-chain-transaction-design-to-allow-validating-logs-events-and-execution-status-for-certain-chains branch from 224c3e4 to 9b86196 Compare February 2, 2026 13:58
Copy link
Contributor

@DSharifi DSharifi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some questions, but looks mostly good to me

pub domain_id: DomainId,

// Extractor-based observation request
pub extractors: Vec<Extractor>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a Set instead of Vec? I assume we don't want duplicate extractors

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Order will matter here though so I'm not sure if we want to use a Set. Even a BTreeSet with well-defined ordering feels like it may risk reordering something the users pass if they use another language and just pass some sequence to the method. Therefore it feels safer to just take a vec and return the same ordering. The caller pays for the gas anyway so deduplication feels like their concern. Duplication is not a problem on our side.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not change this now for this reason. We're not tied to exactly the structures in this design doc, let's just make sure to update it as we move forward if we change anything.

@netrome netrome force-pushed the 1926-extend-foreign-chain-transaction-design-to-allow-validating-logs-events-and-execution-status-for-certain-chains branch from a676245 to 922d120 Compare February 3, 2026 08:20
Copy link
Contributor

@gilcu3 gilcu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@DSharifi DSharifi added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 627f30d Feb 3, 2026
8 checks passed
@DSharifi DSharifi deleted the 1926-extend-foreign-chain-transaction-design-to-allow-validating-logs-events-and-execution-status-for-certain-chains branch February 3, 2026 09:49
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.

Extend foreign chain transaction design to allow validating logs, events and execution status for certain chains

5 participants