Commit Graph

890 Commits

Author SHA1 Message Date
Alex Sharov
19086759eb
methods to configure db #483 2022-06-09 09:43:12 +07:00
leonardchinonso
13529121f3
Chenged lowercase b meaning bits to uppercase B meaning Bytes (#481) 2022-06-08 19:19:17 +07:00
Andrew Ashikhmin
5278815cd0
Start txpool in AddLocalTxs (#480)
* Start txpool in AddLocalTxs

* Correct tx in fromDB called by AddLocalTxs
2022-06-08 10:39:22 +02:00
ledgerwatch
a77e6425eb
Fixes for the Erigon 2 upgrade 2 prototype (#479)
* Print

* Remove print

* Remove print

* Fix one panic

* Fix duplicate collation

* Print

* Fix print

* fix maxSpan

* Reduce maxSpan

* Remove duplicate join

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-05 22:32:34 +01:00
ledgerwatch
f16b285631
Adjustments for erigon 2 upgrade prototype (#477)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-05 16:34:38 +01:00
Alex Sharov
fdf7c6598b
compress.Count() method (#478) 2022-06-03 12:14:58 +07:00
ledgerwatch
157b4299e4
[erigon2] Continuation on domains and inverted indices, putting things together (#476)
* Add scan files tests, create new aggregator type

* Fix lint

* windows test fix

* Add delelte test

* AggCollation

* More functions to Aggregator

* More aggregator functions

* Update

* More functions

* More functions

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-06-02 21:40:58 +01:00
ledgerwatch
c5a10975ab
[erigon2] Introduce inverted index type (#473)
* [erigon2] Introduce inverted index type

* More inverted index code

* More tests for inverted index

* Think about public and non-public APIs

* Minimise DB access when accessing history

* Work on iterator

* Implementation of inverted iterator

* Test for inverted index

* Assert end of iterators

* Merge of inverted index files and test

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-05-31 18:42:04 +01:00
Alex Sharov
7e00e77ae5
match roaring version with erigon #475 2022-05-30 09:17:47 +07:00
Alex Sharov
b995bd7540
recsplit: configurable etl limit #474 2022-05-30 09:06:11 +07:00
ledgerwatch
990e586823
[erigon2] Continuation of work on domains - merge static files (#466)
* Iteration over files - initial

* Fix interator for multistep

* Add function

* More functions for merge

* Merge files

* More work on the merge

* Fix buildIndex

* Fix history test for test of not completely pruned db

* Prepare for merge test

* Merge file test

* Close files

* Move functions into separate file

* Print

* fix for closing index

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alex Sharp <alexsharp@alexs-mbp.lan>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-29 19:57:09 +01:00
Artem Tsebrovskiy
56a6afc8c9
commitment: fixed hash evaluation for hex patricia trie (#471) 2022-05-28 07:52:24 +01:00
Artem Tsebrovskiy
49e3522a05
added print of decompressed file at panic (#468)
* added print of decompressed file at panic

* more info for recovered decompressing
2022-05-27 08:20:53 +07:00
Andrew Ashikhmin
28d6b37a22
Remove INVALID_TERMINAL_BLOCK (#470)
* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit 981f4ba

git-subtree-dir: interfaces
git-subtree-split: 981f4bae6619ab7100c7222852fd4eae3f837ad4

* regenerate go proto
2022-05-26 17:01:43 +02:00
battlmonstr
8c81bd094c
sentry: grpc.ClientStream.RecvMsg for direct sentry streams (#469) 2022-05-26 20:53:16 +07:00
battlmonstr
da10d41489
sentry: PeerById method (#467) 2022-05-25 19:50:19 +07:00
Alex Sharov
dd8136cde9
save (#465) 2022-05-24 19:00:09 +01:00
ledgerwatch
37d9944da9
[erigon2] State domains (move functionality out of aggregator) (#436)
* Domain

* First functions

* change year

* More on domain

* More to test

* More on test

* More on domains

* buildFiles

* More on domains

* Collation test

* Fix collate

* Add test for decompressors

* Restructure history tables

* Split history into 2 tables

* Fix lint

* Check index files in the test

* Close files

* Add file scanning

* Fix lint

* Fix lint

* Add readFromFiles

* Add ef history idx file

* Start cleanup

* More to cleanup, test for ef history

* More test

* Add prune to test

* Test for prune and fix

* Start history access

* History test

* Test for LastDup

* Fix one lint

* Workaround

* History tests

* Debug

* Fix

* Fix in history

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@alexs-macbook-pro.home>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alex Sharp <alexsharp@alexs-mbp.lan>
2022-05-24 18:59:57 +01:00
Alex Sharov
9821dcdff5
kv_mdbx: atomic closed flag (#464) 2022-05-24 12:20:19 +07:00
Alex Sharov
2bfb6d70bb
a bit more docs to etl #463 2022-05-24 11:37:27 +07:00
Alex Sharov
26e4d01d16
save (#462) 2022-05-23 14:47:49 +07:00
ledgerwatch
0497aa6aa2
ExtractEndKey should be exclusive bound in etl (#461)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-22 17:26:39 +01:00
Artem Vorotnikov
15d2a37c0b
Typify commitment (#454) 2022-05-20 15:01:44 +07:00
Artem Tsebrovskiy
6de4ac4ba9
reduced memory footprint on building huffman table (#459) 2022-05-20 11:23:05 +07:00
Artem Tsebrovskiy
59d810650c
[erigon2] cleanup obsolete code for bin-commitment-trie (#451)
* cleanup obsolete code for bin-commitment-trie

* renamed back test functions for hex, renamed test file for bin trie for consistency
2022-05-19 21:18:03 +01:00
Alex Sharov
7908982ed9
MatchPrefix: limit 2nd loop iterations (#458)
* sf

* sf

* save
2022-05-19 12:27:36 +07:00
Alex Sharov
a8ce14e8cc
option to disable runtime.ReadMemStats (#457)
* save

* save

* save

* save
2022-05-19 11:46:55 +07:00
Alex Sharov
e304418d5a
MatchPrefix: working version (#456) 2022-05-18 14:36:01 +07:00
Alex Sharov
b4776607dc
MatchPrefix: don't compare if prefix longer than word (#455)
* save

* save

* save

* save

* save

* fd
2022-05-18 10:29:19 +07:00
Alex Sharov
b1dc1bfbbf
run go fix ./... (#453) 2022-05-17 14:48:16 +07:00
Artem Tsebrovskiy
6d2181968a
reduce memory footprint during decompression (#452) 2022-05-17 12:38:48 +07:00
Alex Sharov
a86660187d
Test: support of nil value for prefixMatch (#450)
* save

* save

* save

* save
2022-05-16 20:59:29 +01:00
Alex Sharov
91f7d84e60
Generic sort of slices (no allocs, inlinable) (#449)
* save

* save
2022-05-16 08:23:43 +01:00
ledgerwatch
900c03b1ba
Fixes for bin_patricia_hashed (#441)
* Debug bin commitment

* Fix print

* Fix print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Fix binString

* Fix binString

* Fix binString

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* No print

* No print

* Clean up

* Fix lint

* Fixing test

* Skip some tests

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-05-14 20:45:37 +01:00
Alex Sharov
f3f655ec26
Txn tip is u256 (#447)
* save

* save

* save

* save
2022-05-13 12:21:29 +07:00
Alex Sharov
4e257396f4
Kv: GetBool helper (#445)
* save

* save
2022-05-10 14:51:32 +07:00
Alex Sharov
bf0e20e80c
Rename sentry.ControlServerImpl to sentry.MultyClient and sentry.SentryServerImpl to sentry.GrpcServer #444 2022-05-10 12:17:19 +07:00
Alex Sharov
d882a11c67
up linter version (#443)
* save

* save

* save

* save
2022-05-10 10:14:02 +07:00
Alex Sharov
9f5b2b6391
don't log inside library about db close #442 2022-05-10 08:55:32 +07:00
Alex Sharov
da133c2d97
save (#440) 2022-05-07 12:39:03 +01:00
ledgerwatch
dd3e7fd537
Update decompress.go (#439) 2022-05-06 14:55:11 +01:00
Artem Tsebrovskiy
abd93fe9c9
implement bin_patricia_hashed trie (#430)
* commitment: implemented semi-working bin patricia trie

* commitment: added initialize function to select commitment implementation

* deleted reference implementation of binary trie

* added branch merge function selection in accordance with current commitment type

* smarter branch prefix convolution to reduce disk usage

* implemented DELETE update

* commitment/bin-trie: fixed merge processing and storage encoding

* added changed hex to bin patricia trie

* fixed trie variant select

* allocate if bufPos larger than buf size

* added tracing code

* Fix lint

* Skip test

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-05 13:08:58 +01:00
Alex Sharov
c18fea3a8c
fuzzbeta try 2 (#438)
* save

* save
2022-05-04 11:11:34 +07:00
Alex Sharov
625c9f5385
Typed sender (#435)
* save

* Squashed 'interfaces/' content from commit 477d121a

git-subtree-dir: interfaces
git-subtree-split: 477d121aafa9566e1f2f7d478852d800d3822bc5

* save
2022-04-28 15:35:08 +07:00
Alex Sharov
ef2df83bfb
rename field "type" (#434)
* save

* Squashed 'interfaces/' content from commit 9fdbffd

git-subtree-dir: interfaces
git-subtree-split: 9fdbffd8ff5cc8d1061939e9f6dc2e966ba5b284

* save

* save

* save

* save
2022-04-28 15:11:28 +07:00
Alex Sharov
42355b17ee
shorter common.ByteCount for shorter logs #433 2022-04-28 09:56:26 +07:00
Alex Sharov
14f53eefaf
Downloader: calc stat inside, add --torrent.download.slots and limit downloads inside (#432)
* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit cb09f4f

git-subtree-dir: interfaces
git-subtree-split: cb09f4fd4eb9caccf7ece5b5ba05b380a4ce9e33

* save

* save

* Squashed 'interfaces/' content from commit f4847ba

git-subtree-dir: interfaces
git-subtree-split: f4847baccf2c5e35e955f14cbee428f90111dfbf

* save

* save

* Squashed 'interfaces/' content from commit 17196d5

git-subtree-dir: interfaces
git-subtree-split: 17196d54cff8233b1c0c5eadc2f806ac260c2e9d

* save
2022-04-28 09:08:26 +07:00
battlmonstr
5dc5ab7fe1
RPC/Sentry: Peers method (#429)
* interfaces: Peers method in RPC/Sentry

* RPC/Sentry: Peers method

Wrappers and mocks.
GRPC regenerated.
See https://github.com/ledgerwatch/interfaces/pull/102
2022-04-25 19:54:05 +07:00
battlmonstr
c3b4804092
Sentry GRPC: rename Peers to PeerEvents (#427)
* sentry.proto: rename Peers to PeerEvents

* rename Peers() -> PeerEvents()
* rename PeersRequest -> PeerEventsRequest
* rename PeerEvent -> PeerEventId
* rename PeersReply -> PeerEvent

* Sentry GRPC: rename Peers to PeerEvents
2022-04-23 15:43:24 +01:00
battlmonstr
998d2d0d2f
Makefile improvements (#426)
* use $GOBIN everywhere
* make lint builds golangci-lint if needed
* moq rebuilt only if needed
* download protoc only if needed
* separate clean targets
* $PROTOC_INCLUDE
* refactor mkdir $GOBIN
2022-04-22 21:18:44 +07:00