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

Order History events in the same confirmation height. #93

Merged
merged 5 commits into from
May 27, 2024

Conversation

junderw
Copy link
Member

@junderw junderw commented May 7, 2024

REQUIRES RE-INDEX

REQUIRES A LOT OF TESTING

This should fix the ordering of history entries and transactions within the same block/tx.

I think the addition of this data to the rows might cause unforseen consequences... so it needs to be tested thoroughly.

Requires a Re-Index.

@junderw junderw requested a review from mononaut May 7, 2024 14:03
@junderw
Copy link
Member Author

junderw commented May 7, 2024

(Included #92 because mempool branch is broken without it)

@junderw
Copy link
Member Author

junderw commented May 7, 2024

The behavior of the RocksDB is relied upon in weird ways, so the biggest worry I have is a re-surfacing of the weird balance-is-off bugs...

Copy link
Contributor

@mononaut mononaut left a comment

Choose a reason for hiding this comment

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

Tested ACK @ [5bee69f]

I tested a full reindex on testnet4 and signet without any hiccups, and confirmed that same-block transaction history is now properly ordered.

The address history summary functions need a few changes to take advantage of the new schema, but I can add that in a follow up PR.

I also stepped through all of the code that interacts with the tx history database, and couldn't see any obvious problems downstream of the schema change.

(I have a mainnet reindex still in progress, but it hasn't crashed yet!)

src/new_index/schema.rs Outdated Show resolved Hide resolved
@mononaut
Copy link
Contributor

(re)tested ACK @ [3dab4c7]

I completed a full mainnet reindex with the new u16 tx position, and everything looks good so far, including balances on a bunch of heavily-trafficked addresses.

@mononaut mononaut mentioned this pull request May 13, 2024
@wiz wiz merged commit 9ab6516 into mempool May 27, 2024
7 checks passed
@wiz wiz deleted the junderw/order_txes_in_block branch May 27, 2024 08:49
SatoKentaNayoro pushed a commit to boolnetwork/mempool-electrs that referenced this pull request Nov 29, 2024
Order History events in the same confirmation height.
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.

3 participants