This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 457
Rewrite transaction pool #561
Comments
Added task list to issue description. |
#457 should be done first. |
15 tasks
karmacoma
added a commit
that referenced
this issue
Nov 26, 2017
Rewrite transaction pool - Closes #561
11 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Belongs to: #449
Improve transaction pool efficiency. No longer apply transactions in an unconfirmed state.
Task List:
Some parts are already covered in #544 and #597, however we still need to rewrite transaction pool - it should be central point of dealing with transactions - so those transactions should go to pool and pool can (or not) initiate validations.
unverified
andverified
.verified
object should be split intopending
andready
.add
method - used when we receive new transaction:id
should be checked if exists inunverified
orverified.pending
orverified.ready
, if we already have that tx - discardunverified
unverified
, perform verifications and if successful push to eitherverified.pending
(when tx is multisign or timestamp is in future) orverified.ready
otherwise. Such a worker would be easily replaced with child process in future. That worker should also verify incomingsignatures
(multisig txs signs), and take care about moving transactions fromverified.pending
toverified.ready
. Worker can run in loop or can be added tojobsQueue
(interval to research).delete
method that will delete failed transaction from the pool.delete
method (we not immediatelly delete transactions that we included in block when forge, because that block can fail).verified.ready
viarollback/addReady
method.getReady
that will select transactions that are ready to be included in block (it should requirecount/limit
parameter) fromverified.ready
.timestamp
!), there are some options - we should pick one with best performance:verified.ready
list sorted (resort after new/delete txs) - only if node is forging.getUsage
that will return counters forunverified
,verified.pending
andverified.ready
get
that will return transaction byid
getAll
that will return all transactions, with optional limited filters (such asunverified
,pending
,ready
,sender_id
,sender_pk
,recipient_id
,recipient_pk
) - to research if we need more here.checkBalance
(optional) - will return estimated balance for requested account - it should get account from database and apply tobalance
all transactions that are stored in pool and affect that accountThe text was updated successfully, but these errors were encountered: