Commit Graph

340 Commits

Author SHA1 Message Date
Alex Sharov
a8ce14e8cc
option to disable runtime.ReadMemStats (#457)
* save

* save

* save

* save
2022-05-19 11:46:55 +07:00
Alex Sharov
f3f655ec26
Txn tip is u256 (#447)
* save

* save

* save

* save
2022-05-13 12:21:29 +07:00
Alex Sharov
d882a11c67
up linter version (#443)
* save

* save

* save

* save
2022-05-10 10:14:02 +07:00
Alex Sharov
da0666bd83
ErigonLib: move types to own package (#413) 2022-04-11 10:02:44 +07:00
Alex Sharov
af4391d7f9
fix nil pointer in fetch.go (#406) 2022-03-31 15:13:11 +07:00
Andrew Ashikhmin
8d5499792e
[Fix] missing Spammer in (DiscardReason) String() (#391) 2022-03-24 16:24:30 +01:00
alex.sharov
9bdcecfec4 clean logs 2022-03-21 19:28:26 +07:00
Alex Sharov
83951a1d62
Enable more linters (#381) 2022-03-19 11:38:37 +07:00
Alex Sharov
e8e8e2f2e6
Pool cost (#373)
* save

* save
2022-03-17 20:16:57 +00:00
ledgerwatch
27a61d4611
[txpool] Poking only caused by local transactions (#345)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-24 00:18:46 +00:00
ledgerwatch
efdeb69af0
[txpool] Poke transactions that cannot be replaced (#343)
* Poke transactions that cannot be replaced

* Remove printing

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 23:48:05 +00:00
ledgerwatch
50082e3553
[txpool] Remove unsafe parameter for onSenderStateChange (#341)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-22 08:53:29 +00:00
Alex Sharov
5be29adf1a
Grpc err utils (#334)
* save

* save
2022-02-18 09:40:11 +07:00
Alex Sharov
57d026dcca
grpc: disabled server txpool (#314)
* grpc disabled server txpool

* grpc disabled server txpool
2022-02-12 12:24:17 +07:00
ledgerwatch
11615db276
Fix memory leak in txpool (#298)
* Fix memory leak in txpool

* Cannot delete during iteration

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-03 17:52:20 +00:00
Alex Sharov
a53f232322
pool: fix race in async broadcast (#294)
* pool: better async broadcast

* save

* save
2022-02-02 14:49:26 +07:00
Alex Sharov
74d49a9de1
non blocking broadcast of new txs (#292) 2022-02-01 12:16:43 +00:00
ledgerwatch
1d4022960a
Fix RLP inconsistency in txpool (#280)
* Fix RLP inconsistency in txpool

* Add debug

* hasEnvelope argument when parsing transaction

* Handle incorrect packets without panic

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-01-26 16:09:02 +00:00
ledgerwatch
df95313a31
Add blockGasLimit to the state stream (#261)
* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit eff9f8f

git-subtree-dir: interfaces
git-subtree-split: eff9f8f7273dda7c78575f2474e3103da61825db

* Add blockGasLimit to the state stream

* Pass blockGasLimit into txpool

* Add NotTooMuchGas bit, refactored promote

* Replace effectiveTip with minTip in the queues and slices

* Fix lint

* Refactor

* Improve terminology of ordering function

* Optimise baseFee change

* cleanup

* Safe operations

* Fix UnsafeAdd

* also print pendingBaseFee

* trace txpool_content

* trace txpool_content

* user sender ID inverted index to speed up txpool_content

* copy rlp from Db

* remove debug printing

* change from string to []byte

* safe storage of sender in the map

* Fix compile

* safe storage of sender in the map

* Print errors

* Prints

* Prints

* Prints

* Change worst function

* Change worst function

* Change worst function

* Change worst function

* Fix minTip

* Fix minTip

* Warn on db error, but not stop

* Fix interface

* More prints

* Cleanup

* Cleanup

* Differentiate baseFee pool

* Bump version of remove KV interface

* Not print every block

* Not print every block

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-01-25 10:20:11 +00:00
Neo
26dcd28433
Update PriceBump, change tx replacement logic, update test (#238) 2022-01-17 07:45:57 +00:00
ledgerwatch
b95cff2ce3
No empty RLPs in TxPacket messages, consistent parsing of TxPacket and PooledTxPacket (#232)
* Not include empty RLPs into TransactionPacket messages

* Consistent parsing of TransactionPacket and PooledTransactionPacket

* The other way around

* Cleaner form

* Add test for encoding and parsing TransctionsPacket

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-01-15 09:09:33 +00:00
ledgerwatch
8d06531e4e
txpool - removed mined transactions if they were missed by state stream (#213)
* Copy rlp for stream, remove txs

* Fix low nonce removal

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-17 09:35:46 +00:00
ledgerwatch
7f6eb71c4c
Split up txpool Broadcast and Announce (#209)
* Split up Broadcast and Announce

* Split up Broadcast and Announce

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-16 21:16:04 +00:00
ledgerwatch
7f82ddaa75
txpool broadcasting (#208)
* txpool broadcasting

* Fix lint

* Broadcast transaction to random peers

* Fix broadcast

* Fix panic

* Change terminology

* fix for broadcasting

* Rebroadcast transactions promoted to pending subpool

* Trace moving between subpools

* Deduplicate promoted hashes, fix basefee promotion

* Tx propagation to be more resilient

* Fix dedup

* Change collection of promoted hashes

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-12-16 20:58:40 +00:00
ledgerwatch
c7cd5d65d3
Introduce transaction tracing in tx pool (#205)
* Introduce transaction tracing in tx pool

* Add tracing prints

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-14 09:40:07 +00:00
TBC Dev
a27d9202e3
Refactor and simplify txpool.sendersBatch (#195)
* De-dup and extract sendersBatch.getOrCreateId()

* Misc simplify
2021-11-28 10:46:21 +00:00
ledgerwatch
0404744146
Introduce PriceBump, change tx replacement logic, add test (#192)
* Introduce PriceBump, change tx replacement logic, add test

* Fix TestNonceFromAddress

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-26 13:55:58 +00:00
Alex Sharov
06fb85a0ed
Pool: reject low nonce and low balance txs (#182)
* save

* save
2021-11-21 14:52:17 +00:00
TBC Dev
5b0c5e7fdb
TxPool efficiency improvements (#173)
* Avoid iteration for Spammer tests by tracking senderID tx counts

* Add BySenderAndNonce.ascendAll()

* Add BySenderAndNonce.descend()

* Avoid iteration by descending, and pre-allocate known size

* Resize() once rather than for each good txn

* Use range value in loops

* Add comments to clarify NotSet default values
2021-11-18 07:59:25 +00:00
ledgerwatch
eefbde1443
Pending nonce [attempt 2] (#158)
* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit 8f1a238

git-subtree-dir: interfaces
git-subtree-split: 8f1a23897b8921ae3e7f9450ec9f300255c6e1e2

* Regenerate bindings for new interfaces

* Add Nonce function

* Search for nonce in ascending order

* Descend from highest possible nonce for sender (#162)

* Descend from highest possible nonce for sender

* Remove assumptions from nonce()

* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit 375e3d8

git-subtree-dir: interfaces
git-subtree-split: 375e3d85a3d9ff13e61593a5efacd2fbc777cec3

* Regenerate

* Started test

* More of test

* Fix test

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: TBC Dev <48684072+tbcd@users.noreply.github.com>
2021-11-15 09:44:18 +00:00
Alex Sharov
138a208431
Pool: don't send empty events (#149) 2021-11-07 09:45:25 +07:00
Alex Sharov
3c86aa6290
ETL: use logPrefix as suffix of tmp files (#146) 2021-11-05 17:04:17 +07:00
Alex Sharov
c92b760e99
make idhash public (#137) 2021-10-30 09:55:06 +07:00
Alex Sharov
5d84a53060
Pool2 integration test support (#136) 2021-10-28 18:45:18 +07:00
alex.sharov
78495d3922 pool docs 2021-10-25 09:48:15 +07:00
Alex Sharov
70c39cd195
Pool intrinsic gas check (#126) 2021-10-25 08:49:04 +07:00
alex.sharov
7693a71b4d mute useless logs 2021-10-24 18:19:52 +07:00
Alex Sharov
66c9c6f3f7
Pool v2: set 10K as default limit for sub-pool, check key existence before delete (#122) 2021-10-21 15:39:28 +07:00
Alex Sharov
a3431f5663
Propagate all promoted txs when add local tx (#116) 2021-10-19 15:19:54 +07:00
Alex Sharov
158ae418d1
Pool: print local txs propagation info (#115) 2021-10-18 11:22:05 +07:00
alex.sharov
2031989294 Pool: enable .All method 2021-10-13 09:47:33 +07:00
Alex Sharov
7d8355a99a
Pool: sort by nonceDistance inside Red pool (#105) 2021-10-10 16:41:32 +07:00
Alex Sharov
cc20173b74
MDBX: Don't block when open db from another process if main process holds long RW tx (#99) 2021-10-05 15:30:06 +07:00
Alex Sharov
fa97bdba0a
Pool v2: --txpool.accountslots flag support (#98) 2021-10-03 13:27:28 +07:00
Alex Sharov
57c724bbc6
--txpool.pricelimit support (#96) 2021-10-02 17:34:33 +07:00
Alex Sharov
33aa4498f0
Pool: speedup iteration over all txs (#94) 2021-09-28 15:54:02 +07:00
alex.sharov
559f376ed4 save 2021-09-27 22:25:13 +07:00
Alex Sharov
ffac34a86f
Pool: break data-dependency between effectiveTip and other fields (#93) 2021-09-27 19:45:10 +07:00
Alex Sharov
9070cf769f
save (#91) 2021-09-26 19:48:57 +07:00
Alex Sharov
f5fa03d63f
Pool: switch to PendingBaseFee (#90) 2021-09-26 19:47:11 +07:00