Commit Graph

555 Commits

Author SHA1 Message Date
ledgerwatch
240f7f1212
Patricia tree (binary) as a memory efficient alternative to Aho-Corassick (#97)
* First commit

* Refactor

* Fixes

* Now with fuzz tests

* Add matching

* Fixes for empty key

* Reduce garbage during matching

* Swap state objects

* Find longest matches

* Simplify FindLongestMatches

* Simplify matches

* Switch from pointers to Match

* Use pointer for pt

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-10-06 15:28:56 +01:00
Alex Sharov
e4ae867351
,save (#101) 2021-10-06 15:14:58 +07:00
Alex Sharov
04d7bfe3ce
Fix race in cache (#100) 2021-10-05 16:06:22 +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
b5be2a9ae3
downgrade mdbx to v0.10.1 (#95) 2021-09-30 09:50:43 +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
53afdc9b69
--mdbx.augment.limit (#92) 2021-09-27 09:49:17 +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
Alexandr Borodulin
7740382188
Update tables.go (#86)
Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-09-22 17:34:29 +07:00
Alex Sharov
3f138d4e75
return err on duplicate (#89) 2021-09-22 15:30:34 +07:00
Alex Sharov
ba2d50bea2
Pool: return err on duplicate rpc (#88) 2021-09-22 15:10:17 +07:00
Alex Sharov
4862356290
Pool: correct new pending txs notifications (#85) 2021-09-21 16:39:41 +07:00
Alex Sharov
13b0978d86
grpc enable instrumentation (#84) 2021-09-21 10:10:59 +07:00
ledgerwatch
47490aa942
Optimise RecSplit (#82)
* not allocate count

* Print timings

* More time measurement

* See time with fanout=2

* Less branching?

* Revert

* Split functions for fingeprint and bucket separation

* Save indices

* Fix limits

* Use original split formula

* Revert

* uint16

* Correctly measure 2

* Less branching again?

* No time measurements

* Cleanup

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-09-20 17:39:32 +01:00
Alex Sharov
c40a022ab0
Pool: return lost error, fix race of 2 sentries, set high limits to see worst case (#83) 2021-09-20 20:16:32 +07:00
ledgerwatch
f2549ad6ec
Integration of recsplit (#79)
* Integration of recsplit

* Add tables

* Print bucket by bucket

* Not to print all keys

* Print correct bitSize

* switch to []byte

* Optimisation

* Fix

* Fix lint

* Performance improvements

* Print bucket info

* Add tracing

* Fixed split

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-09-20 12:14:49 +01:00
Alex Sharov
6a7eeccad7
Pool: discard reasons, LRU (#80) 2021-09-20 12:44:29 +07:00
Alex Sharov
1c9602c785
revert 2421 2021-09-20 10:41:02 +07:00
ledgerwatch
312d43aa88
Recsplit encoding (#69)
* Recsplit encoding

* Added Golomb-Rice encoding

* More on encoding

* More

* Fix compile errors

* Fix fuzz test, add corpus

* Integrated Elias-Fano

* Fix lint

* Add select64

* More

* Add fuzz test for elias fano

* Debugging elias fano

* Fuzz test for elias fano

* More elias fano debugging

* Fix elias fano

* More fixes

* Fix to golombRiceLength

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-09-18 22:59:27 +01:00
Alex Sharov
dfc14352d2
Pool: chain config, non-mainnet (#78) 2021-09-18 20:58:20 +07:00
Alexandr Borodulin
d32bc94cf8
Update tables.go (#76)
Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-09-17 16:28:59 +07:00
Alex Sharov
8163e0cd93
Pool: cache based on txID (#75) 2021-09-17 09:56:04 +07:00
Alexandr Borodulin
1f3720472a
fixes ledgerwatch/erigon#2421 (#72)
* fixes ledgerwatch/erigon#2421

* Update tables.go

Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
Co-authored-by: ledgerwatch <akhounov@gmail.com>
2021-09-15 17:08:22 +01:00
Alex Sharov
71308b02b3
Pool: switch cache to tx.ID(), more metrics (#73) 2021-09-15 20:15:32 +07:00
Alex Sharov
aa7acc120c
Pool: expose mdbx's txID to remote_kv (#71) 2021-09-15 13:11:34 +07:00
Alex Sharov
645eb83eca
Pool: mining rpc, remove block num from db, started atomic, more metrics, basic eviction (#70) 2021-09-14 22:01:33 +07:00
ledgerwatch
6dce34ac32
Initial recsplit (#67)
* Initial recsplit

* Move licence

* Fix bucket count and key count

* Check for duplicate kwys

* More recsplit implementation

* Skeleton of recsplit, fuzz test

* Fix lint

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-09-13 18:31:09 +01:00
Alex Sharov
5b8e019246
Pool: add coherent state cache (#68) 2021-09-13 14:31:15 +07:00
ledgerwatch
f79629b98d
Restore version of the codec (#66)
* Restore version of the codec

* Update go.sum

* Update go.sum
2021-09-11 16:48:31 +01:00
ledgerwatch
826f6ce377
Move ETL to erigon-lib (#65)
* Move ETL to erigon-lib

* Add coded

* Remove walk

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-09-11 16:11:41 +01:00
Alex Sharov
fddc5719b3
Coherent cache: basic implementation (#64) 2021-09-10 14:18:00 +07:00
Alex Sharov
c506d17f52
save (#63) 2021-09-09 10:43:41 +07:00
alex.sharov
c601d4f8d5 save 2021-09-09 09:36:39 +07:00
alex.sharov
1cb43277a1 go 1.17 on ci 2021-09-09 09:14:42 +07:00
alex.sharov
621bb1a359 go 1.17 on ci 2021-09-09 08:57:04 +07:00
Alex Sharov
0b4e528fac
Pool: no state persistance (#62) 2021-09-08 19:21:13 +07:00
Alex Sharov
c4efc0ea3a
Pool: started atomic (#61)
* save

* save
2021-09-08 12:30:37 +07:00
Alex Sharov
b4933b94d2
Pool: rlp fuzzing fixes (#60) 2021-09-07 17:32:13 +07:00
Alex Sharov
c7739b89a8
Pool: state diff direct client, tx parse fuzzing (#59) 2021-09-07 09:52:17 +07:00
Alex Sharov
6538ae76d0
Pool: grafana board (#58) 2021-09-03 13:22:36 +07:00
Alex Sharov
affb189c77
Pool: add --txpool.v2 flag to rpcdaemon (#57)
* grpc connect func

* grpc connect func

* grpc connect func

* grpc connect func

* grpc connect func

* grpc connect func
2021-09-03 10:24:49 +07:00
Alex Sharov
c935d9ff65
Pool: add grpcutils pkg, no spamming logs on disconnect (#54) 2021-09-02 16:37:36 +07:00
Alex Sharov
b1435d3679
don't start tx on shutdown (#56) 2021-09-02 16:33:23 +07:00
Alex Sharov
3b7a086a68
Dont start remote tx on shutdown (#55)
* don't start tx on shutdown

* don't start tx on shutdown
2021-09-02 15:41:29 +07:00
Alex Sharov
71fb498e39
Pool: add grpc server (#53) 2021-09-02 12:25:34 +07:00