-
Notifications
You must be signed in to change notification settings - Fork 123
Confirmed transactions showing up in mempool as pending #624
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
Comments
@asimm241 could you please review? thanks! |
I'm looking into it. |
@agraebe I haven't figure out exactly what the problem is. |
It looks like this may have been fixed in the microblocks PR, I don't see the same issue on the deployment at: |
@zone117x was this resolved with the mircoblocks PRs merged in? |
It was not, there was a recent report of this same issue hirosystems/explorer#534 I found a couple areas in the code that are likely causing this, but haven't had a time fix and test |
Update on this issue: Using the following query to find these instances: select encode(mempool_txs.tx_id, 'hex') txid, receipt_time, * from mempool_txs
inner join txs
on txs.tx_id = mempool_txs.tx_id
where mempool_txs.pruned = false
and txs.canonical = true
and txs.microblock_canonical = true It usually returns zero results from the mainnet API dbs. I've isolated and normalized a series of stacks-node events that can reproduce the issue locally I think a safe fix would be something like 1. collect an array of all txids that were "restored" into the mempool during the recursive re-org handling logic, 2. at the end of the block update logic, identified any of these txids that ended up as fully canonical and re-prune them. The problem with this approach is that it will make the event digestion path slower (ultimately slowing down event-replay deployments), but that seems unavoidable right now. I'll open a PR once I have something like that working and the associated unit tests. |
At least one of the code paths that led to this were fixed in #817 For now, going to assume this is fixed and close out the issue. Please comment if anyone sees this again and I'll re-open. |
There seems to have been a regression of confirmed transactions showing up as pending in the mempool. For example at the time of this issue opening:
API call to mempool endpoint for address
SP7XSVPCEZFNDWVMQ7F2W5TDQDDHBQZ04NSBFZYE
:https://stacks-node-api.stacks.co/extended/v1/tx/mempool?address=SP7XSVPCEZFNDWVMQ7F2W5TDQDDHBQZ04NSBFZYE
returns
The last transaction, id
0x6f46f2155945ea56f91f87ca31e1ec57f0075ac5bdbffee26412d02e3cf837e9
shows as pending but it's actually confirmed if you query the tx endpoint.https://stacks-node-api.stacks.co/extended/v1/tx/0x6f46f2155945ea56f91f87ca31e1ec57f0075ac5bdbffee26412d02e3cf837e9
returns
The text was updated successfully, but these errors were encountered: