I was using anchor version 0.25.0
, this error was not in that version, Now I'm using latest version of anchor, I'm using zero_copy on all the structs
here are the dependencies
[profile.release]
overflow-checks = true
[dependencies]
#anchor-lang = {version = "0.30.1", features = ["init-if-needed"]}
#anchor-spl = {version = "0.30.1"}
anchor-lang = { git = "https://github.com/coral-xyz/anchor", features = ["init-if-needed"] }
anchor-spl = { git = "https://github.com/coral-xyz/anchor" }
borsh = {version = "0.10.3", features = ["const-generics"]}
mpl-token-metadata = {version = "3.2.3"}
solana-program = {version = "1.18.18"}
streamflow-sdk = {version = "0.6.2", features = ["cpi","mainnet"]}
bytemuck = {version = "1.9.1", features = ["derive", "min_const_generics"]}
Build gets finished but i get this type of errors for 4 functions, Will the program and this function work if i were to deploy this program from this build ?
Edit :
I used the anchor-lang
and anchor-spl
from github
rather then 0.30.1
then i get this error
the trait bound `streamflow_sdk::cpi::accounts::Update<'_>: anchor_lang::ToAccountInfos<'_>` is not satisfied
--> programs/nodestore/src/helpers.rs:525:9
|
523 | let cpi_ctx = CpiContext::new_with_signer(
| --------------------------- required by a bound introduced by this call
524 | ctx.accounts.streamflow_program.to_account_info(),
525 | accs,
| ^^^^ the trait `anchor_lang::ToAccountInfos<'_>` is not implemented for `streamflow_sdk::cpi::accounts::Update<'_>`
|
help: trait impl with same name found
--> src/lib.rs:580:10
= note: perhaps two different versions of crate `anchor_lang` are being used?
= help: the following other types implement trait `anchor_lang::ToAccountInfos<'info>`:
Box<T>
anchor_spl::associated_token::Create<'info>
associated_token::__cpi_client_accounts_create::Create<'info>
anchor_spl::token::Transfer<'info>
anchor_spl::token::__cpi_client_accounts_transfer::Transfer<'info>
anchor_spl::token::TransferChecked<'info>
anchor_spl::token::__cpi_client_accounts_transfer_checked::TransferChecked<'info>
anchor_lang::prelude::Sysvar<'info, T>
and 248 others
note: required by a bound in `anchor_lang::context::CpiContext::<'a, 'b, 'c, 'info, T>::new_with_signer`
--> src/context.rs:195:5
= note: this error originates in the derive macro `Accounts` (in Nightly builds, run with -Z macro-backtrace for more info)
This is probably beacuse conflicting anchor versions
Edit 2 :
I commented these version errors, Now i get this stack frame error in 1 function, even when using the anchor version from github
Error: Function _ZN9nodestore9nodestore22advance_rewards_pt_fnd17h04aae59db81a97b7E Stack offset of 6648 exceeded max offset of 4096 by 2552 bytes, please minimize large stack variables