Skip to content
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

Support classic accounts and trustlines in snapshots #1739

Open
JakeUrban opened this issue Nov 18, 2024 · 1 comment
Open

Support classic accounts and trustlines in snapshots #1739

JakeUrban opened this issue Nov 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JakeUrban
Copy link
Contributor

What version are you using?

22.0.0-rc.1

What did you do?

Created a snapshot like so:

stellar snapshot create --address $myaccount --address $contractid 

Then used the snapshot to create an environment for my contract test using Env::from_ledger_snapshot_file.

Because $myaccount is a Stellar account, and the function tested on $contractid results in a SAC transfer, the test failed with the following:

topics:[error, Error(Storage, MissingValue)], data:"trying to get non-existing value for contract instance"

This appears to be because trustlines are not saved to the snapshot file or are not loaded when creating the environment.

@JakeUrban JakeUrban added the bug Something isn't working label Nov 18, 2024
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Nov 18, 2024
@leighmcculloch
Copy link
Member

leighmcculloch commented Nov 19, 2024

Requires some investigation. Snapshots are supposed to include all the trust lines of an account when an account is specified.

For example:

let keep = match &key {
LedgerKey::Account(k) => current.account_ids.contains(&k.account_id),
LedgerKey::Trustline(k) => current.account_ids.contains(&k.account_id),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog (Not Ready)
Development

No branches or pull requests

2 participants