draffle-io / draffle

dRaffle is a decentralized raffle protocol on Solana
82 stars 81 forks source link

Error while creating raffle: panicked at 'from_bytes_mut>SizeMismatch' #24

Closed KartikSoneji closed 2 years ago

KartikSoneji commented 2 years ago

After #11 , the on-chain program itself is not updated, so using the latest client results in an error:

Program 11111111111111111111111111111111 invoke [1],
Program 11111111111111111111111111111111 success,
Program dRafA7ymQiLKjR5dmmdZC9RPX4EQUjqYFB3mWokRuDs invoke [1],
Program 11111111111111111111111111111111 invoke [2],
Program 11111111111111111111111111111111 success,
Program 11111111111111111111111111111111 invoke [2],
Program 11111111111111111111111111111111 success,
Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2],
Program log: Instruction: InitializeAccount,
Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3585 of 352681 compute units,
Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success,
Program log: libstd rust_begin_panic,
Program log: panicked at 'from_bytes_mut>SizeMismatch',
    /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytemuck-1.7.2/src/lib.rs:115:3,
Program dRafA7ymQiLKjR5dmmdZC9RPX4EQUjqYFB3mWokRuDs consumed 66548 of 400000 compute units,
Program failed to complete: BPF program panicked,
Program dRafA7ymQiLKjR5dmmdZC9RPX4EQUjqYFB3mWokRuDs failed: Program failed to complete,

Latest working commit is dd90e8b7c5a6a8743a0b5869a3b8b6dbce19cfb8

moneytoad888 commented 2 years ago

The on-chain program is running the tag v1.0.0

Changes have been added on top to make things more flexible and we might have a v2 soon.

If you want to use the CLI, please checkout the tag and work with that

KartikSoneji commented 2 years ago

Hi @moneytoad888

The on-chain program is running the tag v1.0.0

Got it, but maybe that should be in the readme? Took me a while to figure out what the issue was.

moneytoad888 commented 2 years ago

Hi @moneytoad888

The on-chain program is running the tag v1.0.0

Got it, but maybe that should be in the readme? Took me a while to figure out what the issue was.

Yep sorry for that, at first i thought nobody will ever use it.

I updated the readme with a bit more background