You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using stellar snapshot create allows a developer to pre-create a snapshot rather efficiently, assuming that the developer knows exactly what data they need in the snapshot. We've made it somewhat easy by prefilling related data for developers, so when they ask for a contract, we prefill all its data and its code. But it could be much easier if in a developer could write one line, with a network name and a ledger sequence, and for the SDK to build the snapshot as required by the test itself.
What would you like to see?
A new function added to Env, Env::from_history_archive("testnet", 12798787) that creates an Env that first downloads the buckets for that ledger from history archives.
It is also setup with a storage snapshot implementation that searches the bucket files for the ledger entries as they are requested, and does two levels of caching.
First it caches keys to entries by storing the entry in a file with name defined by a hash of the network, ledger seq, and key so that entries can be looked up fast by other tests that access the same entry. Second at the end of the test it writes out a ledger snapshot file containing all the entries that were read during the test with the values at the first read (just like the file that stellar snapshot create makes).
What alternatives are there?
Stick with stellar snapshot create.
The text was updated successfully, but these errors were encountered:
What problem does your feature solve?
Using
stellar snapshot create
allows a developer to pre-create a snapshot rather efficiently, assuming that the developer knows exactly what data they need in the snapshot. We've made it somewhat easy by prefilling related data for developers, so when they ask for a contract, we prefill all its data and its code. But it could be much easier if in a developer could write one line, with a network name and a ledger sequence, and for the SDK to build the snapshot as required by the test itself.What would you like to see?
A new function added to
Env
,Env::from_history_archive("testnet", 12798787)
that creates an Env that first downloads the buckets for that ledger from history archives.It is also setup with a storage snapshot implementation that searches the bucket files for the ledger entries as they are requested, and does two levels of caching.
First it caches keys to entries by storing the entry in a file with name defined by a hash of the network, ledger seq, and key so that entries can be looked up fast by other tests that access the same entry. Second at the end of the test it writes out a ledger snapshot file containing all the entries that were read during the test with the values at the first read (just like the file that
stellar snapshot create
makes).What alternatives are there?
Stick with
stellar snapshot create
.The text was updated successfully, but these errors were encountered: