You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
Right now we allow transactions in SparseChain to double spend if they are in the mempool. Or rather we cannot enforce this within the sparse chain itself since we assume that the txs that are confirmed are from valid blocks and therefore cannot possibly spend each other. The TxGraph however should be able to resolve this for us. In ChainGraph we should be able to enforce this policy on every update (the mempool evictions should go into the ChangeSet) since it also has access to a TxGraph.
I'm not sure what the API should be but you need to be able to:
Get unconfirmed txids from sparse_chain.
For each one, check what conflicts with them. If the conflict is confirmed then it goes into eviction set. Otherwise you tiebreak by fee (perhaps make this configurable).
Create a sparse_chain::ChangeSet of all removals
With chain_graph all of the above should happen automatically behind the scenes when you update so implementing it on ChainGraph might be the place to start to figure out what additional APIs you need on SparseChain and TxGraph (there might not be any).
The text was updated successfully, but these errors were encountered:
Right now we allow transactions in
SparseChain
to double spend if they are in the mempool. Or rather we cannot enforce this within the sparse chain itself since we assume that the txs that are confirmed are from valid blocks and therefore cannot possibly spend each other. TheTxGraph
however should be able to resolve this for us. InChainGraph
we should be able to enforce this policy on every update (the mempool evictions should go into theChangeSet
) since it also has access to aTxGraph
.I'm not sure what the API should be but you need to be able to:
sparse_chain
.sparse_chain::ChangeSet
of all removalsWith
chain_graph
all of the above should happen automatically behind the scenes when you update so implementing it onChainGraph
might be the place to start to figure out what additional APIs you need onSparseChain
andTxGraph
(there might not be any).The text was updated successfully, but these errors were encountered: