-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BorshDeserialize errors in system_program.rs
and idl.rs
#2511
Comments
+1 |
1 similar comment
+1 |
This will be fixed by #2512. |
is there anything we can do to patch it in the meantime while waiting for the merge? |
This currently works: [dependencies]
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
getrandom = { version = "0.2.9", features = ["custom"] }
solana-program = "=1.14.17"
winnow = "=0.4.1"
toml_datetime = "=0.6.1" |
thanks @acheroncrypto |
i think something is still wrong though, it passes the dependencies however it seems to fail on any RPCs which creates an account Error:
#[derive(Accounts)]
pub struct CreateUser<'info> {
#[account(
init_if_needed,
payer = signer,
seeds = [b"user", signer.key().as_ref()],
bump,
space = User::len(),
)]
pub user_pda: Account<'info, User>,
#[account(mut)]
pub signer: Signer<'info>,
pub system_program: Program<'info, System>,
}
#[account]
pub struct User {
pub test: bool,
pub bump: u8,
} const [pda, _] = web3.PublicKey.findProgramAddressSync(
[Buffer.from(anchor.utils.bytes.utf8.encode("user"))],
program.programId
);
// Create user
const tx = await program.methods
.createUser()
.accounts({
userPda: pda,
signer: user.publicKey,
systemProgram: web3.SystemProgram.programId,
})
.signers([user])
.rpc(); |
ah nvm, it works after i also downgraded my solana CLI to 1.14.17 for those having issues you can try sh -c "$(curl -sSfL https://release.solana.com/v1.14.17install)" in addition to [dependencies]
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
getrandom = { version = "0.2.9", features = ["custom"] }
solana-program = "=1.14.17"
winnow = "=0.4.1"
toml_datetime = "=0.6.1" |
This is fixed in |
@acheroncrypto I still get this error around
|
Note that if you use solana stable, you'll get this error:
So in order to use anchor 28 you have to be on solana beta, |
@ChewingGlass you can use both |
I've tried anchor build for 0.26.0 and 0.27.0 and both give the following errors.
In addition i also had to add
#![feature(trivial_bounds)]
to lib.rs.Anyone knows why? doesnt anchor build use its own rustc version? why then does it keep giving me nightly build errors
adding
#![feature(trivial_bounds)]
to lib.rs makes the top error go away, however i still get another errorThe text was updated successfully, but these errors were encountered: