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

Hot archive tx apply #4603

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Hot archive tx apply #4603

merged 2 commits into from
Jan 15, 2025

Conversation

SirTyson
Copy link
Contributor

@SirTyson SirTyson commented Jan 2, 2025

Description

Resolves #4584

This PR adds support for the Hot Archive to TX apply. Specifically, InvokeHostFunctionOp will check both the live BucketList and Hot Archive BucketList for archived entries. The RestoreFootprintOp can now restore entries from both the live BucketList and Hot Archive.

Additionally, restore meta has also changed for p23. The LEDGER_ENTRY_RESTORED type has been added for the restore op. When an entry is restored. both the LedgerEntry of the restored data and the corresponding TTL entry are emitted as LEDGER_ENTRY_RESTORED LedgerEntryChangeType. If the entry has not yet been evicted (such that the entry and it's TTL still exist in the live BucketList), the preexisting TTL value will be emitted as LEDGER_ENTRY_STATE. If the entry has been evicted such that the TTL value has been previously deleted, only a single change type of LEDGER_ENTRY_RESTORED will be emitted for the new value. For the data being restored, LEDGER_ENTRY_STATE is never emitted.

Rebased on #4585.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

@SirTyson SirTyson force-pushed the hot-archive-tx-apply branch 3 times, most recently from 7a04b44 to ff852cc Compare January 9, 2025 18:13
@SirTyson SirTyson force-pushed the hot-archive-tx-apply branch 3 times, most recently from 8b133db to c42168a Compare January 9, 2025 23:34
src/ledger/LedgerTxn.h Outdated Show resolved Hide resolved
src/transactions/InvokeHostFunctionOpFrame.cpp Outdated Show resolved Hide resolved
src/transactions/RestoreFootprintOpFrame.cpp Outdated Show resolved Hide resolved
src/transactions/TransactionFrame.cpp Show resolved Hide resolved
dmkozh
dmkozh previously approved these changes Jan 14, 2025
src/ledger/LedgerTxn.cpp Outdated Show resolved Hide resolved
src/transactions/TransactionFrame.cpp Show resolved Hide resolved
src/transactions/TransactionFrame.cpp Show resolved Hide resolved
@SirTyson SirTyson force-pushed the hot-archive-tx-apply branch 2 times, most recently from bc92eb4 to 0341ff5 Compare January 14, 2025 21:51
Copy link
Contributor

@dmkozh dmkozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you please rebase and squash?

src/transactions/TransactionFrame.cpp Show resolved Hide resolved
src/transactions/TransactionFrame.cpp Show resolved Hide resolved
@SirTyson SirTyson force-pushed the hot-archive-tx-apply branch from 0341ff5 to c7e470a Compare January 15, 2025 01:24
@SirTyson
Copy link
Contributor Author

LGTM, could you please rebase and squash?

Done

@SirTyson SirTyson enabled auto-merge January 15, 2025 01:25
@SirTyson SirTyson added this pull request to the merge queue Jan 15, 2025
Merged via the queue into stellar:master with commit 9ff6133 Jan 15, 2025
13 checks passed
@SirTyson SirTyson deleted the hot-archive-tx-apply branch January 15, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the Hot Archive in TX apply
2 participants