composable-ibc icon indicating copy to clipboard operation
composable-ibc copied to clipboard

ics-cf-solana light-client: header verification & client update; protobuf impl

Open vmarkushin opened this issue 1 year ago • 1 comments

Implemented initial version of the client header verification and state update, and Protobuf (de)serialisation.

The library is based on cf-guest crate and reuses some functionality from there. The verification of Shreds is performed by the functions taken from Solana's codebase. Some code was copy-pasted from the repo due to absence of no-std support, mentioning the original's file source path.

The current version of the code doesn't contain proper tests - they will be added when the client is supported in hyperspace-solana.

vmarkushin avatar Aug 05 '24 18:08 vmarkushin

If I understand correctly, Header contains the entire Solana block (i.e. all shreds)? That can be rather big, no?

There is no requirement for that, but also no limit for how many shreds can be sent. I think it's reasonable to limit the amount of shreds only to be able to restore the last entry (to calculate the hash) + (potentially) some meta information, like validators change

vmarkushin avatar Aug 06 '24 19:08 vmarkushin