Skip to content

Support classic accounts and trustlines in snapshots #1739

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

Open
JakeUrban opened this issue Nov 18, 2024 · 3 comments
Open

Support classic accounts and trustlines in snapshots #1739

JakeUrban opened this issue Nov 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working stale

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),

@janewang janewang moved this from Backlog (Not Ready) to Todo (Ready for Dev) in DevX Jan 10, 2025
@janewang janewang moved this from Todo (Ready for Dev) to In Progress in DevX Jan 10, 2025
@janewang janewang moved this from In Progress to Needs Review in DevX Jan 10, 2025
@janewang
Copy link
Contributor

@Dhanraj30 Thanks for the fix. @fnando @leighmcculloch Please take a look at this PR #1746

Copy link
Contributor

github-actions bot commented Jun 7, 2025

This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 90 days unless the stale label is removed, and the assignee is removed or updated.

@github-actions github-actions bot added the stale label Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
Status: Needs Review
Development

No branches or pull requests

3 participants