b00ris
df8798b94b
Thin history for storage ( #324 )
...
* save state
* save state
* fmt
* add check to test
* move incarnation length to common
* remove line
* fix lint
2020-01-15 17:55:43 +03:00
b00ris
d8f0bb169a
fix thin_history tests ( #313 )
...
* fix thin_history tests
* Fix for large hST
Co-authored-by: ledgerwatch <akhounov@gmail.com>
2020-01-15 17:04:16 +03:00
Igor Mandrigin
b7710ff7fa
New Witness Format (and remove the rest of the tapes) ( #317 )
2020-01-15 14:56:50 +01:00
b00ris
aa5757a84a
fix test ( #306 )
2020-01-08 17:02:24 +00:00
b00ris
29145a8b7d
Incorrect incarnation fix ( #298 )
...
* small fixes
* fmt
* change default incarnation for forEachStorage
* fix test
* apply alex changes
* small fixes
* rerun test
2020-01-08 12:55:56 +03:00
Giulio rebuffo
bcf04bbbcf
Change "for storage" encoding of Account from RLP to bitmask + fields encoding ( #287 )
...
* migration tool + CBOR encoding for storage of account bucket
* documentation updated
* fixed
* removed noncontract in EncodeForStorage
* code adjustments
* updated tests
* switched to custom encoding
* documentation updated
2020-01-07 09:02:44 +00:00
b00ris
bcee4845dc
Thin history ( #272 )
...
* save state
* remove repair
* save state
* remove emptydb check
* save state
* add walkAsOf test
* add WalkAsOf and MultiWalkAsOf tests
* deployed contracts counter
* reference counter for contract code
* drop storage root&contract hash for changesets
* start incarnation is 1(save state)
* fix ReorgOverSelfDestruct test
* hack fix TestReorgOverSelfDestruct
* test benchmark
* cleanup
* remove useless debug
* remove print trie
* return remove subtrie call to updateTrieRoot
* save state
* add mutation test
* remove useless test
* fix
* added mutation commit test
* rename experiment to thin history
* thin history mutation commit test
* fix ethdb tests
* getAsOf test
* add test&fix history index
* fix test
* make test for index search
* compute trie root incarnation fix
* tests fixes
* done job in case of panic
* fix lint
* fix&test for bad incarnation
* fix initial incarnation for genesis
* fix lint
* fix changeset test
* fix storage ranges test
* fix lint
* move set incarnation to create contract
* add comment
Co-authored-by: ledgerwatch <akhounov@gmail.com>
Co-authored-by: Evgeny Danilenko <6655321@bk.ru>
2019-12-20 15:25:40 +03:00
Evgeny Danilenko
9d5949a0b9
Retesteth restore mining ( #278 )
...
* initial commit
* add callers
* restore mining for retesteth
* unlock even if panics
* try to restore accountRange
* fmt
* rename MineBlock
* fmt
* linters
2019-12-19 13:44:43 +03:00
ledgerwatch
6d98798700
Fix for Istanbul sync (EIP-2200) ( #271 )
...
* Started adding tx tracing, try to fix GetCommittedState
* Fix lint
* Fix lint
* Fix lint
* Fix the collision tests
* Switch to boltDB with Yield
Yield boltdb transaction regularly to not block memory map resizing
* Added test
* gofmt -w
* Fix lint
* Revert "Switch to boltDB with Yield"
This reverts commit b42650d6e477ecd0f19fd017a29744384c249cac.
* Fix lint
2019-12-17 11:56:38 +00: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
76dc061d8b
FakePeer - reduce interface size
2019-12-13 09:56:30 +06:00
Igor Mandrigin
0ab530a614
Remote tapes from GenStructStep ( #260 )
2019-12-12 18:17:13 +01:00
Evgeny Danilenko
40f1610710
Fix mining after geth 1.9.9 ( #255 )
...
* restore chain head event
* fmt
* restore init
2019-12-11 14:54:07 +03:00
Evgeny Danilenko
5b4f352acb
Restore Ethash mining ( #231 )
...
* initial
* mining
* remove debug
* debug
* restore random seed in the mining tests
* green tests
* fix blockchain tests
* fix lint
* init miner only if asked
* linters
* do not store trie as singlton
* fmt
* new trieDbState constructor
2019-12-10 16:12:21 +03:00
Igor Mandrigin
422b154fb1
Remove tapes from HashBuilder ( #238 )
2019-12-09 15:59:30 +01:00
Martin Holst Swende
fffac1a5ed
consensus/ethash, params: eip-2384: bump difficulty bomb ( #20347 )
...
* consensus/ethash, params: implement eip-2384: bump difficulty bomb
* params: EIP 2384 compat checks
* consensus, params: add Muir Glacier block number (mainnet,ropsten) + official name
* core/forkid: forkid tests for muir glacier
* params/config: address review concerns
* params, core/forkid: review nitpicks
* cmd/geth,eth,les: add override option for muir glacier
* params: nit fix
2019-12-09 12:56:07 +01:00
Péter Szilágyi
6f8dba02ef
trie: track dirty cache metrics, track clean writes on commit
2019-12-09 12:56:07 +01:00
gary rong
7b664b8c51
core, miner: remove PostChainEvents ( #19396 )
...
This change:
- removes the PostChainEvents method on core.BlockChain.
- sorts 'removed log' events by block number.
- fire the NewChainHead event if we inject a canonical block into the chain
even if the entire insertion is not successful.
- guarantees correct event ordering in all cases.
2019-12-09 12:17:48 +01:00
Guillaume Ballet
423959d62d
core: fix staticcheck warnings ( #20384 )
...
* core: fix staticcheck warnings
* fix goimports
2019-12-09 10:47:08 +01:00
Igor Mandrigin
1e231a8a9a
Add storage mode flags as letters. ( #229 )
2019-12-06 12:19:00 +01:00
Igor Mandrigin
28d9b7c812
Use binary tries for the stateless action as an option. ( #218 )
2019-12-04 13:48:38 +01:00
Igor Mandrigin
ec6350fa15
apply post-rebase fixups
2019-12-03 16:27:57 +01:00
Michael Forney
d380af4457
core/asm: allow numbers in labels ( #20362 )
...
Numbers were already allowed when creating labels, just not when
referencing them.
2019-12-03 13:55:30 +01:00
Felix Lange
756bf779e4
core/state: fix staticcheck warnings ( #20357 )
...
Also remove dependency on gopkg.in/check.v1 in tests.
2019-12-03 13:54:05 +01:00
Felix Lange
0ad91599b5
core/types: remove BlockBy sorting code ( #20355 )
2019-12-03 13:51:21 +01:00
Felix Lange
b48ec1de03
core: fix staticcheck warnings ( #20323 )
2019-12-03 13:45:11 +01:00
gary rong
215f99b49e
core/rawdb: check hash before return data from ancient db ( #20195 )
...
* core/rawdb: check hash before return data from ancient db
* core/rawdb: fix lint
* core/rawdb: calculate the hash in the fly
2019-12-03 13:42:54 +01:00
meowsbits
01fc57807c
core: s/isEIP155/isHomestead/g (fix IntrinsicGas signature var name) ( #20300 )
...
* core: s/isEIP155/isEIP2/ (fix)
This signature variable name reflects a spec'd change
in gas cost for creating contracts as documented in EIP2 (Homestead HF).
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md#specification
* core: s/isEIP2/sIsHomestead/g
Use isHomestead since Homestead is what the caller
and rest of the code uses.
2019-12-03 13:39:28 +01:00
Felix Lange
1314aeebdb
build: use golangci-lint ( #20295 )
...
* build: use golangci-lint
This changes build/ci.go to download and run golangci-lint instead
of gometalinter.
* core/state: fix unnecessary conversion
* p2p/simulations: fix lock copying (found by go vet)
* signer/core: fix unnecessary conversions
* crypto/ecies: remove unused function cmpPublic
* core/rawdb: remove unused function print
* core/state: remove unused function xTestFuzzCutter
* core/vm: disable TestWriteExpectedValues in a different way
* core/forkid: remove unused function checksum
* les: remove unused type proofsData
* cmd/utils: remove unused functions prefixedNames, prefixFor
* crypto/bn256: run goimports
* p2p/nat: fix goimports lint issue
* cmd/clef: avoid using unkeyed struct fields
* les: cancel context in testRequest
* rlp: delete unreachable code
* core: gofmt
* internal/build: simplify DownloadFile for Go 1.11 compatibility
* build: remove go test --short flag
* .travis.yml: disable build cache
* whisper/whisperv6: fix ineffectual assignment in TestWhisperIdentityManagement
* .golangci.yml: enable goconst and ineffassign linters
* build: print message when there are no lint issues
* internal/build: refactor download a bit
2019-12-03 13:38:59 +01:00
nebojsa94
7b91786136
core/vm: fix tracer interface parameter name ( #20294 )
2019-12-03 13:32:21 +01:00
Martin Holst Swende
1aaa4da98e
core/evm: avoid copying memory for input in calls ( #20177 )
...
* core/evm, contracts: avoid copying memory for input in calls + make ecrecover not modify input buffer
* core/vm: optimize mstore a bit
* core/vm: change Get -> GetCopy in vm memory access
2019-12-03 13:21:13 +01:00
Martin Holst Swende
54cf44f46d
params, core/forkid: configure mainnet istanbul block 9069K ( #20222 )
...
* params: configure mainnet istanbul block 9069K
* core/forkid: add some more test items for mainnet istanbul
2019-12-03 13:14:58 +01:00
Péter Szilágyi
9fb7ac8d3e
cmd/devp2p, core/forkid: make forkid.Filter API uniform
2019-12-03 13:14:45 +01:00
Péter Szilágyi
78f4e1a457
core/forkid: add two clauses for more precise validation ( #20220 )
2019-12-03 13:14:21 +01:00
Péter Szilágyi
1540e9c83b
eth: eth/64 - extend handshake packet with fork id
2019-12-03 13:13:36 +01:00
Felix Lange
0016180259
cmd/devp2p, p2p: dial using node iterator, discovery crawler ( #20132 )
...
* p2p/enode: add Iterator and associated utilities
* p2p/discover: add RandomNodes iterator
* p2p: dial using iterator
* cmd/devp2p: add discv4 crawler
* cmd/devp2p: WIP nodeset filter
* cmd/devp2p: fixup lesFilter
* core/forkid: add NewStaticFilter
* cmd/devp2p: make -eth-network filter actually work
* cmd/devp2p: improve crawl timestamp handling
* cmd/devp2p: fix typo
* p2p/enode: fix comment typos
* p2p/discover: fix comment typos
* p2p/discover: rename lookup.next to 'advance'
* p2p: lower discovery mixer timeout
* p2p/enode: implement dynamic FairMix timeouts
* cmd/devp2p: add ropsten support in -eth-network filter
* cmd/devp2p: tweak crawler log message
2019-12-03 13:08:33 +01:00
Michael Forney
ccbacdf8e1
core/asm: assembly parser label fixes ( #20210 )
...
* core/asm: Fix encoding of pushed labels
EVM uses big-endian byte-order, so to pad a label value to 4 bytes,
zeros must be added to the front, not the end.
* core/asm: Fix PC calculations when a label is pushed
Incrementing PC by 5 is only correct if the label appears after a jump,
in which case there is an implicit push. When it appears after an explicit
push, PC should only be incremented by 4.
* core/asm: Allow JUMP with no argument
This way, a label can be pushed explicitly, or loaded from memory to
implement a jump table.
2019-12-03 13:05:34 +01:00
Martin Holst Swende
ac2325978a
cmd/utils: fix command line flag resolve ( #20167 )
...
In Geth, we have two sources for configuration:
(1) Config file
(2) Command line flag
Basically geth will first resolve config file and then overwrite
configs with command line flags.
This issue is: geth should only overwrite configs if flags are truly
set. So before we apply any flag to configs, `GlobalIsSet` check
is necessary.
2019-12-03 12:59:09 +01:00
Andrew Ashikhmin
8e5e5d881f
Issue 123 Make encoding of ChangeSet ordered by keys and binary-searchable ( #207 )
2019-12-03 12:13:12 +01:00
Evgeny Danilenko
ce1c14809b
deadlock-fix ( #206 )
2019-11-27 16:49:05 +00:00
ledgerwatch
a521aef296
Run archive node by default ( #204 )
...
* Make archive mode default again
* Fix test
* Remove bad file
* Change default of NoHistory to false
2019-11-27 15:50:40 +00:00
Andrew Ashikhmin
84285a5ab1
Roughly finish with adding BadgerDB (first cut) ( #203 )
...
* Bumping GOMAXPROCS for Badger
* fixes related to database size
* Schedule GC for Badger
* pacify linter
* Don't start GC for ephemeral Badger
* Don't log "Value log GC attempt didn't result in any cleanup"
* Start GC in backround
* Bump GC period and IdealBatchSize for Badger
* BadgerDatabase RewindData
* Boolean badger flag -> string database flag
* cosmetic change
2019-11-27 13:15:25 +00:00
Igor Mandrigin
4fb54a7b82
Write proper stats to the CSV file; restore charting capabilities. ( #201 )
2019-11-26 14:29:41 +01:00
Evgeny Danilenko
f2081b3591
In case of termination errors should be returned ( #175 )
...
* return errors
* fmt
2019-11-21 18:37:33 +00:00
ledgerwatch
244d70fb9c
Further fixes for the no-mod-root ( #186 )
...
* Further fixes
* Repace 1000 with a symbol
2019-11-21 15:56:39 +00:00
Andrew Ashikhmin
1c0cf9be72
BadgerDB: MultiWalk & some other APIs, command line flag, scaffolding for testing ( #183 )
...
* BadgerDatabase MemCopy
* fix err shadowing
* BadgerDatabase MultiPut & NewBatch
* Remove goOn from MultiWalk & MultiWalkAsOf
* BadgerDatabase MultiWalk. Scaffolding for testing Badger in blockchain_test
* Badger Flag
* fix error logging
* Split IdealBatchSize between BoltDB and BadgerDB
* NewEphemeralBadger
2019-11-21 16:12:38 +01:00
Igor Mandrigin
aa71b298cc
Write tape stats to a csv file. ( #185 )
2019-11-21 15:09:21 +01:00
ledgerwatch
c187d80152
Preparations for computing root without modifying the trie ( #172 )
...
Preparations for computing root without modifying the trie
2019-11-15 22:48:49 +00:00
Evgeny Danilenko
03dd91d4e6
Merge pull request #158 from ledgerwatch/fix-data-races
...
Fix data races and goroutine leaks
2019-11-15 17:25:32 +03:00
Igor Mandrigin
50bb08d08d
Don't store RLPs in valueNodes (except tests).
2019-11-15 13:31:09 +01:00
Evgeny Danienko
3cc627421f
Merge branch 'master' into fix-data-races
2019-11-15 15:22:22 +03:00
Evgeny Danienko
700e7b89ed
fix linters
2019-11-15 15:08:37 +03:00
Igor Mandrigin
00074e0ed7
Don't store RLPs in valueNodes (except tests).
2019-11-13 20:08:20 +01:00
andrew
81d0d84ed4
Merge branch 'master' into badger2
2019-11-11 21:06:48 +01:00
andrew
4a9faff349
Delete chain_indexer_test altogether
2019-11-11 20:12:19 +01:00
andrew
404c5896a3
Disable TestChainIndexerWithChildren as unstable
2019-11-11 20:04:43 +01:00
Alexey Akhunov
a1f599c2ee
Fixes from review
2019-11-11 17:03:39 +00:00
Alexey Akhunov
14b45ea50b
Downloader flag
2019-11-11 16:58:50 +00:00
andrew
8cb8544c45
Merge branch 'master' into badger2
2019-11-11 17:12:28 +01:00
Igor Mandrigin
fae6fe0775
Merge pull request #156 from ledgerwatch/issue-148
...
Use `GenStructStep` from `structural_2` in `DeriveSha`.
2019-11-11 13:24:46 +01:00
Evgeny Danienko
c0bcee68cc
Merge branch 'master' into fix-data-races
2019-11-07 18:59:44 +03:00
b00ris
6e880cc945
suffix to changeset rename ( #152 )
2019-11-07 18:51:25 +03:00
b00ris
0180e372f8
Fix pruning start ( #139 )
...
* fix
* fix lint
* save state
* fix test
* add comment
* fix lint
2019-11-07 18:51:06 +03:00
Igor Mandrigin
02af800e66
Use GenStructStep
from structural_2
in DeriveSha
.
2019-11-07 16:14:33 +01:00
andrew
93ff66f900
Merge branch 'master' into badger2
2019-11-07 15:55:57 +01:00
Igor Mandrigin
ae633ff296
Remove Copy
from IntraBlockState
and use references instead of copies in other places.
2019-11-07 13:32:20 +01:00
Evgeny Danienko
e2605ba0ee
wg data race
2019-11-07 13:32:00 +03:00
Alexey Akhunov
150cad87e9
Fix suicideStorageCheck block tests
2019-11-05 17:01:54 +00:00
andrew
9be775c8bd
Port my work from badger after the master rebase
2019-11-05 13:28:36 +01:00
b00ris
9eb7d8b1c2
Suffix reorg ( #113 )
2019-11-04 14:15:26 +01:00
Andrew Ashikhmin
e14b02e1c9
Merge pull request #135 from ledgerwatch/badger
2019-11-04 14:15:26 +01:00
ledgerwatch
f760001638
Merge pull request #112 from ledgerwatch/block_witness
2019-11-04 14:15:26 +01:00
ledgerwatch
f0dd8f407e
Merge pull request #125 from ledgerwatch/broken_snapshot
...
Not to wrap storage values into RLP during reorgs
2019-11-04 14:15:26 +01:00
Andrew Ashikhmin
6992db3180
Merge pull request #121 from ledgerwatch/red-queen
2019-11-04 14:15:26 +01:00
ledgerwatch
d1c8416270
Merge pull request #114 from ledgerwatch/fix_sync_crash
...
Fix the sync crash due to the mis-accounting of prunable entries
2019-11-04 14:15:26 +01:00
Alexey Akhunov
fe01bccbb8
Apply Turbo-Geth modifications to go-ethereum codebase
2019-11-01 21:52:03 +01:00
Martin Holst Swende
ead711779d
core: initialize current block/fastblock atomics to nil, fix #19286 ( #19352 )
2019-09-26 11:10:35 +02:00
zcheng9
2133f18f15
core/state: fix database leak and copy tests ( #19306 )
2019-09-26 11:09:59 +02:00
ywzqwwt
1a6ef5ae58
core/blockchain: remove block from futureBlocks on error ( #19763 )
2019-09-26 10:57:51 +02:00
Ryan Schneider
ad03d9801c
internal/ethapi: support block number or hash on state-related methods ( #19491 )
...
This change adds support for EIP-1898.
2019-09-26 10:47:31 +02:00
Péter Szilágyi
a308f012ba
core/state: fix copy-commit-copy ( #20113 )
...
* core/state: revert noop finalise, fix copy-commit-copy
* core/state: reintroduce net sstore tracking, extend tests for it
2019-09-24 10:49:59 +03:00
gary rong
05347b3d98
core/state: fix state object deep copy ( #20100 )
...
deepCopy didn't copy pending storage updates, leading to the
creation of blocks with invalid state root.
2019-09-20 11:55:44 +02:00
Péter Szilágyi
f9eb307216
core/forkid, params: fix tests, enable Istanbul on Rinkeby + testers
2019-09-19 10:13:11 +03:00
Péter Szilágyi
f40ff23b7b
core: fix tx dedup return error count
2019-09-18 11:42:47 +03:00
Felföldi Zsolt
0ac9bbba6c
les: multiple server bugfixes ( #20079 )
...
* les: detailed relative cost metrics
* les: filter txpool relative request statistic
* les: initialize price factors
* les: increased connected bias to lower churn rate
* les: fixed clientPool.setLimits
* core: do not use mutex in GetAncestor
* les: bump factor db version again
* les: add metrics
* les, light: minor fixes
2019-09-17 16:28:41 +03:00
Péter Szilágyi
056183c056
core: dedup known transactions without global lock, track metrics
2019-09-17 15:55:06 +03:00
Martin Holst Swende
8d41e885e6
core: smaller txpool status locking ( #20080 )
...
* txpool: smaller lock portion
* core/tx_pool: fix data race
2019-09-17 10:34:28 +03:00
Martin Holst Swende
f49d6e5ec0
core: add blockchain test too for revert cornercase
2019-09-16 11:42:14 +03:00
Péter Szilágyi
223b950944
core/state: accumulate writes and only update tries when must
2019-09-16 11:05:57 +03:00
Rob Mulholand
3b6c9902f3
core: remove unused gas return in ApplyTransaction ( #20065 )
2019-09-12 22:22:22 +03:00
Péter Szilágyi
305ed955db
Merge pull request #20038 from holiman/minor_encodingfix
...
core/state: optimize some internals during encoding
2019-09-10 17:12:06 +03:00
Martin Holst Swende
72045dff4f
core/state: optimize some internals during encoding
2019-09-10 15:15:34 +02:00
Péter Szilágyi
72d5a27a39
core, metrics, p2p: switch some invalid counters to gauges
2019-09-10 14:39:07 +03:00
Péter Szilágyi
cc9eb91d30
Merge pull request #20004 from karalabe/istanbul-override
...
cmd, core, eth, les: support --override.istanbul
2019-08-23 12:38:05 +03:00
Péter Szilágyi
e39b2a2bde
acmd, core, eth, les: support --override.istanbul
2019-08-23 12:09:27 +03:00
Péter Szilágyi
c8a1c0a115
Merge pull request #19993 from karalabe/istanbul-eip-integration
...
core/vm: enable istanbul EIPs in the jump table
2019-08-23 11:55:43 +03:00
Felix Lange
54b271a86d
crypto: add SignatureLength constant and use it everywhere ( #19996 )
...
Original change by @jpeletier
2019-08-22 15:14:06 +02:00
Péter Szilágyi
060e33fb4c
core/vm: enable istanbul EIPs in the jump table
2019-08-22 13:41:55 +03:00
HackyMiner
7c229941ac
core: log chain reorg/split metrics ( #18950 )
...
* core: log chain reorg/split metrics
* core: report 1-block reorgs on the metrics too
2019-08-22 12:28:23 +03:00
Péter Szilágyi
22fdbee8ed
Merge pull request #19972 from keep-network/istanbul-eip-152-blake2b-f-precompile
...
core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09
2019-08-22 11:09:31 +03:00