Fix timestamp/globalIndex ordering inconsistency #261
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.
#259 Fix timestamp/globalIndex ordering inconsistency
Fixes: #259
π― Problem
Inconsistent indexing for
timestampandglobalIndexproperties where ordering by timestamp β ordering by globalIndex for transactions from 2023 vs 2024, causing data consistency issues in transaction ordering queries.β Solution
Implemented chronological validation with height-based fallback in the
txsBuildFromfunction to ensure consistent ordering between timestamp and globalIndex properties.Key Changes:
extractors/package.scalawith chronological validation logicBugDetectionTest.scalaandTimestampGlobalIndexConsistencySpec.scalagenerators.scalawith timestamp ordering test generatorsvalidation.shscript for testing workflowπ§ Technical Details
π§ͺ Validation
Result: Timestamp ordering now equals globalIndex ordering for all transactions, resolving the reported indexing inconsistency.
π Files Changed
modules/chain-grabber/.../extractors/package.scala- Fixmodules/explorer-core/.../BugDetectionTest.scala- Bug detection testmodules/explorer-core/.../TimestampGlobalIndexConsistencySpec.scala- Validation suitemodules/explorer-core/.../generators.scala- Enhanced test generatorsvalidation.sh- Complete validation scriptBOUNTY_SUBMISSION.md- Implementation report