-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
dBFTEverything related to dBFT module integrationEverything related to dBFT module integrationenhancementNew feature or requestNew feature or request
Milestone
Description
Rationale
After #84 dBFT is able to request transactions by hashes from the node's peers. However, dBFT's OnTransaction callback is being called for every transaction that enters mempool:
go-ethereum/consensus/dbft/dbft.go
Lines 1183 to 1186 in 79f129a
| case txs := <-c.txEvents: | |
| for _, tx := range txs.Txs { | |
| c.dbft.OnTransaction(&Transaction{Tx: tx}) | |
| } |
This behaviour is correct but not optimal. Ref. #84 (comment).
Implementation
Within the scope of this issue we need to save the list of hashes requested by dBFT and then call OnTransaction callback only for requested transactions. Ref. NeoGo's (s *Server) RequestTx implementation related to txCbList variable: https://github.com/nspcc-dev/neo-go/blob/ed736281002132235d15adf2c64b9f6ad2431197/pkg/network/server.go#L1468.
dusmart
Metadata
Metadata
Assignees
Labels
dBFTEverything related to dBFT module integrationEverything related to dBFT module integrationenhancementNew feature or requestNew feature or request