Commit Graph

13009 Commits

Author SHA1 Message Date
Martin Holst Swende
a7f3f55434 trie: add Commit-sequence tests for stacktrie commit (#21643)
# Conflicts:
#	trie/trie_test.go
2020-10-26 17:16:00 +01:00
gary rong
d6a69fd294 trie: polishes to trie committer (#21351)
* trie: update tests to check commit integrity

* trie: polish committer

* trie: fix typo

* trie: remove hasvalue notion

According to the benchmarks, type assertion between the pointer and
interface is extremely fast.

BenchmarkIntmethod-12           1000000000               1.91 ns/op
BenchmarkInterface-12           1000000000               2.13 ns/op
BenchmarkTypeSwitch-12          1000000000               1.81 ns/op
BenchmarkTypeAssertion-12       2000000000               1.78 ns/op

So the overhead for asserting whether the shortnode has "valuenode"
child is super tiny. No necessary to have another field.

* trie: linter nitpicks

Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
#	trie/committer.go
#	trie/hasher.go
#	trie/trie.go
#	trie/trie_test.go
2020-10-26 17:16:00 +01:00
Martin Holst Swende
328becb968 accounts, signer: implement gnosis safe support (#21593)
* accounts, signer: implement gnosis safe support

* common/math: add type for marshalling big to dec

* accounts, signer: properly sign gnosis requests

* signer, clef: implement account_signGnosisTx

* signer: fix auditlog print, change rpc-name (signGnosisTx to signGnosisSafeTx)

* signer: pass validation-messages/warnings to the UI for gnonsis-safe txs

* signer/core: minor change to validationmessages of typed data
2020-10-26 17:16:00 +01:00
Guillaume Ballet
ee0da1e9e1 trie: use stacktrie for Derivesha operation (#21407)
core/types: use stacktrie for derivesha

trie: add stacktrie file

trie: fix linter

core/types: use stacktrie for derivesha

rebased: adapt stacktrie to the newer version of DeriveSha

Co-authored-by: Martin Holst Swende <martin@swende.se>

More linter fixes

review feedback: no key offset for nodes converted to hashes

trie: use EncodeRLP for full nodes

core/types: insert txs in order in derivesha

trie: tests for derivesha with stacktrie

trie: make stacktrie use pooled hashers

trie: make stacktrie reuse tmp slice space

trie: minor polishes on stacktrie

trie/stacktrie: less rlp dancing

core/types: explain the contorsions in DeriveSha

ci: fix goimport errors

trie: clear mem on subtrie hashing

squashme: linter fix

stracktrie: use pooling, less allocs (#3)

trie: in-place hex prefix, reduce allocs and add rawNode.EncodeRLP

Reintroduce the `[]node` method, add the missing `EncodeRLP` implementation for `rawNode` and calculate the hex prefix in place.

Co-authored-by: Martin Holst Swende <martin@swende.se>

Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
#	core/block_validator.go
#	core/types/derive_sha.go
#	eth/downloader/queue.go
#	eth/handler.go
#	turbo/trie/database.go
#	turbo/trie/encoding.go
#	turbo/trie/encoding_test.go
#	turbo/trie/stacktrie.go
#	turbo/trie/stacktrie_test.go
2020-10-26 17:16:00 +01:00
mr_franklin
bcf31729f7 cmd/bootnode,internal/debug: fix some comments (#21623) 2020-10-26 17:16:00 +01:00
Marius van der Wijden
63c40d94b8 build: keep geth-sources.jar build result for JavaDoc (#21596)
* ci: tooltips for javadoc for mobile app

* f space
# Conflicts:
#	Makefile
#	build/ci.go
2020-10-26 17:16:00 +01:00
mr_franklin
d48b34b7c0 p2p/enode: remove unused code (#21612) 2020-10-26 17:16:00 +01:00
shigeyuki azuchi
6e46109a6c light: fix wrong description in a comment (#21573)
# Conflicts:
#	light/odr.go
2020-10-26 17:16:00 +01:00
mr_franklin
141b59de6d internal/web3ext: improve eth_getBlockByNumber and eth_getBlockByHash console api (#21608) 2020-10-26 17:16:00 +01:00
aaronbuchwald
527155fc34 core: free pointer from slice after popping element from price heap (#21572)
* Fix potential memory leak in price heap

* core: nil free pointer slice (alternative version)

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-10-26 17:16:00 +01:00
Martin Holst Swende
618f9bedfa core/vm, params: make 2200 in line with spec (#21605)
# Conflicts:
#	core/vm/gas_table.go
2020-10-26 17:16:00 +01:00
Marius van der Wijden
117f3186c1 mobile: added constructor for big int (#21597)
* mobile: added constructor for big int

* mobile: tiny nitpick
# Conflicts:
#	mobile/big.go
2020-10-26 17:16:00 +01:00
Marius van der Wijden
3949c520a4 accounts/abi: ABI explicit difference between Unpack and UnpackIntoInterface (#21091)
* accounts/abi: refactored abi.Unpack

* accounts/abi/bind: fixed error

* accounts/abi/bind: modified template

* accounts/abi/bind: added ToStruct for conversion

* accounts/abi: reenabled tests

* accounts/abi: fixed tests

* accounts/abi: fixed tests for packing/unpacking

* accounts/abi: fixed tests

* accounts/abi: added more logic to ToStruct

* accounts/abi/bind: fixed template

* accounts/abi/bind: fixed ToStruct conversion

* accounts/abi/: removed unused code

* accounts/abi: updated template

* accounts/abi: refactored unused code

* contracts/checkpointoracle: updated contracts to sol ^0.6.0

* accounts/abi: refactored reflection logic

* accounts/abi: less code duplication in Unpack*

* accounts/abi: fixed rebasing bug

* fix a few typos in comments

* rebase on master

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
# Conflicts:
#	accounts/abi/bind/base_test.go
#	accounts/abi/bind/bind_test.go
#	accounts/abi/pack_test.go
#	go.mod
#	mobile/bind.go
2020-10-26 17:16:00 +01:00
Igor Mandrigin
6dee4768b8 add to-merge.txt 2020-10-26 17:16:00 +01:00
alex.sharov
78e5bd37e4 try to use exclusive lock from prometheus 2020-10-26 19:08:36 +07:00
ledgerwatch
7554428884
POC of header downloader - splitting into 2 processes: sentry + downloader (via gRPC) (#1291)
* Splitting sentry and downloader - the beginning

* A bit more

* More on sentry

* More gRPC

* Sentry and downloader separated

* Update binding for stable version of grpc

* Better bufferSize flag

* Fix lint

* Send pelanties

* Fix lint

* Remove hard-coded tips on connect

* Tidy the logs a bit

* Deal with hardTips on Recovery

* Print hard tips

* Hide empty anchors

* Request headers after receiving a message

* Better waking up

* Print hard-coded block numbers

* Print outgoing requests

* Debug logging

* In the middle protection

* Sentry not to lose peers when core disconnects
2020-10-25 22:05:37 +00:00
Evgeny Danilenko
b6687fc9aa
initial (#1296) 2020-10-25 21:34:00 +00:00
ledgerwatch
dd2c047cdf
[WIP] Defrag utility for LMDB database (#1268)
* Initial

* Read freelist pages

* Fix

* Fix lint

* Fix lint

* Fix lint
2020-10-25 10:10:55 +00:00
Alex Sharov
6f27e3043b
lmdb_readonly_dont_create_folder (#1293) 2020-10-25 08:39:09 +00:00
Alex Sharov
331dcd45eb
Store receipts separately - one record per tx (#1271)
* squash

* add --database flag to integration

* clean

* split to 2 buckets

* split to 2 buckets

* split to 2 buckets

* split to 2 buckets

* split to 2 buckets

* save progress

* save progress

* improve test

* improve test

* save progress

* change app logic

* change app logic

* return err from rawdb package

* don't clean automatically

* don't clean automatically

* clean

* clean

* clean

* don't rely on `make clean`

* improve cbor code

* clean

* clean

* clean

* fix tests

* rebase master

* stop on error: headers stage

* make TxDb walk and multiwalk safe

* Fix panics

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-10-25 08:38:55 +00:00
Ricardo Guilherme Schmidt
e9572ae981
Fix infinite rpc.gascap on eth_estimateGas (#1292)
* Fix infinite rpc.gascap on eth_estimateGas

* use `gasCap.Sign() > 0` instead of `gasCap.Uint64() != 0`
2020-10-25 08:19:59 +00:00
Alex Sharov
c2f41d7723
stop on error: headers stage (#1289) 2020-10-24 18:05:12 +01:00
Thomas Jay Rush
1af3e09d75
1209 automate documentation (#1290)
* Automate documentation

* Updating

* Updating

* Fixing lint

* Updating readthedocs documentation

* Updating testing

* Updating testing
2020-10-24 18:03:52 +01:00
Alex Sharov
e85b388061
Protect from wrong class use: make ethdb.Tx incompatible with rawdb.DatabaseReader (#1288)
* protect_from_wrong_class_use

* more cases
2020-10-24 09:09:20 +01:00
Alex Sharov
77a4b3305d
rawdb to return errors: part 1 (#1286)
* ReadBlockByNumber and ReadChainConfig return error

* Let's make rawdb package to return error. But by small steps.
High-level methods need to move first:

ReadBlockByNumber
ReadChainConfig
ReadBlockByHash
ReadHeaderByHash
WriteChainConfig
WriteDatabaseVersion
WriteBlock
DeleteTd
WriteTd
ReadTd
2020-10-24 07:57:09 +01:00
Alex Sharov
6584b43b12
Allow start read transactions from ethdb.Database interface (#1287)
* allow_read_transactions

* fix lint

* fix lint

* more cases
2020-10-24 07:55:43 +01:00
Alex Sharov
5e53c79f50
stable version of grpc codegen, drop kv_remote_v1 support (#1285) 2020-10-24 07:54:03 +01:00
alex.sharov
c043a7c876 prometheus docs for developers 2020-10-24 10:15:53 +07:00
Alex Sharov
76f1b05cb2
Move tmpdir definition to app-start, move migrations folder inside tmpdir (#1282)
* extract tmpdir to app-level-code

* extract tmpdir to app-level-code

* save progresss
2020-10-23 12:18:45 +01:00
Alex Sharov
0bc61c06ed
ethdb readme, db objects diagram (#1281)
* db objects diagram

* db objects diagram

* db objects diagram

* db objects diagram

* db objects diagram

* db objects diagram

* db objects diagram
2020-10-23 12:17:16 +01:00
Alex Sharov
dd5258d524
save progresss (#1283) 2020-10-23 11:52:18 +01:00
Igor Mandrigin
bf044f73ef
Update README.md 2020-10-22 17:44:28 +02:00
Igor Mandrigin
3bec338aa4
Update README.md 2020-10-22 17:40:37 +02:00
Igor Mandrigin
468f246371 begin 2020.10.03 release cycle 2020-10-22 12:30:48 +02:00
ledgerwatch
fc5138c0e2
Update skip analysis (#1277) 2020-10-22 11:16:39 +01:00
Alex Sharov
1e237069e9
migrations: make tmp dir name predictable and unique (#1276) 2020-10-22 10:30:04 +02:00
ledgerwatch
88acfc55ca
Vary batch size for execution stage (#1274)
* Vary batch size for execution stage

* Fix in logging

* Improve log of timings

* Log improvements

* Log improvements

* Fix tests

* More log improvments, fix tests

* Fix tests

* Better logging for Bodies and Interhash

* Fix tests

* Minor fixes

* Fix test
2020-10-21 18:01:40 +01:00
alex.sharov
716a0f2dba link dashboard from main readme 2020-10-21 11:33:10 +07:00
alex.sharov
a1d0cd3a99 improve prometheus docs 2020-10-21 11:26:23 +07:00
alex.sharov
ee0abb3095 improve prometheus docs 2020-10-21 11:24:22 +07:00
alex.sharov
761af4f372 rebase master 2020-10-21 11:23:22 +07:00
alex.sharov
67c295ef15 rebase master 2020-10-21 11:22:25 +07:00
Evgeny Danilenko
44562fd07a
Jump tables data race (#1245)
* initial

* fix

* fmt

* linters

* linters

* debug

* fix data races

* safe close

* remove jump table clonning

* revert fix
2020-10-20 22:23:56 +01:00
Thomas Jay Rush
2aa6fb50ca
Cleans up some custom RPC commands (#1270)
* Moving a few files to be more consistent

* Collecting together custom code under tg_ namespace

* Small cleanups

* Updating test cases

* Uncomment eth_gasPrice but still unimplemented
2020-10-20 22:16:28 +01:00
Alex Sharov
9e7ed07fc6
Remove restapi and debug-ui from readme and docker-compose (#1263)
* rm_restapi_from_readme

* rm_restapi_from_readme

* rm_restapi_from_readme

* rm_restapi_from_readme
2020-10-20 09:20:24 +01:00
Giulio rebuffo
0a4386737e
Uses number instead of others to repressenting progressing in accord to block number (#1260)
* logs fixed with number=

* better logs

* removed lol
2020-10-19 22:46:26 +01:00
Alex Sharov
44bbe97a1f
Migration idempotency: handle corner-cases of CriticalCollector (#1257)
* save progress of db migration

* save progress of db migration

* delete

* delete

* delete

* delete

* delete

* print full key if it has 8 leading zeroes

* print full key if it has 8 leading zeroes

* print full key if it has 8 leading zeroes
2020-10-19 20:20:18 +01:00
Giulio rebuffo
f359527356
better logs (#1259) 2020-10-19 20:17:21 +01:00
canepat
5b62588ad3
Update description of table Headers (#1258)
* Update description of table Headers

* Complete the table Headers description
2020-10-19 20:15:27 +01:00
alex.sharov
dd21d07a7d print full key if it has 8 leading zeroes 2020-10-19 21:03:50 +07:00