#ledger protocol version too old for host

13 messages · Page 1 of 1 (latest)

tawdry gulch
#

I'm upgrading my contracts from protocol version 21 to 22, but getting ledger protocol version too old for host when running cargo test. I've made sure to update the soroban-sdk version to 22.0.1 in my Cargo.toml file. I've also checked the Soroban-related package versions in Cargo.lock and they are all on 22 and above. Any idea what might be wrong?

Thanks!

gritty perch
#

it is possible that you're using the old snapshots

#

basically the protocol version is set at runtime and if your host speaks 22, your SDK must speak 22, so that would mean that something hardcodes the version to be 21. e.g. snapshot, as mentioned above. or maybe you modify the ledger info in during the test setup and hardcode the protocol version to 22. if you're sure neither of these is the case, then we'll need some minimal example to repro this

tawdry gulch
#

Hmm I'm setting up a new testing env afresh for each test, and the env is created using default env, which uses protocol version 22

#

@gritty perch I'm getting ["ledger protocol version too old for host", 20]. Is this saying the ledger protocol version is 20?

gritty perch
#

yep

#

and env v22 is currently only compatible with protocol 22. maybe this restriction is not actually necessary, but in any case this is the behavior of the current release

tawdry gulch
#

@gritty perch noob question but any idea where I should check? I've grepped 20 and didn't see anything hardcoded as such

gritty perch
#

that's a good question. can you grep for ledger_info?

tawdry gulch
#

@gritty perch did that but nothing in my own code

gritty perch
#

I don't have any more ideas, so helping further would require looking at the code

tawdry gulch
#

kk lemme see if I can put a mnimal example together. Thanks!

#

@gritty perch never mind I found it. It was hidden somewhere really deep so I missed it. Sorry about that!