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
# Description
Implements autorestore functionality for protocol 23. Specifically, this
includes:
1. Updating ExtendFootprintOp and InvokeHostFunctionOp to meter reads
based on the new disk resource type.
2. Adding automatic restore functionality + resource validity checking
in InvokeHostFunctionOp.
3. Implementing meta for auto restore + backfiling prior protocol's meta
with the new RESTORE `LedgerEntryChangeType`.
Unfortunately, the post-processing of meta is more complex than I would
have liked. In particular, meta generation is heavily tied to the LTX
and Live BucketList state, which no longer maps directly to the logical
state changes required by downstream systems due to state archival. I
think LTX is in need of a refactor regardless, but for now I've tried to
add some detailed comments and test cases. `METADATA_DEBUG_LEDGERS
works` also appears to be a little flaky and I'm not quite sure why. It
fails at `REQUIRE(gotToExpectedSize);`, but only sometimes. I think this
might have to do with file persistence in tests, but I'm not sure since
I have been modifying meta with this change.
I also refactored `InvokeHostFunctionOp` with a stateful helper class,
as some of the lambda captures were getting out of hand. While there are
some renames, it shouldn't be too much code motion (other than the
changes required for auto restore), but if this conflicts too much with
parallel apply I'm open to other suggestions.
# Checklist
- [x] Reviewed the
[contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes)
document
- [x] Rebased on top of master (no merge commits)
- [x] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio
extension)
- [x] Compiles
- [x] Ran all tests
- [ ] If change impacts performance, include supporting evidence per the
[performance
document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
0 commit comments