solana-labs / oyster

oyster.vercel.app
Apache License 2.0
116 stars 127 forks source link

fixed vote options serialization #560

Open yamijuan opened 1 year ago

yamijuan commented 1 year ago

Fixed vote type serialization on Multiple choice vote type. It was using 16 bits but only sending one data, now it sends 2 option in the same 16 bits.

We also found a couple of inconsistencies!

vercel[bot] commented 1 year ago

@yamijuan is attempting to deploy a commit to the Solana Team on Vercel.

A member of the Team first needs to authorize it.

tyirenkyi commented 1 year ago

Fixed vote type serialization on Multiple choice vote type. It was using 16 bits but only sending one data, now it sends 2 option in the same 16 bits.

We also found a couple of inconsistencies!

Deserialisation should work with this fix because of the VoteTypeKind enum. Also by setting both max_voter_options and max_winning_options to the value of choiceCount this validation will pass

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
oyster-governance ✅ Ready (Inspect) Visit Preview Oct 20, 2022 at 4:40PM (UTC)
SebastianBor commented 1 year ago

Fixed vote type serialization on Multiple choice vote type. It was using 16 bits but only sending one data, now it sends 2 option in the same 16 bits.

Are you planning to use or already using multi choice voting? I'm asking because we are planing to make some breaking changes to it and it would be better to wait. More details here https://github.com/solana-labs/solana-program-library/pull/3721

tyirenkyi commented 1 year ago

We aren't using multiple choice right now