darwinia-network / darwinia-messages-sol

Darwinia cross-chain messages gateway and protocol for EVM developers 💌
MIT License
29 stars 8 forks source link

Truth layer cache latest N block for relayer to verify message #131

Open hujw77 opened 2 years ago

hujw77 commented 2 years ago

issue

... 4 5 6 7 8 9 
...   A   B   C               

If user send a message in block A, a relayer relay the message at block B, when light client import block C. The relayer should refresh the proof to block C.

solution

Light client could cache latest N block for relayer to verify old message.

BUT, message layer only accept the newest state to apply, so only verify the newest block at light client may be better.