Commit Graph

29 Commits

Author SHA1 Message Date
Alex Sharov
c5ffc971c5
[WIP] Badger v2 (#378)
* badger v2 investigation

* buf pool - use native New method and avoid double checks

* db.Open prototype

* db.Tx/Bucket/Cursor prototypes

* Chained config

* Item concept added

* save changes to test on master

* make hack resumable

* Design document v0

* Cursor concept

* less brackets syntax of cursor builder

* benchmarks

* cleanup fs

* test for context cancelations

* test for context cancelations

* test for cursor.Prefix option

* add ForEachKey method

* add ForEachKey method

* add naming explanation

* experiment of non-pointers cursor/bucket

* .Bucket() and .Cursor() doesn't returns error

* .Bucket() and .Cursor() doesn't returns error

* .Bucket() and .Cursor() doesn't returns error

* remove CursorOpts concept

* more test-cases

* simplify open api

* Tx, Bucket, Cursor - now are interfaces

* Tx, Bucket, Cursor - now are interfaces

* switch to interfaces

* rebase master

Co-authored-by: alex.sharov <alex.sharov@lazada.com>
2020-03-11 11:02:37 +00:00
Evgeny Danilenko
17a4a56634
Refactor mining. Remove a few mining goroutines (#338)
* add context

* extract chain events

* run commit in goroutines

* mine only on canonical

* typo

* linters

* fmt

* mark unused methods

* restore stress test

* test single miner

* remove unsafe Trie storage

* remove locks from miner

* restore interrupt

* remove result goroutine

* remove unconfirmedBlocks

* cherry-pick 04a1d475ff1a36ad8f92fec80385df18c52bdc1f

* extract uncles

* one miner succeeded

* restore context cancel

* cleanup

* skip an unstable test

* remove pending state

* use context instead of interrupt func

* calculate sealHash only once

* comment out unstable test

* after merge

* fix after merge

Co-authored-by: ledgerwatch <akhounov@gmail.com>
2020-02-03 15:02:26 +03:00
Alex Sharov
4a3abcea11
Make ComputeTxEnv public and reuse it in Retesteth and RpcDaemon (#309)
* Make ComputeTxEnv public and reuse it in Retesteth and RpcDaemon
2020-01-15 20:13:47 +07:00
Alex Sharov
fc7291ec34
Use local db in analytics (#308)
* Use local db in analytics (#308)
* pool of encoders
* incr and decr funcs
2020-01-15 19:47:13 +07:00
Alex Sharov
879ca6d364
rpcdaemon - simple lrucache (#290) 2020-01-07 17:52:20 +07:00
Alex Sharov
805f9aa501
benchmark rpc daemon
* tracing, write bench1() result into files

* add context to computeTxEnv, remote_db cursor lazy cache allocation,

* more results

* added

* added

* added

* more info

* make linter happy

* exit from tracing gorutines

* remove unused param

* re-run CI

* re-run CI

* remove concept txHandle

* batch cursor in reports

* remove debug output

* fix shadow variables and unhandled errors
2019-12-22 21:10:46 +06:00
alex.sharov
31889869d9 better functions naming 2019-12-16 20:55:10 +06:00
alex.sharov
f57015c4ea re-run ci 2019-12-16 20:55:10 +06:00
alex.sharov
88b05bd162 make linter happy 2019-12-16 20:54:30 +06:00
alex.sharov
d7a3c031f9 remove unused field 2019-12-16 20:34:51 +06:00
alex.sharov
4fa90b9856 make linter happy 2019-12-16 20:27:49 +06:00
alex.sharov
54d24190b9 compute state to exact transaction precision (but only for mainnet) 2019-12-13 09:56:30 +06:00
alex.sharov
73b50e080d debug_StorageRangeAt v0, got wrong response on request: {"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0x2bf07c790737be3bc4c57cbf3dedb231806f6bfef434657d59dcc9ddbe4665ab", 1,"0x8b3b3b624c3c0397d3da8fd861512393d51dcbac","0xfade75560a6cfb895f5dc7c4ab3fa10089ac2372c98aa78280d029ab36285ad6",1024],"id":1377} 2019-12-13 09:56:30 +06:00
alex.sharov
005d715545 move gasLimits to remote db 2019-12-09 21:34:47 +07:00
alex.sharov
bb2f7080ce Moved connection to .View method. Not very optimal, but it allow cancel connection from client side or configure timeout, also in future it will allow us make connection pool there (maybe don't need). 2019-12-06 08:12:02 +07:00
alex.sharov
8b69c54936 move context to from .NewDb to .View method 2019-12-06 08:12:02 +07:00
alex.sharov
ada5d88be8 fix linter warnings 2019-12-06 08:12:02 +07:00
alex.sharov
344b8029cc handle interruption signals, added context for client and server. Only problem that it's context to DB, but not to each server call - it means you can't use HTTP Request context here (or create new connection on each request). 2019-12-06 08:12:02 +07:00
alex.sharov
2f079dcf75 Readme.md 2019-12-03 09:07:33 +07:00
alex.sharov
33c52363ee totalDifficulty - consistent calculation 2019-12-03 09:07:33 +07:00
alex.sharov
330060d382 ignore *.http files - I using them to store http requests 2019-12-03 09:07:33 +07:00
alex.sharov
4d8c1a8ec1 remove debug 2019-12-03 09:07:33 +07:00
alex.sharov
570d3b79d7 initial implementation of eth_GetBlockByNumber, for now I did copy much functions from eth source because we may need max flexibility for benchmarks of rpcdaemon 2019-12-03 09:07:33 +07:00
Alexey Akhunov
f7b6b524fe Fix memprofile/cpuprofile confusion 2019-12-03 09:07:33 +07:00
Alexey Akhunov
1cd328d152 Fix lint 2019-12-03 09:07:21 +07:00
Alexey Akhunov
335ef77249 First working RPC command eth_blockNumber 2019-12-03 09:07:21 +07:00
Alexey Akhunov
95ca76e440 Fix lint 2019-12-03 09:07:13 +07:00
Alexey Akhunov
2026f74f04 Fix CLI 2019-12-03 09:07:13 +07:00
ledgerwatch
8cb96471a3
Skeleton of RPC daemon, for 1 operation eth_blockNumber (#209)
* Finish CmdSeek and add CmdNext

* Add remoteDb listener and RPC daemon CLI

* Fix test

* Fix CLI

* Fix lint

* Fix unreachable code

* Fix lint

* First working RPC command eth_blockNumber

* Fix lint

* Fix lint

* Fix memprofile/cpuprofile confusion

* Add comment
2019-12-02 13:47:00 +00:00