This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
Nonces missmatch between pool and historyDB #392
Labels
bug
Something isn't working
Comments
From an online discussion; the correct spec is this:
|
This also affects the purger methods: var checkNoncesQuery = fmt.Sprintf(`
UPDATE tx_pool SET
state = '%s',
batch_num = %%d
FROM (VALUES
(NULL::::BIGINT, NULL::::BIGINT),
(:idx, :nonce)
) as updated_acc (idx, nonce)
WHERE tx_pool.from_idx = updated_acc.idx AND tx_pool.nonce <= updated_acc.nonce;
`, common.PoolL2TxStateInvalid)
|
ed255
added a commit
that referenced
this issue
Dec 21, 2020
- Test all the purger functions - Fix nonces set by til (previously til started with nonce 1 for pool l2txs, but the correct implementation is to start with nonce 0) - Rename L2DB.CheckNonces to L2DB.invalidateOldNoncesQuery - Rename L2DB.checkNoncesQuery to L2DB.InvalidateOldNonces Related #392 (Fix checkNoncesQuery) Resolve #396
ed255
added a commit
that referenced
this issue
Dec 22, 2020
- Test all the purger functions - Fix nonces set by til (previously til started with nonce 1 for pool l2txs, but the correct implementation is to start with nonce 0) - Rename L2DB.CheckNonces to L2DB.invalidateOldNoncesQuery - Rename L2DB.checkNoncesQuery to L2DB.InvalidateOldNonces Related #392 (Fix checkNoncesQuery) Resolve #396
ed255
added a commit
that referenced
this issue
Dec 22, 2020
- Test all the purger functions - Fix nonces set by til (previously til started with nonce 1 for pool l2txs, but the correct implementation is to start with nonce 0) - Rename L2DB.CheckNonces to L2DB.invalidateOldNoncesQuery - Rename L2DB.checkNoncesQuery to L2DB.InvalidateOldNonces Related #392 (Fix checkNoncesQuery) Resolve #396
This should have been fixed after #412 |
I've run the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When a tx is sent to the pool, it uses the current nonce (starting by 0), however in the HistoryDB the next nonce is used (starting by 1). This causes a missmatch of TxID, that defeats the purpose of the ID (being able to track the tx from the moment it's sent to the pool to the moment it's forged, and therefore added to HistoryDB)
The text was updated successfully, but these errors were encountered: