wormhole-foundation / wormhole-scaffolding

Starter apps with Wormhole integration
Other
49 stars 33 forks source link

solana: Hello World, missing message length check #3

Closed a5-pickle closed 1 year ago

a5-pickle commented 2 years ago

Objective

Add message size check for both send_message and receive_message. Messages should not exceed the max account size of the Received account. RE: TODO doc.

Because the Received account's max size is 512 bytes, the Hello World program needs to check that the message it deserializes does not exceed this number of bytes.

Consider making the account max size smaller.

Should also add these length checks on the other network Hello World contracts.

Definition of Done

a5-pickle commented 2 years ago

We are going to add to the whitepaper a specification of the maximum message size, too.

a5-pickle commented 1 year ago

I changed the objective to make the account's max size for the received payload to 512 from 1028 because if the Wormhole messages exceeds some number of bytes (~860), posting the verified Wormhole message will fail (so we would not be able to redeem this VAA in the Hello World program).