ava-labs / icm-services

Services for relaying Avalanche ICM messages between L1s
Other
24 stars 19 forks source link

Construct signatures for a specific p-chain height #501

Open iansuvak opened 2 months ago

iansuvak commented 2 months ago

Context and scope CreateSignedMessage right now assumes that the ProposerVM P-Chain height for the destination chain is the latest height. This is not a valid assumption at all times and it should optionally accept a specific height for which to create a signature since any changes in the signing subnets validator set as viewed by the destination chain (via p-chain) can make the aggregated signature invalid as the validator bit set would change in those cases.

Discussion and alternatives

Open questions

cam-schultz commented 1 month ago

As an alternative to #506 , we may want to instead integrate the following Avalanchego changes once they are merged:

This will allow us to fetch the valdiator set that will be used to verify signatures on the L1 side directly from the P-Chain. We will also be able to connect to validators of any L1 without requiring manual tracking or L1-specific API nodes.