-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add --check-lcm mode to verify captured LedgerCloseMeta golden data in CI #5435
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
sisuresh
wants to merge
10
commits into
stellar:master
Choose a base branch
from
sisuresh:check-lcm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fb32f10
Add --check-lcm mode to verify captured LedgerCloseMeta golden data i…
sisuresh 8fbf0be
Fix duplicate test section names that collide in LCM capture
sisuresh 4777c04
Fail --check-lcm when a golden file exists but the test produces no meta
sisuresh fb045da
Derive test NODE_SEED from the logical instance number in LCM runs
sisuresh a4637f3
Fix stale docs on LCM normalization and accumulation
sisuresh 1cf8ac8
Prune stale golden LCM data on capture
sisuresh 0a61114
Skip LCM capture for tests whose meta cannot be golden data
sisuresh 283e089
Fix index handling and directory coverage in LCM capture finalization
sisuresh 3f328ab
Document the LedgerCloseMeta checks in CONTRIBUTING.md
sisuresh d4afda9
Regenerate and prune the captured LedgerCloseMeta golden data
sisuresh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| #pragma once | ||
|
|
||
| #include "test/TestUtils.h" | ||
| #include "test/test.h" | ||
| #include "xdr/Stellar-ledger.h" | ||
|
|
||
| namespace stellar | ||
|
|
@@ -85,6 +86,10 @@ class LedgerManagerForBucketTests : public LedgerManagerImpl | |
| std::vector<LedgerKey> const& deadEntries, | ||
| bool alsoAddActualEntries = false) | ||
| { | ||
| // Entries injected straight into the bucket list appear in the ledger | ||
| // without any transaction producing them, so the resulting meta is | ||
| // not a faithful record of how the state came to be. | ||
| taintLcmCapture("injects ledger entries directly into the bucket list"); | ||
|
Comment on lines
+89
to
+92
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 85f8eda — setNextArchiveBatchForBucketTesting now applies the same taint. |
||
| mUseTestEntries = true; | ||
| mAlsoAddActualEntries = alsoAddActualEntries; | ||
| mTestInitEntries = initEntries; | ||
|
|
@@ -97,6 +102,9 @@ class LedgerManagerForBucketTests : public LedgerManagerImpl | |
| std::vector<LedgerEntry> const& archiveEntries, | ||
| std::vector<LedgerKey> const& restoredEntries) | ||
| { | ||
| // As above: injected archive state has no transaction behind it, so | ||
| // the meta does not record how that state came to be. | ||
| taintLcmCapture("injects ledger entries directly into the bucket list"); | ||
| mUseTestEntries = true; | ||
| mTestArchiveEntries = archiveEntries; | ||
| mTestRestoredEntries = restoredEntries; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regenerated golden trees (with the header stamps) landed in later commits on this PR — 50f847b for test-lcm-current and b18addf for test-lcm-next. The first CI round intentionally ran without them to demonstrate the failure mode.