Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in findAncestor #18994

Closed
Lvovich2018 opened this issue Feb 5, 2019 · 13 comments
Closed

Panic in findAncestor #18994

Lvovich2018 opened this issue Feb 5, 2019 · 13 comments

Comments

@Lvovich2018
Copy link

Hi there,

my system information

Geth version: 1.8.22
OS & Version: Nginx 1.13.4

my geth command

geth --rpc --rpcport 8545 --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal" --cache 8192 --syncmode "full"

After running a few seconds get

INFO [02-05|16:13:57.430] Maximum peer count                       ETH=25 LES=0 total=25
INFO [02-05|16:13:57.585] Starting peer-to-peer node               instance=Geth/v1.8.22-stable-7fa3509e/linux-amd64/go1.11.5
INFO [02-05|16:13:57.586] Allocated cache and file handles         database=/home/t/tihonov9/.ethereum/geth/chaindata cache=4096 handles=519999
INFO [02-05|16:14:01.519] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000  ConstantinopleFix: 7280000 Engine: ethash}"
INFO [02-05|16:14:01.519] Disk storage enabled for ethash caches   dir=/home/t/tihonov9/.ethereum/geth/ethash count=3
INFO [02-05|16:14:01.519] Disk storage enabled for ethash DAGs     dir=/home/t/tihonov9/.ethash               count=2
INFO [02-05|16:14:01.519] Initialising Ethereum protocol           versions="[63 62]" network=1
WARN [02-05|16:14:01.698] Head state missing, repairing chain      number=7155110 hash=7e38bc…30b877
INFO [02-05|16:14:02.426] Rewound blockchain to past state         number=7154010 hash=00b374…5490bf
INFO [02-05|16:14:02.427] Loaded most recent local header          number=7157401 hash=f797d4…32c8cd td=8963951431232627924909 age=4d7h2m
INFO [02-05|16:14:02.427] Loaded most recent local full block      number=7154010 hash=00b374…5490bf td=8955533262045259057180 age=4d23h26m
INFO [02-05|16:14:02.427] Loaded most recent local fast block      number=7157401 hash=f797d4…32c8cd td=8963951431232627924909 age=4d7h2m
INFO [02-05|16:14:02.427] Loaded local transaction journal         transactions=0 dropped=0
INFO [02-05|16:14:02.427] Regenerated local transaction journal    transactions=0 accounts=0
INFO [02-05|16:14:02.447] New local node record                    seq=13 id=d206b65a2f6abdc3 ip=127.0.0.1 udp=30303 tcp=30303
INFO [02-05|16:14:02.447] Started P2P networking                   self=enode://2d25bbceafeb32652614f6e1f68a4f06aeed16db793db304fb0d0490e965d6c46822940b8411a23ae48da8b87c10702481b7d2151e26866fa153e61fe52f12d1@127.0.0.1:30303
INFO [02-05|16:14:02.448] IPC endpoint opened                      url=/home/t/tihonov9/.ethereum/geth.ipc
INFO [02-05|16:14:02.448] HTTP endpoint opened                     url=http://127.0.0.1:8545               cors=* vhosts=localhost
INFO [02-05|16:14:22.447] Block synchronisation started
WARN [02-05|16:14:22.563] Synchronisation failed, dropping peer    peer=e23cbc3d217c5ee4 err="action from bad peer ignored"
INFO [02-05|16:14:33.476] New local node record                    seq=14 id=d206b65a2f6abdc3 ip=5.101.156.182 udp=30303 tcp=30303
INFO [02-05|16:14:34.004] New local node record                    seq=15 id=d206b65a2f6abdc3 ip=127.0.0.1     udp=30303 tcp=30303
INFO [02-05|16:14:34.711] New local node record                    seq=16 id=d206b65a2f6abdc3 ip=5.101.156.182 udp=30303 tcp=30303
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c0 pc=0xa67753]

goroutine 484 [running]:
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).findAncestor(0xc096a9a340, 0xc090d4a960, 0xc094940480, 0x0, 0x0, 0xc00003e070)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:825 +0x15d3
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer(0xc096a9a340, 0xc090d4a960, 0x79086822712fb853, 0x89397a54e6feb3ad, 0x22809b1c022792d6, 0xbc262c131f8d27d7, 0xc0454ce880, 0x0, 0x0)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:437 +0x37d
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).synchronise(0xc096a9a340, 0xc0964585d0, 0x10, 0x79086822712fb853, 0x89397a54e6feb3ad, 0x22809b1c022792d6, 0xbc262c131f8d27d7, 0xc0454ce880, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:406 +0x362
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).Synchronise(0xc096a9a340, 0xc0964585d0, 0x10, 0x79086822712fb853, 0x89397a54e6feb3ad, 0x22809b1c022792d6, 0xbc262c131f8d27d7, 0xc0454ce880, 0x0, 0x11eaa60, ...)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:324 +0x91
github.com/ethereum/go-ethereum/eth.(*ProtocolManager).synchronise(0xc097d64750, 0xc000030cc0)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/sync.go:200 +0x313
created by github.com/ethereum/go-ethereum/eth.(*ProtocolManager).syncer
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/sync.go:155 +0x1df

It started 2019-01-31 on version 1.8.21
Please help solve the problem.

@Lvovich2018
Copy link
Author

I put version 1.8.20 and

geth --rpc --rpcport 8545 --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal" --cache 8192 --syncmode "full" --override.constantinople=9999999

but nothing has changed, the same problem

INFO [02-06|10:07:31.260] Maximum peer count                       ETH=25 LES=0 total=25
INFO [02-06|10:07:31.416] Starting peer-to-peer node               instance=Geth/v1.8.20-stable-24d727b6/linux-amd64/go1.11.2
INFO [02-06|10:07:31.416] Allocated cache and file handles         database=/home/t/tihonov9/.ethereum/geth/chaindata cache=4096 handles=519999
INFO [02-06|10:07:34.491] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 9999999 Engine: ethash}"
INFO [02-06|10:07:34.491] Disk storage enabled for ethash caches   dir=/home/t/tihonov9/.ethereum/geth/ethash count=3
INFO [02-06|10:07:34.491] Disk storage enabled for ethash DAGs     dir=/home/t/tihonov9/.ethash               count=2
INFO [02-06|10:07:34.491] Initialising Ethereum protocol           versions="[63 62]" network=1
WARN [02-06|10:07:34.913] Head state missing, repairing chain      number=7155110 hash=7e38bc…30b877
INFO [02-06|10:07:35.633] Rewound blockchain to past state         number=7154010 hash=00b374…5490bf
INFO [02-06|10:07:35.633] Loaded most recent local header          number=7157401 hash=f797d4…32c8cd td=8963951431232627924909 age=5d55m33s
INFO [02-06|10:07:35.633] Loaded most recent local full block      number=7154010 hash=00b374…5490bf td=8955533262045259057180 age=5d17h20m
INFO [02-06|10:07:35.633] Loaded most recent local fast block      number=7157401 hash=f797d4…32c8cd td=8963951431232627924909 age=5d55m33s
INFO [02-06|10:07:35.634] Loaded local transaction journal         transactions=0 dropped=0
INFO [02-06|10:07:35.634] Regenerated local transaction journal    transactions=0 accounts=0
INFO [02-06|10:07:35.640] New local node record                    seq=1 id=d206b65a2f6abdc3 ip=127.0.0.1 udp=30303 tcp=30303
INFO [02-06|10:07:35.640] Started P2P networking                   self=enode://2d25bbceafeb32652614f6e1f68a4f06aeed16db793db304fb0d0490e965d6c46822940b8411a23ae48da8b87c10702481b7d2151e26866fa153e61fe52f12d1@127.0.0.1:30303
INFO [02-06|10:07:35.642] IPC endpoint opened                      url=/home/t/tihonov9/.ethereum/geth.ipc
INFO [02-06|10:07:35.642] HTTP endpoint opened                     url=http://127.0.0.1:8545               cors=* vhosts=localhost
INFO [02-06|10:07:36.515] New local node record                    seq=2 id=d206b65a2f6abdc3 ip=5.101.156.182 udp=30303 tcp=30303
INFO [02-06|10:07:45.641] Block synchronisation started
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c0 pc=0xa62b93]

goroutine 393 [running]:
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).findAncestor(0xc000233520, 0xc0925790e0, 0xc093e906c0, 0x0, 0x0, 0xc000054f70)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:825 +0x15d3
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer(0xc000233520, 0xc0925790e0, 0x4ba9dc82b41056bd, 0x8ac11a9220a812b4, 0x15ed03aa329b2cd9, 0xe7c75a8a3d24fbc4, 0xc08cc79780, 0x0, 0x0)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:437 +0x37d
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).synchronise(0xc000233520, 0xc08c4bcb80, 0x10, 0x4ba9dc82b41056bd, 0x8ac11a9220a812b4, 0x15ed03aa329b2cd9, 0xe7c75a8a3d24fbc4, 0xc08cc79780, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:406 +0x362
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).Synchronise(0xc000233520, 0xc08c4bcb80, 0x10, 0x4ba9dc82b41056bd, 0x8ac11a9220a812b4, 0x15ed03aa329b2cd9, 0xe7c75a8a3d24fbc4, 0xc08cc79780, 0x0, 0x11e3900, ...)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:324 +0x91
github.com/ethereum/go-ethereum/eth.(*ProtocolManager).synchronise(0xc093eec0d0, 0xc08d676240)
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/sync.go:200 +0x313
created by github.com/ethereum/go-ethereum/eth.(*ProtocolManager).syncer
        /home/travis/gopath/src/github.com/ethereum/go-ethereum/eth/sync.go:155 +0x1df

Dear developers, help to solve this problem!

@Lvovich2018
Copy link
Author

This is today's /geth/chaindata/log

10:07:31.416680 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed
10:07:32.686093 version@stat F·[0 52 373 8249 59709 187971] S·465GiB[0B 97MiB 355MiB 9GiB 97GiB 358GiB] Sc·[0.00 0.97 0.36 0.95 1.00 0.37]
10:07:32.804802 db@open opening
10:07:33.471470 journal@recovery F·1
10:07:33.484657 journal@recovery recovering @23634821
10:07:33.485816 memdb@flush created L0@23634847 N·3 S·549B "Dat..ion,v2503233636":"eth..ˏ\xa3,v2503233635"
10:07:33.510491 version@stat F·[1 52 373 8249 59709 187971] S·465GiB[549B 97MiB 355MiB 9GiB 97GiB 358GiB] Sc·[0.25 0.97 0.36 0.95 1.00 0.37]
10:07:34.490999 db@janitor F·256357 G·0
10:07:34.491049 db@open done T·1.686212238s
10:07:34.954025 table@compaction L0·1 -> L1·24 S·44MiB Q·2503233640
10:07:34.954995 table@build created L1@23634850 N·2 S·243B "Dat..ion,v2503233636":"Las..der,v2503233637"
10:07:35.025079 table@build created L1@23634851 N·116 S·2MiB "b\x00\x00..\xc0\xb4\xcf,v2502905693":"b\x00\x00..\x8d\x89\xd1,v2502922839"
10:07:35.041631 table@build created L1@23634852 N·134 S·2MiB "b\x00\x00..\xa0]\xfe,v2502922990":"b\x00\x00..e\v;,v2502939532"
10:07:35.058057 table@build created L1@23634853 N·160 S·2MiB "b\x00\x00..U\x80\xd6,v2502939600":"b\x00\x00..4\xaeX,v2503026505"
10:07:35.074992 table@build created L1@23634854 N·165 S·2MiB "b\x00\x00..\x99OV,v2503026554":"b\x00\x00..\x06\x8d\xdf,v2503042078"
10:07:35.115074 table@build created L1@23634855 N·168 S·2MiB "b\x00\x00..u\x83g,v2503042245":"b\x00\x00..ǭC,v2503125891"
10:07:35.130506 table@build created L1@23634856 N·149 S·2MiB "b\x00\x00..O\xce\xcb,v2503126051":"b\x00\x00..\xd4\x00\xda,v2503208762"
10:07:35.143686 table@build created L1@23634857 N·155 S·2MiB "b\x00\x00..\x96\x88\xa8,v2503208815":"b\x00\x00..[\xbb@,v2503224228"
10:07:35.158830 table@build created L1@23634858 N·154 S·2MiB "b\x00\x00..{٤,v2503224410":"b\x00\x00..\x16\x15\xad,v2502043400"
10:07:35.175408 table@build created L1@23634859 N·161 S·2MiB "b\x00\x00..\x88\x9f\x86,v2502043517":"b\x00\x00..\xa9>\xae,v2502128713"
10:07:35.192247 table@build created L1@23634860 N·158 S·2MiB "b\x00\x00..\xd2dm,v2502128859":"b\x00\x00..\x96U\xe0,v2502144549"
10:07:35.208822 table@build created L1@23634861 N·160 S·2MiB "b\x00\x00..\x94/g,v2502144681":"b\x00\x00..\xf2\x04s,v2502229949"
10:07:35.225456 table@build created L1@23634862 N·206 S·2MiB "b\x00\x00..R\xf5\x1a,v2502230048":"b\x00\x00..\xe0\x0f%,v2502246412"
10:07:35.276716 table@build created L1@23634863 N·213 S·2MiB "b\x00\x00..eʽ,v2502246494":"b\x00\x00..\xfe\x9c\n,v2502330875"
10:07:35.293545 table@build created L1@23634864 N·177 S·2MiB "b\x00\x00..\xecs\xf4,v2502330971":"b\x00\x00..\xe1\xfd\\,v2502415991"
10:07:35.310383 table@build created L1@23634865 N·130 S·2MiB "b\x00\x00..y`\x9d,v2502416080":"b\x00\x00..\x19\x80\x82,v2502432837"
10:07:35.327233 table@build created L1@23634866 N·142 S·2MiB "b\x00\x00..`\"\xc2,v2502432969":"b\x00\x00..\xa0\xf7\x92,v2502449470"
10:07:35.343927 table@build created L1@23634867 N·148 S·2MiB "b\x00\x00..z\x02 ,v2502449571":"b\x00\x00..^2c,v2502536555"
10:07:35.360350 table@build created L1@23634868 N·138 S·2MiB "b\x00\x00..\x9f\xaf\xda,v2502536662":"b\x00\x00..\xa4~?,v2502553899"
10:07:35.377335 table@build created L1@23634869 N·124 S·2MiB "b\x00\x00..\xb8J\xd1,v2502553991":"b\x00\x00..J\x9c\x89,v2502570540"
10:07:35.393966 table@build created L1@23634870 N·141 S·2MiB "b\x00\x00..ە\x1a,v2502570685":"b\x00\x00..\xbd˚,v2502658140"
10:07:35.414018 table@build created L1@23634871 N·150 S·2MiB "b\x00\x00..Вq,v2502658336":"b\x00\x00..\x17\xff\\,v2502674582"
10:07:35.432106 table@build created L1@23634872 N·137 S·2MiB "b\x00\x00..\x1cé,v2502674740":"b\x00\x00..>\x11\xbc,v2502691223"
10:07:35.432459 table@build created L1@23634873 N·1 S·473B "eth..ˏ\xa3,v2503233635":"eth..ˏ\xa3,v2503233635"
10:07:35.435939 version@stat F·[0 52 373 8249 59709 187971] S·465GiB[0B 97MiB 355MiB 9GiB 97GiB 358GiB] Sc·[0.00 0.97 0.36 0.95 1.00 0.37]
10:07:35.529651 table@compaction committed F-1 S-549B Ke·0 D·3 T·575.576954ms
10:07:35.529753 table@remove removed @23634847
10:07:35.529790 table@remove removed @23634823
10:07:35.530170 table@remove removed @23634824
10:07:35.530522 table@remove removed @23634825
10:07:35.530855 table@remove removed @23634826
10:07:35.531197 table@remove removed @23634827
10:07:35.531525 table@remove removed @23634828
10:07:35.532048 table@remove removed @23634829
10:07:35.532387 table@remove removed @23634830
10:07:35.532715 table@remove removed @23634831
10:07:35.533054 table@remove removed @23634832
10:07:35.533386 table@remove removed @23634833
10:07:35.533713 table@remove removed @23634834
10:07:35.534034 table@remove removed @23634835
10:07:35.534357 table@remove removed @23634836
10:07:35.534680 table@remove removed @23634837
10:07:35.535009 table@remove removed @23634838
10:07:35.535334 table@remove removed @23634839
10:07:35.535654 table@remove removed @23634840
10:07:35.535983 table@remove removed @23634841
10:07:35.536302 table@remove removed @23634842
10:07:35.536629 table@remove removed @23634843
10:07:35.536959 table@remove removed @23634844
10:07:35.537415 table@remove removed @23634845
10:07:35.537457 table@remove removed @23634846

@Lvovich2018
Copy link
Author

I found a solution to my problem. Helped downgrade geth on 1.8.19. Now the blocks are synchronized.

@holiman
Copy link
Contributor

holiman commented Feb 7, 2019

There's some discussion about this here: #18388 (comment) . Let's continue the investigation within this ticket.

@holiman
Copy link
Contributor

holiman commented Feb 7, 2019

For anyone else hitting this bug,

Could you please run with --vmodule=downloader=5 and paste the logs here? Would be nice to see exactly which blocks the downloader is attempting to process when it blows.

@holiman holiman changed the title Geth error: panic: runtime error: invalid memory address or nil pointer dereference Panic in findAncestor Feb 7, 2019
@markrtgh
Copy link

The problem occurs with geth versions above 1.8.19. On MacOS Geth/v1.8.19-stable-dae82f09/darwin-amd64/go1.11.2 will sync but any stable version above this cannot sync (log outputs below for 1.8.22-stable-7fa3509e). Be good to have this fixed before the fork.

It appears to be due to 1.8.22 opening too many files. Using lsof -n -c geth | wc -l
1.8.19 has about 170 .ldb files open. 1.8.22 rapidly opens an increasing number of .ldb files preventing other apps from opening before failing.

RELATED ISSUES?
RocksDB opens too many files on osx Mojave #18373
GETH 1.8.20 After update: Invalid Gas used #18358
Same error if change to --lightpeers=1 Panic issue when the options related with light node are on. (panic: runtime error: index out of range) #18385

./geth --datadir=/Volumes/disk01/eth --nodiscover --port=30307 --maxpeers=1 --lightpeers=0 --vmodule=downloader=5 --verbosity "4" console 2>>~/x/geth.log
lsof -n -c geth | wc -l = 32 open files
then add one parity peer on same machine in console with admin.addPeer
lsof -n -c geth | wc -l = 8173 files are opened within seconds before Error: nonce too high and parity also quits with error While open a file for random read: /x/Library/Application Support/io.parity.ethereum/chains/ethereum/db/906a34e69aec8c0d/overlayrecent/db/832931.sst: Too many open files in system")

DEBUG[02-10|02:46:13.094] Sanitizing Go's GC trigger               percent=100
INFO [02-10|02:46:13.110] Maximum peer count                       ETH=1 LES=0 total=1
DEBUG[02-10|02:46:13.116] FS scan times                            list=3.453596ms set=379.774µs diff=44.672µs
DEBUG[02-10|02:46:13.162] FS scan times                            list=173.083µs  set=1.157µs   diff=1.2µs
INFO [02-10|02:46:13.176] Starting peer-to-peer node               instance=Geth/v1.8.22-stable-7fa3509e/darwin-amd64/go1.11.5
INFO [02-10|02:46:13.176] Allocated cache and file handles         database=/Volumes/disk01/eth/geth/chaindata cache=512 handles=4611686018427387903
INFO [02-10|02:46:36.992] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000  ConstantinopleFix: 7280000 Engine: ethash}"
INFO [02-10|02:46:36.992] Disk storage enabled for ethash caches   dir=/Volumes/disk01/eth/geth/ethash count=3
INFO [02-10|02:46:36.992] Disk storage enabled for ethash DAGs     dir=/Users/xx/.ethash                       count=2
INFO [02-10|02:46:36.996] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [02-10|02:46:37.145] Loaded most recent local header          number=7200463 hash=b051d8…e8cfd7 td=9065618399462417010364 age=1h29m20s
INFO [02-10|02:46:37.145] Loaded most recent local full block      number=7200463 hash=b051d8…e8cfd7 td=9065618399462417010364 age=1h29m20s
INFO [02-10|02:46:37.145] Loaded most recent local fast block      number=7200463 hash=b051d8…e8cfd7 td=9065618399462417010364 age=1h29m20s
DEBUG[02-10|02:46:37.151] Reinjecting stale transactions           count=0
INFO [02-10|02:46:37.152] Loaded local transaction journal         transactions=0 dropped=0
INFO [02-10|02:46:37.155] Regenerated local transaction journal    transactions=0 accounts=0
WARN [02-10|02:46:37.155] Blockchain not empty, fast sync disabled 
DEBUG[02-10|02:46:37.160] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-10|02:46:37.278] InProc registered                        namespace=admin
DEBUG[02-10|02:46:37.278] InProc registered                        namespace=admin
DEBUG[02-10|02:46:37.279] InProc registered                        namespace=debug
DEBUG[02-10|02:46:37.279] InProc registered                        namespace=debug
DEBUG[02-10|02:46:37.279] InProc registered                        namespace=web3
DEBUG[02-10|02:46:37.280] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.280] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.281] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=txpool
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=debug
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=debug
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=personal
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=ethash
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.282] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=miner
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=eth
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=admin
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=debug
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=debug
DEBUG[02-10|02:46:37.283] InProc registered                        namespace=net
DEBUG[02-10|02:46:37.283] IPC registered                           namespace=admin
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=admin
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=debug
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=debug
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=web3
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=txpool
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=debug
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=debug
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=personal
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=ethash
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=miner
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=eth
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=admin
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=debug
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=debug
DEBUG[02-10|02:46:37.284] IPC registered                           namespace=net
INFO [02-10|02:46:37.285] IPC endpoint opened                      url=/Volumes/disk01/eth/geth.ipc
DEBUG[02-10|02:46:37.293] TCP listener up                          addr=[::]:30307
INFO [02-10|02:46:37.295] New local node record                    seq=3 id=c5fabcd82eb1f376 ip=127.0.0.1 udp=0 tcp=30307
INFO [02-10|02:46:37.295] Started P2P networking                   self="enode://a7da48ad8272503a38324622760c805adf6a9977c5e72d23548ecd39b2c58b5a6c6bf920df324b6f38366d8d87a754d918ff0d66a617e88415c4ea0b67491d62@127.0.0.1:30307?discport=0"
INFO [02-10|02:46:39.590] Mapped network port                      proto=tcp extport=30307 intport=30307 interface="UPNP IGDv1-PPP1"
DEBUG[02-10|02:46:57.162] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-10|02:47:17.165] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-10|02:47:37.166] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-10|02:47:57.167] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[02-10|02:48:11.587] Adding p2p peer                          name=Parity-Ethereum/v2.3... addr=192.168.1.3:30305 peers=1
DEBUG[02-10|02:48:11.589] Ethereum peer connected                  id=2fa68550c3da524f conn=staticdial name=Parity-Ethereum/v2.3.2-beta-678138f09-20190203/x86_64-macos/rustc1.32.0
TRACE[02-10|02:48:11.604] Registering sync peer                    peer=2fa68550c3da524f
DEBUG[02-10|02:48:11.604] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1 fromnum=1920000 skip=0 reverse=false
DEBUG[02-10|02:48:11.616] Verified to be on the same side of the DAO fork id=2fa68550c3da524f conn=staticdial
DEBUG[02-10|02:48:15.412] Peer discarded announcement              peer=2fa68550c3da524f number=7200777 hash=bfbd99…1a788e distance=314
DEBUG[02-10|02:48:15.413] Discarded propagated block, too far away peer=2fa68550c3da524f number=7200777 hash=bfbd99…1a788e distance=314
DEBUG[02-10|02:48:17.169] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
INFO [02-10|02:48:17.301] Block synchronisation started 
DEBUG[02-10|02:48:17.308] Synchronising with the network           peer=2fa68550c3da524f eth=63 head=95046e…fadc9b td=9066430862481340548778 mode=full
DEBUG[02-10|02:48:17.319] Retrieving remote chain height           peer=2fa68550c3da524f
DEBUG[02-10|02:48:17.319] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1 fromhash=95046e…fadc9b skip=0 reverse=false
DEBUG[02-10|02:48:24.894] Remote head header identified            peer=2fa68550c3da524f number=7200776 hash=95046e…fadc9b
DEBUG[02-10|02:48:24.894] Looking for common ancestor              peer=2fa68550c3da524f local=7200463 remote=7200776
TRACE[02-10|02:48:24.895] Span searching for common ancestor       peer=2fa68550c3da524f count=12 from=7200599 skip=15
DEBUG[02-10|02:48:24.895] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=12 fromnum=7200599 skip=15 reverse=false
TRACE[02-10|02:48:25.394] Binary searching for common ancestor     peer=2fa68550c3da524f start=7110463 end=7200776
DEBUG[02-10|02:48:25.394] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7155619 skip=0  reverse=false
DEBUG[02-10|02:48:25.409] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7178197 skip=0  reverse=false
DEBUG[02-10|02:48:25.413] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7189486 skip=0  reverse=false
DEBUG[02-10|02:48:25.417] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7195131 skip=0  reverse=false
DEBUG[02-10|02:48:25.421] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7197953 skip=0  reverse=false
DEBUG[02-10|02:48:25.424] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7199364 skip=0  reverse=false
DEBUG[02-10|02:48:25.428] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200070 skip=0  reverse=false
DEBUG[02-10|02:48:25.430] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200423 skip=0  reverse=false
DEBUG[02-10|02:48:25.443] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200599 skip=0  reverse=false
DEBUG[02-10|02:48:25.444] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200511 skip=0  reverse=false
DEBUG[02-10|02:48:25.444] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200467 skip=0  reverse=false
DEBUG[02-10|02:48:25.445] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200445 skip=0  reverse=false
DEBUG[02-10|02:48:25.447] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200456 skip=0  reverse=false
DEBUG[02-10|02:48:25.449] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200461 skip=0  reverse=false
DEBUG[02-10|02:48:25.468] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200464 skip=0  reverse=false
DEBUG[02-10|02:48:25.469] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200462 skip=0  reverse=false
DEBUG[02-10|02:48:25.471] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1  fromnum=7200463 skip=0  reverse=false
DEBUG[02-10|02:48:25.472] Found common ancestor                    peer=2fa68550c3da524f number=7200463 hash=b051d8…e8cfd7
DEBUG[02-10|02:48:25.472] Downloading transaction receipts         origin=7200464
DEBUG[02-10|02:48:25.472] Downloading block bodies                 origin=7200464
DEBUG[02-10|02:48:25.472] Directing header downloads               peer=2fa68550c3da524f origin=7200464
TRACE[02-10|02:48:25.473] Fetching skeleton headers                peer=2fa68550c3da524f count=192 from=7200464
DEBUG[02-10|02:48:25.473] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=128 fromnum=7200655 skip=191 reverse=false
DEBUG[02-10|02:48:25.474] Filling up skeleton                      from=7200464
TRACE[02-10|02:48:25.574] Requesting new batch of data             peer=2fa68550c3da524f type=headers from=7200464
DEBUG[02-10|02:48:25.574] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192 fromnum=7200464 skip=0   reverse=false
TRACE[02-10|02:48:25.861] Pre-scheduled new headers                peer=2fa68550c3da524f count=192 from=7200464
TRACE[02-10|02:48:25.861] Peer throughput measurements updated     peer=2fa68550c3da524f hps=66.946 bps=0.000 rps=0.000 sps=0.000 miss=0 rtt=18.028679661s
TRACE[02-10|02:48:25.861] Delivered new batch of data              peer=2fa68550c3da524f type=headers count=192
DEBUG[02-10|02:48:25.862] Data fetching completed                  type=headers
DEBUG[02-10|02:48:25.862] Skeleton fill terminated                 err=nil
TRACE[02-10|02:48:25.862] All headers delayed, waiting             peer=2fa68550c3da524f
TRACE[02-10|02:48:25.862] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=2   from=7200464
DEBUG[02-10|02:48:25.863] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=2
TRACE[02-10|02:48:25.882] Peer throughput measurements updated     peer=2fa68550c3da524f hps=66.946 bps=10.570 rps=0.000 sps=0.000 miss=0 rtt=16.227703931s
TRACE[02-10|02:48:25.882] Delivered new batch of data              peer=2fa68550c3da524f type=bodies  count=2:2
DEBUG[02-10|02:48:25.882] Inserting downloaded chain               items=2 firstnum=7200464 firsthash=d90b1f…eb775c lastnum=7200465 lasthash=5c4277…11974b
TRACE[02-10|02:48:25.884] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=128 from=7200466
DEBUG[02-10|02:48:25.885] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=128
DEBUG[02-10|02:48:25.917] Loaded old ethash cache from disk        epoch=240
DEBUG[02-10|02:48:25.919] Loaded old ethash cache from disk        epoch=241
TRACE[02-10|02:48:26.184] Peer throughput measurements updated     peer=2fa68550c3da524f hps=66.946 bps=52.141 rps=0.000 sps=0.000 miss=0 rtt=14.634960385s
TRACE[02-10|02:48:26.184] Delivered new batch of data              peer=2fa68550c3da524f type=bodies  count=128:128
TRACE[02-10|02:48:26.185] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=60      from=7200595
DEBUG[02-10|02:48:26.185] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=60
TRACE[02-10|02:48:26.400] Peer throughput measurements updated     peer=2fa68550c3da524f hps=66.946 bps=74.787 rps=0.000 sps=0.000 miss=0 rtt=13.193000779s
TRACE[02-10|02:48:26.400] Delivered new batch of data              peer=2fa68550c3da524f type=bodies  count=60:60
DEBUG[02-10|02:48:27.088] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:28.138] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:28.745] VM returned with error                   err="evm: execution reverted"
TRACE[02-10|02:48:28.863] Fetching skeleton headers                peer=2fa68550c3da524f count=192     from=7200656
DEBUG[02-10|02:48:28.863] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=128     fromnum=7200847 skip=191 reverse=false
TRACE[02-10|02:48:28.864] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200656
DEBUG[02-10|02:48:28.864] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200656 skip=0   reverse=false
TRACE[02-10|02:48:28.920] Scheduling new headers                   peer=2fa68550c3da524f count=120     from=7200656
TRACE[02-10|02:48:28.920] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200776
DEBUG[02-10|02:48:28.920] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200776 skip=0   reverse=false
TRACE[02-10|02:48:28.921] All headers delayed, waiting             peer=2fa68550c3da524f
TRACE[02-10|02:48:28.922] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=118     from=7200656
DEBUG[02-10|02:48:28.922] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=118
TRACE[02-10|02:48:29.496] Peer throughput measurements updated     peer=2fa68550c3da524f hps=66.946 bps=87.871 rps=0.000 sps=0.000 miss=0 rtt=11.9310848s
TRACE[02-10|02:48:29.496] Delivered new batch of data              peer=2fa68550c3da524f type=bodies  count=118:118
DEBUG[02-10|02:48:30.399] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:30.405] Inserted new block                       number=7200464 hash=d90b1f…eb775c uncles=0 txs=179 gas=7989297 elapsed=4.344s root=4055bf…f4bf6b
DEBUG[02-10|02:48:30.587] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:30.589] Inserted new block                       number=7200465 hash=5c4277…11974b uncles=0 txs=7   gas=262019  elapsed=183.468ms root=a69b90…f60405
INFO [02-10|02:48:30.589] Imported new chain segment               blocks=2 txs=186 mgas=8.251 elapsed=4.705s    mgasps=1.754 number=7200465 hash=5c4277…11974b age=1h30m42s cache=1.11mB
DEBUG[02-10|02:48:30.590] Reinjecting stale transactions           count=0
DEBUG[02-10|02:48:30.591] Inserting downloaded chain               items=310 firstnum=7200466 firsthash=3ea907…7c182e lastnum=7200775 lasthash=5fc505…87c082
DEBUG[02-10|02:48:31.320] VM returned with error                   err="evm: execution reverted"
TRACE[02-10|02:48:32.335] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200776
DEBUG[02-10|02:48:32.335] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200776 skip=0   reverse=false
TRACE[02-10|02:48:32.371] All headers delayed, waiting             peer=2fa68550c3da524f
DEBUG[02-10|02:48:33.722] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:34.286] VM returned with error                   err="out of gas"
DEBUG[02-10|02:48:34.852] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:34.853] Inserted new block                       number=7200466 hash=3ea907…7c182e uncles=0 txs=110 gas=7982668 elapsed=4.123s    root=dedac1…bdf093
TRACE[02-10|02:48:35.376] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200776
DEBUG[02-10|02:48:35.376] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200776 skip=0   reverse=false
TRACE[02-10|02:48:35.377] All headers delayed, waiting             peer=2fa68550c3da524f
DEBUG[02-10|02:48:35.652] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:35.661] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:35.662] Inserted new block                       number=7200467 hash=2f3053…8f5c18 uncles=0 txs=19  gas=6532536 elapsed=807.834ms root=a7395d…d79859
DEBUG[02-10|02:48:36.537] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:36.538] Inserted new block                       number=7200468 hash=86df1e…651284 uncles=0 txs=52  gas=7059039 elapsed=875.616ms root=4c11c8…239135
DEBUG[02-10|02:48:37.061] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:37.062] Inserted new block                       number=7200469 hash=89c5fa…92613c uncles=0 txs=20  gas=1174009 elapsed=523.456ms root=dbb11a…a59709
DEBUG[02-10|02:48:37.170] Recalculated downloader QoS values       rtt=17.9827712s   confidence=1.000 ttl=53.9483136s
DEBUG[02-10|02:48:37.178] VM returned with error                   err="evm: execution reverted"
TRACE[02-10|02:48:38.377] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200776
DEBUG[02-10|02:48:38.377] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200776 skip=0   reverse=false
TRACE[02-10|02:48:38.378] All headers delayed, waiting             peer=2fa68550c3da524f
DEBUG[02-10|02:48:38.613] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:38.804] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:38.805] Inserted new block                       number=7200470 hash=a1d5e2…7e2fbe uncles=0 txs=80  gas=5340329 elapsed=1.742s    root=500df6…f62d00
INFO [02-10|02:48:38.805] Imported new chain segment               blocks=5 txs=281 mgas=28.089 elapsed=8.212s    mgasps=3.420 number=7200470 hash=a1d5e2…7e2fbe age=1h29m51s cache=4.08mB
DEBUG[02-10|02:48:40.376] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:40.376] Inserted new block                       number=7200471 hash=acfce2…ec1cfa uncles=0 txs=27  gas=6015971 elapsed=1.570s    root=0e7741…fe84ba
DEBUG[02-10|02:48:40.853] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:40.889] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:40.889] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:40.889] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:40.890] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.011] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.011] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.041] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.041] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.041] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.096] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.096] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.096] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.096] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:41.240] VM returned with error                   err="out of gas"
TRACE[02-10|02:48:41.378] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200776
DEBUG[02-10|02:48:41.378] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200776 skip=0   reverse=false
TRACE[02-10|02:48:41.379] All headers delayed, waiting             peer=2fa68550c3da524f
DEBUG[02-10|02:48:41.927] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:42.103] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:42.105] Inserted new block                       number=7200472 hash=a581f3…bb6d53 uncles=0 txs=148 gas=7976912 elapsed=1.727s    root=6ea9e4…9f444c
DEBUG[02-10|02:48:42.126] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:42.609] VM returned with error                   err="out of gas"
DEBUG[02-10|02:48:42.618] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:43.845] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:43.845] Inserted new block                       number=7200473 hash=adce5c…0d1d09 uncles=0 txs=102 gas=7982500 elapsed=1.739s    root=179dfe…3f479b
DEBUG[02-10|02:48:44.374] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:44.374] VM returned with error                   err="evm: execution reverted"
TRACE[02-10|02:48:44.380] Fetching full headers                    peer=2fa68550c3da524f count=192     from=7200776
DEBUG[02-10|02:48:44.380] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200776 skip=0   reverse=false
TRACE[02-10|02:48:44.380] All headers delayed, waiting             peer=2fa68550c3da524f
DEBUG[02-10|02:48:45.051] Discarded propagated block, too far away peer=2fa68550c3da524f number=7200778 hash=d82d91…249dd8 distance=305
DEBUG[02-10|02:48:45.270] Trie cache stats after commit            misses=0 unloads=0
DEBUG[02-10|02:48:45.271] Inserted new block                       number=7200474 hash=ceb6f1…442d19 uncles=0 txs=72  gas=4025978 elapsed=1.425s    root=b5ae87…cee5ab
DEBUG[02-10|02:48:45.442] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:45.892] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:45.914] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:46.631] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:46.633] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:46.645] VM returned with error                   err="evm: execution reverted"
ERROR[02-10|02:48:46.646] 
########## BAD BLOCK #########
Chain config: {ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000  ConstantinopleFix: 7280000 Engine: ethash}

Number: 7200475
Hash: 0x7acbde3303e1fb71943c3705a68b041c2903039bce05d47f86c0d4c41d33472b


Error: nonce too high
##############################
 
DEBUG[02-10|02:48:46.646] Downloaded item processing failed        number=7200475 hash=7acbde…33472b err="nonce too high"
DEBUG[02-10|02:48:46.646] Header download terminated               peer=2fa68550c3da524f
DEBUG[02-10|02:48:46.646] Block body download terminated           err="block body download canceled (requested)"
DEBUG[02-10|02:48:46.646] Transaction receipt download terminated  err="receipt download canceled (requested)"
DEBUG[02-10|02:48:46.646] Synchronisation terminated               elapsed=29.326283493s
WARN [02-10|02:48:46.646] Synchronisation failed, dropping peer    peer=2fa68550c3da524f err="retrieved hash chain is invalid"
DEBUG[02-10|02:48:46.646] Removing Ethereum peer                   peer=2fa68550c3da524f
TRACE[02-10|02:48:46.646] Unregistering sync peer                  peer=2fa68550c3da524f
DEBUG[02-10|02:48:46.646] Ethereum message handling failed         id=2fa68550c3da524f conn=staticdial err=EOF
DEBUG[02-10|02:48:46.646] Removing p2p peer                        id=2fa68550c3da524f conn=staticdial duration=35.058s peers=0 req=false err="useless peer"
DEBUG[02-10|02:48:46.888] Adding p2p peer                          name=Parity-Ethereum/v2.3...                                                 addr=192.168.1.3:30305 peers=1
DEBUG[02-10|02:48:46.889] Ethereum peer connected                  id=2fa68550c3da524f conn=staticdial name=Parity-Ethereum/v2.3.2-beta-678138f09-20190203/x86_64-macos/rustc1.32.0
TRACE[02-10|02:48:46.889] Registering sync peer                    peer=2fa68550c3da524f
DEBUG[02-10|02:48:46.889] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=1920000 skip=0   reverse=false
DEBUG[02-10|02:48:46.892] Verified to be on the same side of the DAO fork id=2fa68550c3da524f conn=staticdial
DEBUG[02-10|02:48:47.301] Synchronising with the network           peer=2fa68550c3da524f eth=63 head=d82d91…249dd8 td=9066436243780016629592 mode=full
DEBUG[02-10|02:48:47.301] Retrieving remote chain height           peer=2fa68550c3da524f
DEBUG[02-10|02:48:47.301] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromhash=d82d91…249dd8 skip=0   reverse=false
DEBUG[02-10|02:48:47.301] Remote head header identified            peer=2fa68550c3da524f number=7200778 hash=d82d91…249dd8
DEBUG[02-10|02:48:47.301] Looking for common ancestor              peer=2fa68550c3da524f local=7200474 remote=7200778
TRACE[02-10|02:48:47.301] Span searching for common ancestor       peer=2fa68550c3da524f count=12      from=7200601 skip=15
DEBUG[02-10|02:48:47.301] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=12      fromnum=7200601 skip=15  reverse=false
TRACE[02-10|02:48:47.305] Binary searching for common ancestor     peer=2fa68550c3da524f start=7110474 end=7200778
DEBUG[02-10|02:48:47.305] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7155626 skip=0   reverse=false
DEBUG[02-10|02:48:47.324] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7178202 skip=0   reverse=false
DEBUG[02-10|02:48:47.333] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7189490 skip=0   reverse=false
DEBUG[02-10|02:48:47.337] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7195134 skip=0   reverse=false
DEBUG[02-10|02:48:47.340] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7197956 skip=0   reverse=false
DEBUG[02-10|02:48:47.343] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7199367 skip=0   reverse=false
DEBUG[02-10|02:48:47.346] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200072 skip=0   reverse=false
DEBUG[02-10|02:48:47.348] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200425 skip=0   reverse=false
DEBUG[02-10|02:48:47.355] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200601 skip=0   reverse=false
DEBUG[02-10|02:48:47.356] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200513 skip=0   reverse=false
DEBUG[02-10|02:48:47.356] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200469 skip=0   reverse=false
DEBUG[02-10|02:48:47.357] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200491 skip=0   reverse=false
DEBUG[02-10|02:48:47.357] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200480 skip=0   reverse=false
DEBUG[02-10|02:48:47.358] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200474 skip=0   reverse=false
DEBUG[02-10|02:48:47.359] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200477 skip=0   reverse=false
DEBUG[02-10|02:48:47.359] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=1       fromnum=7200475 skip=0   reverse=false
DEBUG[02-10|02:48:47.360] Found common ancestor                    peer=2fa68550c3da524f number=7200474 hash=ceb6f1…442d19
DEBUG[02-10|02:48:47.360] Directing header downloads               peer=2fa68550c3da524f origin=7200475
DEBUG[02-10|02:48:47.360] Downloading transaction receipts         origin=7200475
DEBUG[02-10|02:48:47.360] Downloading block bodies                 origin=7200475
TRACE[02-10|02:48:47.360] Fetching skeleton headers                peer=2fa68550c3da524f count=192     from=7200475
DEBUG[02-10|02:48:47.360] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=128     fromnum=7200666 skip=191 reverse=false
DEBUG[02-10|02:48:47.360] Filling up skeleton                      from=7200475
TRACE[02-10|02:48:47.460] Requesting new batch of data             peer=2fa68550c3da524f type=headers from=7200475
DEBUG[02-10|02:48:47.461] Fetching batch of headers                id=2fa68550c3da524f conn=staticdial count=192     fromnum=7200475 skip=0   reverse=false
TRACE[02-10|02:48:51.268] Pre-scheduled new headers                peer=2fa68550c3da524f count=192     from=7200475
TRACE[02-10|02:48:51.269] Peer throughput measurements updated     peer=2fa68550c3da524f hps=5.042  bps=0.000  rps=0.000 sps=0.000 miss=0 rtt=18.380790046s
TRACE[02-10|02:48:51.269] Delivered new batch of data              peer=2fa68550c3da524f type=headers count=192
DEBUG[02-10|02:48:51.270] Data fetching completed                  type=headers
DEBUG[02-10|02:48:51.270] Skeleton fill terminated                 err=nil
TRACE[02-10|02:48:51.270] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=2       from=7200475
DEBUG[02-10|02:48:51.270] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=2
TRACE[02-10|02:48:51.270] All headers delayed, waiting             peer=2fa68550c3da524f
TRACE[02-10|02:48:52.297] Peer throughput measurements updated     peer=2fa68550c3da524f hps=5.042  bps=0.195  rps=0.000 sps=0.000 miss=0 rtt=16.645399963s
TRACE[02-10|02:48:52.297] Delivered new batch of data              peer=2fa68550c3da524f type=bodies  count=2:2
DEBUG[02-10|02:48:52.297] Inserting downloaded chain               items=2   firstnum=7200475 firsthash=7acbde…33472b lastnum=7200476 lasthash=ff293b…b83db0
TRACE[02-10|02:48:52.297] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=4       from=7200477
DEBUG[02-10|02:48:52.297] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=4
DEBUG[02-10|02:48:52.330] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:52.352] VM returned with error                   err="evm: execution reverted"
DEBUG[02-10|02:48:52.356] VM returned with error                   err="evm: execution reverted"
TRACE[02-10|02:48:52.555] Peer throughput measurements updated     peer=2fa68550c3da524f hps=5.042  bps=1.725  rps=0.000 sps=0.000 miss=0 rtt=15.006676973s
TRACE[02-10|02:48:52.555] Delivered new batch of data              peer=2fa68550c3da524f type=bodies  count=4:4
TRACE[02-10|02:48:52.556] Requesting new batch of data             peer=2fa68550c3da524f type=bodies  count=28      from=7200481
DEBUG[02-10|02:48:52.556] Fetching batch of block bodies           id=2fa68550c3da524f conn=staticdial count=28
DEBUG[02-10|02:48:52.645] VM returned with error                   err="evm: execution reverted"
ERROR[02-10|02:48:52.648] 
########## BAD BLOCK #########
Chain config: {ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000  ConstantinopleFix: 7280000 Engine: ethash}

Number: 7200475
Hash: 0x7acbde3303e1fb71943c3705a68b041c2903039bce05d47f86c0d4c41d33472b


Error: nonce too high
##############################
 
DEBUG[02-10|02:48:52.648] Downloaded item processing failed        number=7200475 hash=7acbde…33472b err="nonce too high"
DEBUG[02-10|02:48:52.648] Header download terminated               peer=2fa68550c3da524f
DEBUG[02-10|02:48:52.648] Transaction receipt download terminated  err="receipt download canceled (requested)"
DEBUG[02-10|02:48:52.648] Block body download terminated           err="block body download canceled (requested)"
DEBUG[02-10|02:48:52.648] Synchronisation terminated               elapsed=5.347255915s
WARN [02-10|02:48:52.648] Synchronisation failed, dropping peer    peer=2fa68550c3da524f err="retrieved hash chain is invalid"
DEBUG[02-10|02:48:52.648] Removing Ethereum peer                   peer=2fa68550c3da524f
TRACE[02-10|02:48:52.648] Unregistering sync peer                  peer=2fa68550c3da524f
DEBUG[02-10|02:48:52.648] Ethereum message handling failed         id=2fa68550c3da524f conn=staticdial err=EOF
DEBUG[02-10|02:48:52.648] Removing p2p peer                        id=2fa68550c3da524f conn=staticdial duration=5.759s  peers=0 req=false err="useless peer"
DEBUG[02-10|02:48:55.153] Recalculated downloader QoS values       rtt=18.4870784s   confidence=1.000 ttl=55.4612352s
DEBUG[02-10|02:49:13.644] Recalculated downloader QoS values       rtt=18.8653088s   confidence=1.000 ttl=56.5959264s
INFO [02-10|02:49:14.291] IPC endpoint closed                      url=/Volumes/disk01/eth/geth.ipc
DEBUG[02-10|02:49:14.291] RPC Server shutdown initiatied 
INFO [02-10|02:49:14.291] Writing cached state to disk             block=7200474 hash=ceb6f1…442d19 root=b5ae87…cee5ab
INFO [02-10|02:49:14.487] Persisted trie from memory database      nodes=11649 size=4.16mB time=194.821713ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=4433 livesize=1.95mB
INFO [02-10|02:49:14.487] Writing cached state to disk             block=7200473 hash=adce5c…0d1d09 root=179dfe…3f479b
INFO [02-10|02:49:14.495] Persisted trie from memory database      nodes=552   size=243.25kB time=8.10849ms    gcnodes=0 gcsize=0.00B gctime=0s livenodes=3881 livesize=1.71mB
INFO [02-10|02:49:14.496] Writing cached state to disk             block=7200347 hash=6dbe96…a4bc48 root=5189eb…60575f
INFO [02-10|02:49:14.496] Persisted trie from memory database      nodes=0     size=0.00B    time=4.483µs      gcnodes=0 gcsize=0.00B gctime=0s livenodes=3881 livesize=1.71mB
DEBUG[02-10|02:49:14.496] Dereferenced trie from memory database   nodes=36    size=17.98kB  time=219.424µs    gcnodes=36 gcsize=17.98kB gctime=218.628µs livenodes=3845 livesize=1.69mB
DEBUG[02-10|02:49:14.499] Dereferenced trie from memory database   nodes=532   size=230.87kB time=2.250537ms   gcnodes=568 gcsize=248.85kB gctime=2.467308ms livenodes=3313 livesize=1.46mB
DEBUG[02-10|02:49:14.499] Dereferenced trie from memory database   nodes=131   size=64.27kB  time=632.912µs    gcnodes=699 gcsize=313.12kB gctime=3.098885ms livenodes=3182 livesize=1.40mB
DEBUG[02-10|02:49:14.502] Dereferenced trie from memory database   nodes=550   size=240.61kB time=2.067425ms   gcnodes=1249 gcsize=553.74kB gctime=5.164727ms livenodes=2632 livesize=1.16mB
DEBUG[02-10|02:49:14.503] Dereferenced trie from memory database   nodes=152   size=68.82kB  time=1.018955ms   gcnodes=1401 gcsize=622.55kB gctime=6.182425ms livenodes=2480 livesize=1.09mB
DEBUG[02-10|02:49:14.504] Dereferenced trie from memory database   nodes=618   size=270.61kB time=1.720009ms   gcnodes=2019 gcsize=893.16kB gctime=7.901145ms livenodes=1862 livesize=816.69kB
DEBUG[02-10|02:49:14.505] Dereferenced trie from memory database   nodes=315   size=139.77kB time=705.56µs     gcnodes=2334 gcsize=1.03mB   gctime=8.606171ms livenodes=1547 livesize=676.91kB
DEBUG[02-10|02:49:14.507] Dereferenced trie from memory database   nodes=875   size=374.99kB time=1.888987ms   gcnodes=3209 gcsize=1.41mB   gctime=10.494427ms livenodes=672  livesize=301.93kB
DEBUG[02-10|02:49:14.509] Dereferenced trie from memory database   nodes=671   size=301.93kB time=1.572416ms   gcnodes=3880 gcsize=1.71mB   gctime=12.065868ms livenodes=1    livesize=0.00B
DEBUG[02-10|02:49:14.509] Dereferenced trie from memory database   nodes=0     size=0.00B    time=1.31µs       gcnodes=3880 gcsize=1.71mB   gctime=12.066828ms livenodes=1    livesize=0.00B
DEBUG[02-10|02:49:14.509] Dereferenced trie from memory database   nodes=0     size=0.00B    time=976ns        gcnodes=3880 gcsize=1.71mB   gctime=12.067533ms livenodes=1    livesize=0.00B
INFO [02-10|02:49:14.509] Blockchain manager stopped 
INFO [02-10|02:49:14.509] Stopping Ethereum protocol 
INFO [02-10|02:49:14.510] Ethereum protocol stopped 
INFO [02-10|02:49:14.510] Transaction pool stopped 
INFO [02-10|02:49:14.657] Database closed                          database=/Volumes/disk01/eth/geth/chaindata
DEBUG[02-10|02:49:14.657] Read error                               err="accept tcp [::]:30307: use of closed network connection"
DEBUG[02-10|02:49:14.657] Deleting port mapping                    proto=tcp extport=30307 intport=30307 interface="UPNP IGDv1-PPP1"

Example panic error

DEBUG[02-09|06:15:47.287] Ethereum peer connected                  id=cc2510f7325ff535 conn=dyndial name=Geth/v1.8.20-stable-24d727b6/linux-amd64/go1.10.4
DEBUG[02-09|06:15:47.747] Fetching batch of headers                id=cc2510f7325ff535 conn=dyndial count=1 fromnum=1920000 skip=0 reverse=false
DEBUG[02-09|06:15:49.099] Revalidated node                         b=12 id=cb32efaaa8c3dbb7 checks=1
DEBUG[02-09|06:15:49.210] Verified to be on the same side of the DAO fork id=cc2510f7325ff535 conn=dyndial
INFO [02-09|06:15:54.185] Block synchronisation started 
DEBUG[02-09|06:15:54.186] Synchronising with the network           peer=cc2510f7325ff535 eth=63 head=1aa5c4…ad258a td=9056290967421108501860 mode=full
DEBUG[02-09|06:15:54.186] Retrieving remote chain height           peer=cc2510f7325ff535
DEBUG[02-09|06:15:54.186] Fetching batch of headers                id=cc2510f7325ff535 conn=dyndial count=1 fromhash=1aa5c4…ad258a skip=0 reverse=false
DEBUG[02-09|06:15:54.504] Replaced dead node                       b=16 id=38da1120c0732c20 ip=104.248.139.115 checks=0 r=534db09602272f69 rip=46.101.120.19
DEBUG[02-09|06:15:54.830] Remote head header identified            peer=cc2510f7325ff535 number=7196538 hash=1aa5c4…ad258a
DEBUG[02-09|06:15:54.830] Looking for common ancestor              peer=cc2510f7325ff535 local=7195454 remote=7196538
DEBUG[02-09|06:15:54.830] Fetching batch of headers                id=cc2510f7325ff535 conn=dyndial count=12 fromnum=7196361 skip=15 reverse=false
DEBUG[02-09|06:15:55.302] Fetching batch of headers                id=cc2510f7325ff535 conn=dyndial count=1  fromnum=7150996 skip=0  reverse=false
DEBUG[02-09|06:15:55.844] Fetching batch of headers                id=cc2510f7325ff535 conn=dyndial count=1  fromnum=7173767 skip=0  reverse=false
DEBUG[02-09|06:15:56.389] Synchronisation terminated               elapsed=2.20279416s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c0 pc=0x4658423]

goroutine 702 [running]:
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).findAncestor(0xc0000b0680, 0xc0435402d0, 0xc00031ed80, 0x0, 0x0, 0xc00003e570)
	/Users/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:825 +0x15d3
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer(0xc0000b0680, 0xc0435402d0, 0x3777474e7fc4a51a, 0x46717cab2cc2fea5, 0xf33f84ef05c06bd6, 0x8a25adf22092b800, 0xc015688520, 0x0, 0x0)
	/Users/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:437 +0x37d
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).synchronise(0xc0000b0680, 0xc03cfbf150, 0x10, 0x3777474e7fc4a51a, 0x46717cab2cc2fea5, 0xf33f84ef05c06bd6, 0x8a25adf22092b800, 0xc015688520, 0x0, 0x0, ...)
	/Users/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:406 +0x362
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).Synchronise(0xc0000b0680, 0xc03cfbf150, 0x10, 0x3777474e7fc4a51a, 0x46717cab2cc2fea5, 0xf33f84ef05c06bd6, 0x8a25adf22092b800, 0xc015688520, 0x0, 0xc0001897c0, ...)
	/Users/travis/gopath/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:324 +0x91
github.com/ethereum/go-ethereum/eth.(*ProtocolManager).synchronise(0xc0003231e0, 0xc0148b4a80)
	/Users/travis/gopath/src/github.com/ethereum/go-ethereum/eth/sync.go:200 +0x313
created by github.com/ethereum/go-ethereum/eth.(*ProtocolManager).syncer
	/Users/travis/gopath/src/github.com/ethereum/go-ethereum/eth/sync.go:155 +0x1df

@holiman
Copy link
Contributor

holiman commented Feb 10, 2019

Whoa: handles=4611686018427387903 . What system are you on? What does ulimit -Hn and other checks like ulimit -Sn and cat /proc/sys/fs/file-max say?

@markrtgh
Copy link

MacOS 10.14.2
ulimit -Hn
unlimited
ulimit -Sn
256
cat /proc/sys/fs/file-max
cat: /proc/sys/fs/file-max: No such file or directory

geth 1.8.19 log has handles=128

INFO [02-10|01:54:13.295] Allocated cache and file handles         database=/Volumes/disk01/eth/geth/chaindata cache=512 handles=128

@holiman
Copy link
Contributor

holiman commented Feb 10, 2019

@Lvovich2018 what OS are you on? ....nginx 1.13.4 is not an os...

@holiman
Copy link
Contributor

holiman commented Feb 10, 2019

@markrtgh how about launchctl limit maxfiles ?

@holiman
Copy link
Contributor

holiman commented Feb 10, 2019

Here's on my Fedora machine:

[user@work ~]$ ulimit -Hn
4096
[user@work ~]$ ulimit -Sn
1024
[user@work ~]$ cat /proc/sys/fs/file-max
793180
[user@work ~]$ /home/user/go/src/github.com/ethereum/go-ethereum/build/bin/geth --nodiscover --maxpeers 0
INFO [02-10|16:34:35.211] Maximum peer count                       ETH=0 LES=0 total=0
INFO [02-10|16:34:35.214] Starting peer-to-peer node               instance=Geth/v1.9.0-unstable-02abd4be/linux-amd64/go1.11.2
INFO [02-10|16:34:35.214] Allocated cache and file handles         database=/home/user/.ethereum/geth/chaindata cache=512 handles=2048

So handles is exactly half of the hard limit. In the case of infinite hard limit, it seems you're getting half of a max int64, which is too much by an insane amount. I think the fix is to make geth hard-cap at ~20K handles.

>>> hex(2*4611686018427387903)
'0x7ffffffffffffffe'

@holiman
Copy link
Contributor

holiman commented Feb 10, 2019

@markrtgh
Copy link

launchctl limit maxfiles
maxfiles 256 unlimited

holiman added a commit to holiman/go-ethereum that referenced this issue Feb 11, 2019
karalabe pushed a commit to holiman/go-ethereum that referenced this issue Feb 19, 2019
…eum#19035)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994

* common/fdlimit: fix Maximum-check to respect OPEN_MAX

* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()

* common/fdlimit: goimports

* common/fdlimit: check value after setting fdlimit

* common/fdlimit: make comment a bit more descriptive

* cmd/utils: make fdlimit happy path a bit cleaner

(cherry picked from commit f48da43)
dshulyak pushed a commit to status-im/go-ethereum that referenced this issue Mar 14, 2019
…eum#19035)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994

* common/fdlimit: fix Maximum-check to respect OPEN_MAX

* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()

* common/fdlimit: goimports

* common/fdlimit: check value after setting fdlimit

* common/fdlimit: make comment a bit more descriptive

* cmd/utils: make fdlimit happy path a bit cleaner

(cherry picked from commit f48da43)
kiku-jw pushed a commit to kiku-jw/go-ethereum that referenced this issue Mar 29, 2019
…eum#19035)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994

* common/fdlimit: fix Maximum-check to respect OPEN_MAX

* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()

* common/fdlimit: goimports

* common/fdlimit: check value after setting fdlimit

* common/fdlimit: make comment a bit more descriptive

* cmd/utils: make fdlimit happy path a bit cleaner
TuitionCoin added a commit to FinTechToken/go-ethereum that referenced this issue Jun 16, 2019
* core: better printout of receipts in bad block reports (ethereum#18156)

* core/blockchain: better printout of receipts in bad block reports

* fix splleing

* params: add Constantinople block to AllXYZProtocolChanges (ethereum#18162)

* params: Add Constantinople block to AllCliqueProtocolChanges

* params: Add Constantinople block to AllEthashProtocolChanges

* trie: fix overflow in write cache parent tracking (ethereum#18165)

trie/database: fix overflow in parent tracking

* travis: increase open file limits (ethereum#18155)

* cmd/swarm: FUSE do not require --ipcpath (ethereum#18112)

- Have `${DataDir}/bzzd.ipc` as IPC path default.
- Respect the `--datadir` flag.
- Keep only the global `--ipcpath` flag and drop the local `--ipcpath` flag
  as flags might overwrite each other. (Note: before global `--ipcpath`
  was ignored even if it was set)

fixes ethersphere#795

* eth: increase timeout in TestBroadcastBlock (ethereum#18064)

* core: return error if repair block failed (ethereum#18126)

* core: return error if repair block failed

* make error a bit shorter

* config: add constantinople block to testchainconfig

* fix mixHash/nonce for parity compatible network (ethereum#18166)

* les: fix fetcher syncing logic (ethereum#18072)

* swarm/network/simulation: fix New function for-loop scope (ethereum#18161)

* swarm/api: improve not found error msg (ethereum#18171)

* light: odrTrie tryUpdate should use update (ethereum#18107)

TryUpdate does not call t.trie.TryUpdate(key, value) and calls t.trie.TryDelete
instead. The update operation simply deletes the corresponding entry, though
it could retrieve later by odr. However, it adds further network overhead.

* swarm/pss: Message handler refactor (ethereum#18169)

* tests: Add flag to use EVMC for state tests (ethereum#18084)

* Remove multihash from Swarm bzz:// for Feeds (ethereum#18175)

* Accounting metrics reporter (ethereum#18136)

* swarm/network: Correct neighborhood depth (ethereum#18066)

* cmd/swarm: update should error on manifest mismatch (ethereum#18047)

* cmd/swarm: fix ethersphere/swarm#979:

update should error on manifest mistmatch

* cmd/swarm: fixed comments and remove sprintf from log.Info

* cmd/swarm: remove unnecessary comment

* swarm: add database abstractions (shed package) (ethereum#18183)

* Increase bzz version (ethereum#18184)

* swarm/network/stream/: added stream protocol version match tests

* Increase BZZ version due to streamer version change; version tests

* swarm/network: increased hive and test protocol version

* p2p/protocols: fix minor comments typo (ethereum#18185)

* p2p/discv5: minor code simplification (ethereum#18188)

* Update net.go

more simple

* Update net.go

* p2p/discv5: gofmt

* core: more detailed metrics for block processing (ethereum#18119)

* eth/downloader: fix light client cht binary search issue

* params: update CHTs for the v1.8.19 release

* params, swarm: release Geth v1.8.19 and Swarm v0.3.7

* params, swarm: start Geth v1.8.20 and Swarm v0.3.8 release cycle

* remove unrelated code

* cmd/evm: commit statedb if dump is requested (ethereum#18208)

Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty.

* tests, core: update tests and make STATICCALL cause touch-delete (ethereum#18187)

* vendor: update leveldb

* remove a no-op line in the code (ethereum#17760)

* mobile: added constructor for BigInts (ethereum#17828)

* accounts/keystore: delete the redundant keystore in filename (ethereum#17930)

* accounts/keystore: reduce file name length

* accounts/keystore: reduce code line width

* cmd/utils: max out the OS file allowance, don't cap to 2K

* cmd/swarm: add flag for application name (swarm or swarm-private) (ethereum#18189)

* cmd/swarm: add flag for application name (swarm or swarm-private)

* cmd/swarm/swarm-smoke: return correct exit code

* cmd/swarm/swarm-smoke: remove colorable

* remove swarm/grafana_dashboards

* vendor: update github.com/karalabe/hid (ethereum#18213)

Fixes ethereum#15101 because hidapi is no longer being called from an
init function.

* p2p: use errors.New instead of fmt.Errorf (ethereum#18193)

* swarm/pss: Add same api interface for all Send* methods (ethereum#18218)

* signer/core: Fixes typo of method name in comment. (ethereum#18222)

* Changed http:// to https:// on JSON-RPC link (ethereum#18224)

Changed http:// to https:// on JSON-RPC link in README.md

* cmd/puppeth: enforce lowercase network names

* cmd/puppeth: implement chainspec converters

* whisperv6: remove duplicated code (ethereum#18015)

* cmd/puppeth: chain import/export via wizard, minor polishes

* Add packing for dynamic array and slice types (ethereum#18051)

* added tests for new abi encoding features (#4)

* added tests from bytes32[][] and string[]

* added offset to other types

* formatting

* Abi/dynamic types (#5)

* Revert "Abi/dynamic types (#5)" (#6)

This reverts commit dabca31.

* Abi/dynamic types (#7)

* some cleanup

* Apply suggestions from code review

apply suggestions

Co-Authored-By: vedhavyas <vedhavyas.singareddi@gmail.com>

* added better formatting (#8)

* review chnages

* better comments

* swarm/network/stream: Debug log instead of Warn for retrieval failure (ethereum#18246)

* swarm/api/http: add resetting timer metrics to requests (ethereum#18249)

* core, internal, eth, miner, les: Take VM config from BlockChain (ethereum#17955)

Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config`
would be taken so as to set some options, based on the default configuration. If some extra
configuration switches were passed to the blockchain, those would be ignored.

This PR adds a function to get the config from the blockchain, and this is what is now used
for RPC calls.

Some subsequent changes need to be made, see ethereum#17955 (review)
for the details of the discussion.

* swarm: snapshot load improvement (ethereum#18220)

* swarm/network: Hive - do not notify peer if discovery is disabled

* p2p/simulations: validate all connections on loading a snapshot

* p2p/simulations: track all connections in on snapshot loading

* p2p/simulations: add snapshotLoadTimeout variable

* p2p/simulations: ignore control events in snapshot load

* p2p/simulations: simplify event loop synchronization

* p2p/simulations: return already connected error from Load function

* p2p/simulations: log warning on snapshot loading disconnection

* node: warn when using deprecated config/resource files (ethereum#18199)

* cmd/puppeth: fix rogue quote in alethGenesisSpec JSON (ethereum#18262)

* eth/tracers: fixed incorrect storage from prestate_tracer (ethereum#18253)

* eth: fixed incorrect storage from prestate_tracer

* eth/tracers: updated assets.go

* params: set mainnet and Rinkeby Constantinople fork blocks

* cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local filesystem

* eth, internal/web3ext: tiny polishes in tracers

* light: fix duplicated argument in bytes.Equal call

Most probably a copy/paste kind of error.
Found with gocritic `dupArg` checker.

* ethereum: fix typo in interfaces.go (ethereum#18266)

* Fix typo in interfaces.go

* Update interfaces.go

* cmd, eth: Add support for `--whitelist <blocknum>=<hash>,...` flag

* Rejects peers that respond with a different hash for any of the passed in block numbers.
* Meant for emergency situations when the network forks unexpectedly.

* cmd/utils, eth: minor polishes on whitelist code

* params: update CHTs for the 1.8.20 release

* swarm/network: Correct ambiguity in compared addresses (ethereum#18251)

* cmd/swarm, metrics, swarm/api/client, swarm/storage, swarm/metrics, swarm/api/http: add instrumentation (ethereum#18274)

* cmd/faucet: fix faucet static peer regression

* cmd/puppeth: support latest docker compose, expose faucet UDP

* cmd/geth, core, eth: implement Constantinople override flag (ethereum#18273)

* geth/core/eth: implement constantinople override flag

* les: implemnent constantinople override flag for les clients

* cmd/geth, eth, les: fix typo, move flag to experimentals

* params, swarm: release Geth v1.8.20 and Swarm v0.3.8

* params, swarm: begin Geth v1.9.0 family, Swarm v0.3.9 cycle

* swarm/shed: add metrics to each shed db (ethereum#18277)

* swarm/shed: add metrics to each shed db

* swarm/shed: push metrics prefix up

* swarm/shed: rename prefix to metricsPrefix

* swarm/shed: unexport Meter, remove Mutex for quit channel

* swarm/storage: simplify ChunkValidator interface (ethereum#18285)

* usbwallet: check returned error when decoding hexstr (ethereum#18056)

* usbwallet: check returned error when decoding hexstr

* Update accounts/usbwallet/ledger.go

Co-Authored-By: CoreyLin <514971757@qq.com>

* usbwallet: check hex decode error

* crypto/secp256k1: Fix invalid document link (ethereum#18297)

* accounts/abi: argument type and name were reversed (ethereum#17947)

argument type and name were reversed

* rpc: add application/json-rpc as accepted content type, fixes ethereum#18293 (ethereum#18310)

* Comment error (ethereum#18303)

* Change issue labels in bot configs to the new prefixed version

* core/state: rename 'new' variable (ethereum#18301)

* p2p/discv5: don't hash findnode target in lookup against table (ethereum#18309)

* .github: add @gballet as abi codeowner (ethereum#18306)

* fix slice unpack bug in accounts/abi (ethereum#18321)

* fix slice unpack bug in accounts/abi

* swarm/storage/feed: remove unused code (ethereum#18324)

* p2p/simulation: move connection methods from swarm/network/simulation (ethereum#18323)

* Update visualized snapshot test (ethereum#18286)

* swarm/network/stream: fix visualized_snapshot_sync_sim_test

* swarm/network/stream: updated visualized snapshot-test;data in p2p event

* swarm/network/stream: cleanup visualized snapshot sync test

* swarm/network/stream: re-enable t.Skip for visualized test

* swarm/network/stream: addressed PR comments

* swarm/network/simulation:commented out unreachable code-avoid vet errors (ethereum#18263)

* swarm/pss: Reduce input vulnerabilities (ethereum#18304)

* swarm/storage: remove unused methods from Chunk interface (ethereum#18283)

* downloader: fix edgecase where returned index is OOB for downloader (ethereum#18335)

* downloader: fix edgecase where returned index is OOB for downloader

* downloader: documentation

Co-Authored-By: holiman <martin@swende.se>

* core: sanitize more TxPoolConfig fields (ethereum#17210)

* core: sanitize more TxPoolConfig fields

* core: fix TestTransactionPendingMinimumAllowance

* p2p/simulation: Test snapshot correctness and minimal benchmark (ethereum#18287)

* p2p/simulation: WIP minimal snapshot test

* p2p/simulation: Add snapshot create, load and verify to snapshot test

* build: add test tag for tests

* p2p/simulations, build: Revert travis change, build test sym always

* p2p/simulations: Add comments, timeout check on additional events

* p2p/simulation: Add benchmark template for minimal peer protocol init

* p2p/simulations: Remove unused code

* p2p/simulation: Correct timer reset

* p2p/simulations: Put snapshot check events in buffer and call blocking

* p2p/simulations: TestSnapshot fail if Load function returns early

* p2p/simulations: TestSnapshot wait for all connections before returning

* p2p/simulation: Revert to before wait for snap load (5e75594)

* p2p/simulations: add "conns after load" subtest to TestSnapshot

and nudge

* swarm/pss: forwarding function refactoring (ethereum#18353)

* eth/downloader: progress in stateSync not used anymore (ethereum#17998)

* p2p/protocols: accounting metrics rpc (ethereum#18336)

* p2p/protocols: accounting metrics rpc added (ethereum#847)

* p2p/protocols: accounting api documentation added (ethereum#847)

* p2p/protocols: accounting api doc updated (ethereum#847)

* p2p/protocols: accounting api doc update (ethereum#847)

* p2p/protocols: accounting api doc update (ethereum#847)

* p2p/protocols: fix file is not gofmted

* fix lint error

* updated comments after review

* add account balance to rpc

* naming changed after review

* swarm/network: Revised depth and health for Kademlia (ethereum#18354)

* swarm/network: Revised depth calculation with tests

* swarm/network: WIP remove redundant "full" function

* swarm/network: WIP peerpot refactor

* swarm/network: Make test methods submethod of peerpot and embed kad

* swarm/network: Remove commented out code

* swarm/network: Rename health test functions

* swarm/network: Too many n's

* swarm/network: Change hive Healthy func to accept addresses

* swarm/network: Add Healthy proxy method for api in hive

* swarm/network: Skip failing test out of scope for PR

* swarm/network: Skip all tests dependent on SuggestPeers

* swarm/network: Remove commented code and useless kad Pof member

* swarm/network: Remove more unused code, add counter on depth test errors

* swarm/network: WIP Create Healthy assertion tests

* swarm/network: Roll back health related methods receiver change

* swarm/network: Hardwire network minproxbinsize in swarm sim

* swarm/network: Rework Health test to strict

Pending add test for saturation
And add test for as many as possible up to saturation

* swarm/network: Skip discovery tests (dependent on SuggestPeer)

* swarm/network: Remove useless minProxBinSize in stream

* swarm/network: Remove unnecessary testing.T param to assert health

* swarm/network: Implement t.Helper() in checkHealth

* swarm/network: Rename check back to assert now that we have helper magic

* swarm/network: Revert WaitTillHealthy change (deferred to nxt PR)

* swarm/network: Kademlia tests GotNN => ConnectNN

* swarm/network: Renames and comments

* swarm/network: Add comments

* accounts/abi: add support for unpacking returned bytesN arrays (ethereum#15242)

* accounts/abi: Brings out the msg defined at require statement in SC function (ethereum#17328)

* swarm: remove unused/dead code (ethereum#18351)

* fix string array unpack bug in accounts/abi (ethereum#18364)

* core/types: update incorrect comment

* accounts/abi: change unpacking of abi fields w/ underscores (ethereum#16513)

* accounts/abi: fix name styling when unpacking abi fields w/ underscores

ABI fields with underscores that are being unpacked
into structs expect structs with following form:

int_one -> Int_one

whereas in abigen the generated structs are camelcased

int_one -> IntOne

so updated the unpack method to expect camelcased structs as well.

* accounts/abi: fix case of generated java functions (ethereum#18372)

* rpc: Warn the user when the path name is too long for the Unix ipc endpoint (ethereum#18330)

* swarm/storage: change Proximity function and add TestProximity test (ethereum#18379)

* build: add LGPL license at update-license.go (ethereum#18377)

* add LGPL licence at update-licence.go

* add empty line

* travis, appveyor: bump to Go 1.11.4 (ethereum#18314)

* travis, appveyor: bump to Go 1.11.4

* internal/build: revert comment changes

* accounts/abi/bind: add optional block number for calls (ethereum#17942)

* vendor: vendor/github.com/mattn/go-isatty - add missing files (reported by mksully22) (ethereum#18376)

* swarm/docker: Dockerfile for swarm:edge docker image (ethereum#18386)

* vendor, crypto, swarm: switch over to upstream sha3 package

* vendor: update the entire golang.org/x/crypto dependency

* cmd/puppeth: fix panic error when export aleth genesis wo/ precompile-addresses (ethereum#18344)

* cmd/puppeth: fix panic error when export aleth genesis wo/ precompile-addresses

* cmd/puppeth: don't need to handle duplicate set

* eth/tracer: extend create2 (ethereum#18318)

* eth/tracer: extend create2

* eth/tracers: fix create2-flaw in prestate_tracer

* eth/tracers: fix test

* eth/tracers: update assets

* accounts/keystore: fix comment typo (ethereum#18395)

* A few minor code inspection fixes (ethereum#18393)

* swarm/network: fix code inspection problems

- typos
- redundant import alias

* p2p/simulations: fix code inspection problems

- typos
- unused function parameters
- redundant import alias
- code style issue: snake case

* swarm/network: fix unused method parameters inspections

* accounts/keystore: small code simplification (ethereum#18394)

* internal/ethapi: ask transaction pool for pending nonce (ethereum#15794)

* cmd/geth: support dumpconfig optionally saving to file (ethereum#18327)

* Changed dumpConfig function to optionally save to file

* Added O_TRUNC flag to file open and cleaned up code

* swarm: Shed Index and Uint64Field additions (ethereum#18398)

* swarm/storage/mock/test: fix T.Fatal inside a goroutine (ethereum#18399)

* swarm, p2p/protocols: Stream accounting (ethereum#18337)

* swarm: completed 1st phase of swap accounting

* swarm, p2p/protocols: added stream pricing

* swarm/network/stream: gofmt simplify stream.go

* swarm: fixed review comments

* swarm: used snapshots for swap tests

* swarm: custom retrieve for swap (less cascaded requests at any one time)

* swarm: addressed PR comments

* swarm: log output formatting

* swarm: removed parallelism in swap tests

* swarm: swap tests simplification

* swarm: removed swap_test.go

* swarm/network/stream: added prefix space for comments

* swarm/network/stream: unit test for prices

* swarm/network/stream: don't hardcode price

* swarm/network/stream: fixed invalid price check

* github: remove swarm github codeowners (ethereum#18412)

* swarm: Fix T.Fatal inside a goroutine in tests (ethereum#18409)

* swarm/storage: fix T.Fatal inside a goroutine

* swarm/network/simulation: fix T.Fatal inside a goroutine

* swarm/network/stream: fix T.Fatal inside a goroutine

* swarm/network/simulation: consistent failures in TestPeerEventsTimeout

* swarm/network/simulation: rename sendRunSignal to triggerSimulationRun

* swarm/network: remove isproxbin bool from kad.Each* iterfunc (ethereum#18239)

* swarm/network, swarm/pss: remove isproxbin bool from kad.Each* iterfunc

* swarm/network: restore comment and unskip snapshot sync tests

* accounts/abi: tuple support (ethereum#18406)

* swarm/network: Rename minproxbinsize, add as member of simulation (ethereum#18408)

* swarm/network: Rename minproxbinsize, add as member of simulation

* swarm/network: Deactivate WaitTillHealthy, unreliable pending suggestpeer

* accounts/abi: Extra slice tests (ethereum#18424)

Co-authored-by: weimumu <934657014@qq.com>

* p2p/simulations: eliminate concept of pivot (ethereum#18426)

* core, eth: fix database version (ethereum#18429)

* core, eth: fix database version

* eth: polish error message

* Stream subscriptions (ethereum#18355)

* swarm/network: eachBin now starts at kaddepth for nn

* swarm/network: fix Kademlia.EachBin

* swarm/network: fix kademlia.EachBin

* swarm/network: correct EachBin implementation according to requirements

* swarm/network: less addresses simplified tests

* swarm: calc kad depth outside loop in EachBin test

* swarm/network: removed printResults

* swarm/network: cleanup imports

* swarm/network: remove kademlia.EachBin; fix RequestSubscriptions and add unit test

* swarm/network/stream: address PR comments

* swarm/network/stream: package-wide subscriptionFunc

* swarm/network/stream: refactor to kad.EachConn

* swarm/pot: pot.remove fixed (ethereum#18431)

* swarm/pot: refactored pot.remove(), updated comments

* swarm/pot: comments updated

* swarm/pot: each() functions refactored (ethereum#18452)

* accounts/abi: Add tests for reflection ahead of refactor (ethereum#18434)

* params: postpone Constantinople due to net SSTORE reentrancy

* params, swarm: release Geth v1.8.21 and Swarm v0.3.9

* core, cmd/puppeth: implement constantinople fix, disable EIP-1283 (ethereum#18486)

This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg,
but the genesis/config field is ConstantinopleFix.

The block numbers are:

    7280000 for Constantinople on Mainnet
    7280000 for ConstantinopleFix on Mainnet
    4939394 for ConstantinopleFix on Ropsten
    9999999 for ConstantinopleFix on Rinkeby (real number decided later)

This PR also defaults to using the same ConstantinopleFix number as whatever
Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix
is not set.This means that for private networks which have already transitioned
to Constantinople, this PR will break the network unless ConstantinopleFix is
explicitly set!

* travis, appveyor: bump to Go 1.11.5 (ethereum#18947)

* build: tweak debian source package build/upload options (ethereum#18962)

dput --passive should make repo pushes from Travis work again.
dput --no-upload-log works around an issue I had while uploading locally.

debuild -d says that debuild shouldn't check for build dependencies when
creating the source package. This option is needed to make builds work
in environments where the installed Go version doesn't match the
declared dependency in the source package.

* p2p/discover, p2p/enode: rework endpoint proof handling, packet logging (ethereum#18963)

This change resolves multiple issues around handling of endpoint proofs.
The proof is now done separately for each IP and completing the proof
requires a matching ping hash.

Also remove waitping because it's equivalent to sleep. waitping was
slightly more efficient, but that may cause issues with findnode if
packets are reordered and the remote end sees findnode before pong.

Logging of received packets was hitherto done after handling the packet,
which meant that sent replies were logged before the packet that
generated them. This change splits up packet handling into 'preverify'
and 'handle'. The error from 'preverify' is logged, but 'handle' happens
after the message is logged. This fixes the order. Packet logs now
contain the node ID.

* params: new CHTs (ethereum#18577)

* p2p/discover: improve table addition code (ethereum#18974)

This change clears up confusion around the two ways in which nodes
can be added to the table.

When a neighbors packet is received as a reply to findnode, the nodes
contained in the reply are added as 'seen' entries if sufficient space
is available.

When a ping is received and the endpoint verification has taken place,
the remote node is added as a 'verified' entry or moved to the front of
the bucket if present. This also updates the node's IP address and port
if they have changed.

* params, swarm/version: Geth 1.8.22-stable, Swarm 0.3.10-stable

* eth: make tracers respect pre- EIP 158/161 rule

* core: fix error in block iterator (ethereum#18986)

* cmd/puppeth: handle pre-set Petersburg number, save changed fork rules

* core: repro ethereum#18977

* core: fix pruner panic when importing low-diff-large-sidechain

* cmd, core, params: add support for Goerli

(cherry picked from commit b0ed083)

* build: use SFTP for launchpad uploads (ethereum#19037)

* build: use sftp for launchpad uploads

* .travis.yml: configure sftp export

* build: update CI docs

(cherry picked from commit 3de19c8)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994 (ethereum#19035)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994

* common/fdlimit: fix Maximum-check to respect OPEN_MAX

* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()

* common/fdlimit: goimports

* common/fdlimit: check value after setting fdlimit

* common/fdlimit: make comment a bit more descriptive

* cmd/utils: make fdlimit happy path a bit cleaner

(cherry picked from commit f48da43)

* .travis.yml: fix upload destination (ethereum#19043)


(cherry picked from commit edf976e)

* build: avoid dput and upload with sftp directly (ethereum#19067)


(cherry picked from commit a8ddf7a)

* common/fdlimit: fix windows build (ethereum#19068)


(cherry picked from commit ba90a4a)

* vendor: update syscalls dependency

(cherry picked from commit dcc045f)

* vendor: pull in upstream syscall fixes for non-linux/arm64

(cherry picked from commit 9d3ea8d)

* trie: fix error in node decoding (ethereum#19111)

* vendor: update bigcache

(cherry picked from commit 37e5a90)

* travis.yml: add launchpad SSH public key (ethereum#19115)


(cherry picked from commit 75a9314)

* build: explicitly force .xz compression (old debuild picks gzip) (ethereum#19118)


(cherry picked from commit c0b9c76)

* swarm/network: fix data race in TestNetworkID test (ethereum#18460)

(cherry picked from commit 96c7c18)

* swarm/storage: fix mockNetFetcher data races (ethereum#18462)

fixes: ethersphere/swarm#1117
(cherry picked from commit f728837)

* cmd/swarm/swarm-snapshot: swarm snapshot generator (ethereum#18453)

* cmd/swarm/swarm-snapshot: add binary to create network snapshots

* cmd/swarm/swarm-snapshot: refactor and extend tests

* p2p/simulations: remove unused triggerChecks func and fix linter

* internal/cmdtest: raise the timeout for killing TestCmd

* cmd/swarm/swarm-snapshot: add more comments and other minor adjustments

* cmd/swarm/swarm-snapshot: remove redundant check in createSnapshot

* cmd/swarm/swarm-snapshot: change comment wording

* p2p/simulations: revert Simulation.Run from master

https://github.com/ethersphere/go-ethereum/pull/1077/files#r247078904

* cmd/swarm/swarm-snapshot: address pr comments

* swarm/network/simulations/discovery: removed snapshot write to file

* cmd/swarm/swarm-snapshot, swarm/network/simulations: removed redundant connection event check, fixed lint error

(cherry picked from commit 34f11e7)

* swarm/network: rewrite of peer suggestion engine, fix skipped tests (ethereum#18404)

* swarm/network: fix skipped tests related to suggestPeer

* swarm/network: rename depth to radius

* swarm/network: uncomment assertHealth and improve comments

* swarm/network: remove commented code

* swarm/network: kademlia suggestPeer algo correction

* swarm/network: kademlia suggest peer

 * simplify suggest Peer code
 * improve peer suggestion algo
 * add comments
 * kademlia testing improvements
   * assertHealth -> checkHealth (test helper)
   * testSuggestPeer -> checkSuggestPeer (test helper)
   * remove testSuggestPeerBug and TestKademliaCase

* swarm/network: kademlia suggestPeer cleanup, improved comments

* swarm/network: minor comment, discovery test default arg

(cherry picked from commit bcb2594)

* swarm/network: fix data race warning on TestBzzHandshakeLightNode (ethereum#18459)

(cherry picked from commit 81e26d5)

* Upload speed (ethereum#18442)

(cherry picked from commit 257bfff)

* cmd/swarm/swarm-snapshot: disable tests on windows (ethereum#18478)

(cherry picked from commit 632135c)

* cmd/swarm: use resetting timer to measure fetch time (ethereum#18474)

(cherry picked from commit a0b0db6)

* cmd/swarm/swarm-smoke: use ResettingTimer instead of Counters for times (ethereum#18479)

(cherry picked from commit 5609577)

* p2p/simulations: fix data race on swarm/network/simulations (ethereum#18464)

(cherry picked from commit 85a79b3)

* swarm: bootnode-mode, new bootnodes and no p2p package discovery (ethereum#18498)

(cherry picked from commit bbd1203)

* swarm: fix a data race on startTime (ethereum#18511)

(cherry picked from commit fa34429)

* swarm/version: commit version added (ethereum#18510)

(cherry picked from commit ad13d2d)

* p2p/testing, swarm: remove unused testing.T in protocol tester (ethereum#18500)

(cherry picked from commit 2abeb35)

* swarm/network: Remove extra random peer, connect test sanity, comments (ethereum#18964)

(cherry picked from commit f9401ae)

* swarm: fix flaky delivery tests (ethereum#18971)

(cherry picked from commit 592bf6a)

* swarm/storage: Get all chunk references for a given file (ethereum#19002)

(cherry picked from commit 3eff652)

* cmd/swarm: hashes command (ethereum#19008)

(cherry picked from commit 7f55b0c)

* cmd/swarm/swarm-smoke: sliding window test (ethereum#18967)

(cherry picked from commit b91bf08)

* cmd/swarm/swarm-smoke: remove wrong metrics (ethereum#18970)

(cherry picked from commit c5c9cef)

* cmd/swarm/swarm-smoke: refactor generateEndpoints (ethereum#19006)

(cherry picked from commit d212535)

* swarm: Debug API and HasChunks() API endpoint (ethereum#18980)

(cherry picked from commit 41597c2)

* swarm/storage: fix test timeout with -race by increasing mget timeout

(cherry picked from commit 1c3aa8d)

* swarm/pss: Remove pss service leak in test (ethereum#18992)

(cherry picked from commit 7c60d0a)

* swarm/storage/localstore: new localstore package (ethereum#19015)

(cherry picked from commit 4f3d22f)

* swarm/network: fix data race in fetcher_test.go (ethereum#18469)

(cherry picked from commit 19bfcbf)

* swarm/network, swarm/storage: Preserve opentracing contexts (ethereum#19022)

(cherry picked from commit 0c10d37)

* swarm/pss: transition to whisper v6 (ethereum#19023)

(cherry picked from commit cde02e0)

* swarm: GetPeerSubscriptions RPC (ethereum#18972)

(cherry picked from commit 43e1b7b)

* swarm/network: refactor simulation tests bootstrap (ethereum#18975)

(cherry picked from commit 597597e)

* cmd/swarm/global-store: global store cmd (ethereum#19014)

(cherry picked from commit 33d0a0e)

* swarm: CI race detector test adjustments (ethereum#19017)

(cherry picked from commit 27e3f96)

* swarm/docker: add global-store and split docker images (ethereum#19038)

(cherry picked from commit 6cb7d52)

* swarm/pss: mutex lifecycle fixed (ethereum#19045)

(cherry picked from commit b30109d)

* swarm/storage: fix HashExplore concurrency bug ethersphere#1211 (ethereum#19028)

* swarm/storage: fix HashExplore concurrency bug ethersphere#1211

*  swarm/storage: lock as value not pointer

* swarm/storage: wait for  to complete

* swarm/storage: fix linter problems

* swarm/storage: append to nil slice

(cherry picked from commit 3d22a46)

* swarm: fix uptime gauge update goroutine leak by introducing cleanup functions (ethereum#19040)

(cherry picked from commit d596bea)

* swarm: fix network/stream data races (ethereum#19051)

* swarm/network/stream: newStreamerTester cleanup only if err is nil

* swarm/network/stream: raise newStreamerTester waitForPeers timeout

* swarm/network/stream: fix data races in GetPeerSubscriptions

* swarm/storage: prevent data race on LDBStore.batchesC

ethersphere/swarm#1198 (comment)

* swarm/network/stream: fix TestGetSubscriptionsRPC data race

ethersphere/swarm#1198 (comment)

* swarm/network/stream: correctly use Simulation.Run callback

ethersphere/swarm#1198 (comment)

* swarm/network: protect addrCountC in Kademlia.AddrCountC function

ethersphere/swarm#1198 (comment)

* p2p/simulations: fix a deadlock calling getRandomNode with lock

ethersphere/swarm#1198 (comment)

* swarm/network/stream: terminate disconnect goruotines in tests

* swarm/network/stream: reduce memory consumption when testing data races

* swarm/network/stream: add watchDisconnections helper function

* swarm/network/stream: add concurrent counter for tests

* swarm/network/stream: rename race/norace test files and use const

* swarm/network/stream: remove watchSim and its panic

* swarm/network/stream: pass context in watchDisconnections

* swarm/network/stream: add concurrent safe bool for watchDisconnections

* swarm/storage: fix LDBStore.batchesC data race by not closing it

(cherry picked from commit 3fd6db2)

* swarm/storage/netstore: add fetcher cancellation on shutdown (ethereum#19049)

swarm/network/stream: remove netstore internal wg
swarm/network/stream: run individual tests with t.Run

(cherry picked from commit 3ee09ba)

* swarm/network: Saturation check for healthy networks (ethereum#19071)

* swarm/network: new saturation for  implementation

* swarm/network: re-added saturation func in Kademlia as it is used elsewhere

* swarm/network: saturation with higher MinBinSize

* swarm/network: PeersPerBin with depth check

* swarm/network: edited tests to pass new saturated check

* swarm/network: minor fix saturated check

* swarm/network/simulations/discovery: fixed renamed RPC call

* swarm/network: renamed to isSaturated and returns bool

* swarm/network: early depth check

(cherry picked from commit 2af2472)

* swarm/storage: fix influxdb gc metrics report (ethereum#19102)

(cherry picked from commit 5b8ae78)

* swarm/pss: refactoring (ethereum#19110)

* swarm/pss: split pss and keystore

* swarm/pss: moved whisper to keystore

* swarm/pss: goimports fixed

(cherry picked from commit 12ca3b1)

* p2p, swarm: fix node up races by granular locking (ethereum#18976)

* swarm/network: DRY out repeated giga comment

I not necessarily agree with the way we wait for event propagation.
But I truly disagree with having duplicated giga comments.

* p2p/simulations: encapsulate Node.Up field so we avoid data races

The Node.Up field was accessed concurrently without "proper" locking.
There was a lock on Network and that was used sometimes to access
the  field. Other times the locking was missed and we had
a data race.

For example: ethereum#18464
The case above was solved, but there were still intermittent/hard to
reproduce races. So let's solve the issue permanently.

resolves: ethersphere/swarm#1146

* p2p/simulations: fix unmarshal of simulations.Node

Making Node.Up field private in 13292ee
broke TestHTTPNetwork and TestHTTPSnapshot. Because the default
UnmarshalJSON does not handle unexported fields.

Important: The fix is partial and not proper to my taste. But I cut
scope as I think the fix may require a change to the current
serialization format. New ticket:
ethersphere/swarm#1177

* p2p/simulations: Add a sanity test case for Node.Config UnmarshalJSON

* p2p/simulations: revert back to defer Unlock() pattern for Network

It's a good patten to call `defer Unlock()` right after `Lock()` so
(new) error cases won't miss to unlock. Let's get back to that pattern.

The patten was abandoned in 85a79b3,
while fixing a data race. That data race does not exist anymore,
since the Node.Up field got hidden behind its own lock.

* p2p/simulations: consistent naming for test providers Node.UnmarshalJSON

* p2p/simulations: remove JSON annotation from private fields of Node

As unexported fields are not serialized.

* p2p/simulations: fix deadlock in Network.GetRandomDownNode()

Problem: GetRandomDownNode() locks -> getDownNodeIDs() ->
GetNodes() tries to lock -> deadlock

On Network type, unexported functions must assume that `net.lock`
is already acquired and should not call exported functions which
might try to lock again.

* p2p/simulations: ensure method conformity for Network

Connect* methods were moved to p2p/simulations.Network from
swarm/network/simulation. However these new methods did not follow
the pattern of Network methods, i.e., all exported method locks
the whole Network either for read or write.

* p2p/simulations: fix deadlock during network shutdown

`TestDiscoveryPersistenceSimulationSimAdapter` often got into deadlock.
The execution was stuck on two locks, i.e, `Kademlia.lock` and
`p2p/simulations.Network.lock`. Usually the test got stuck once in each
20 executions with high confidence.

`Kademlia` was stuck in `Kademlia.EachAddr()` and `Network` in
`Network.Stop()`.

Solution: in `Network.Stop()` `net.lock` must be released before
calling `node.Stop()` as stopping a node (somehow - I did not find
the exact code path) causes `Network.InitConn()` to be called from
`Kademlia.SuggestPeer()` and that blocks on `net.lock`.

Related ticket: ethersphere/swarm#1223

* swarm/state: simplify if statement in DBStore.Put()

* p2p/simulations: remove faulty godoc from private function

The comment started with the wrong method name.

The method is simple and self explanatory. Also, it's private.
=> Let's just remove the comment.

(cherry picked from commit 50b872b)

* cmd/swarm/swarm-smoke: Trigger chunk debug on timeout (ethereum#19101)

* cmd/swarm/swarm-smoke: first version trigger has-chunks on timeout

* cmd/swarm/swarm-smoke: finalize trigger to chunk debug

* cmd/swarm/swarm-smoke: fixed httpEndpoint for trigger

* cmd/swarm/swarm-smoke: port

* cmd/swarm/swarm-smoke: ws not rpc

* cmd/swarm/swarm-smoke: added debug output

* cmd/swarm/swarm-smoke: addressed PR comments

* cmd/swarm/swarm-smoke: renamed track-timeout and track-chunks

(cherry picked from commit 62d7688)

* contracts/*: golint updates for this or self warning

(cherry picked from commit 53b823a)

* swarm: Reinstate Pss Protocol add call through swarm service (ethereum#19117)

* swarm: Reinstate Pss Protocol add call through swarm service

* swarm: Even less self

(cherry picked from commit d88c6ce)

* swarm/metrics: Send the accounting registry to InfluxDB (ethereum#18470)

(cherry picked from commit f28da4f)

* cmd/utils: allow for multiple influxdb tags (ethereum#18520)

This PR is replacing the metrics.influxdb.host.tag cmd-line flag with metrics.influxdb.tags - a comma-separated key/value tags, that are passed to the InfluxDB reporter, so that we can index measurements with multiple tags, and not just one host tag.

This will be useful for Swarm, where we want to index measurements not just with the host tag, but also with bzzkey and git commit version (for long-running deployments).

(cherry picked from commit 21acf0b)

* params, swarm: release Geth v1.8.23, Swarm v0.3.11

* light, params: update CHTs, integrate CHT for Goerli too

* common/fdlimit: fix macos file descriptors for Go 1.12

* all: simplify timestamps to uint64 (ethereum#19372)

* all: simplify timestamps to uint64

* tests: update definitions

* clef, faucet, mobile: leftover uint64 fixups

* ethash: fix tests

* graphql: update schema for timestamp

* ethash: remove unused variable

* trie: there's no point in retrieving the metaroot

* travis: update builders to xenial to shadow Go releases

* core: re-omit new log event when logs rebirth

* core: minor code polishes + rebase fixes

* params: set Rinkeby Petersburg fork block (4th May, 2019)

* p2p/discover: bump failure counter only if no nodes were provided (ethereum#19362)

This resolves a minor issue where neighbors responses containing less
than 16 nodes would bump the failure counter, removing the node. One
situation where this can happen is a private deployment where the total
number of extant nodes is less than 16.

Issue found by @Jsying.

* eth, les, geth: implement cli-configurable global gas cap for RPC calls (ethereum#19401)

* eth, les, geth: implement cli-configurable global gas cap for RPC calls

* graphql, ethapi: place gas cap in DoCall

* ethapi: reformat log message

* params, swarm: release Geth v1.8.24 (noop Swarm 0.3.12)

* cmd/geth: fix accidental --rpccorsdomain and --rpcvhosts removal

* params, swarm: hotfix Geth v1.8.25 release to restore rpc flags

* les: backported new SendTx cost calculation

* les: check required message types in cost table

* params, swarm: release Geth v1.8.26 (+noop Swarm v0.3.14)

* eth, les, light: enforce CHT checkpoints on fast-sync too

* params, swarm: release Geth v1.8.27 (noop Swarm v0.3.15)

* forward to 1.8.27
TuitionCoin added a commit to FinTechToken/go-ethereum that referenced this issue Jun 16, 2019
* trie: fix overflow in write cache parent tracking (ethereum#18165)

trie/database: fix overflow in parent tracking

* travis: increase open file limits (ethereum#18155)

* cmd/swarm: FUSE do not require --ipcpath (ethereum#18112)

- Have `${DataDir}/bzzd.ipc` as IPC path default.
- Respect the `--datadir` flag.
- Keep only the global `--ipcpath` flag and drop the local `--ipcpath` flag
  as flags might overwrite each other. (Note: before global `--ipcpath`
  was ignored even if it was set)

fixes ethersphere#795

* eth: increase timeout in TestBroadcastBlock (ethereum#18064)

* core: return error if repair block failed (ethereum#18126)

* core: return error if repair block failed

* make error a bit shorter

* config: add constantinople block to testchainconfig

* fix mixHash/nonce for parity compatible network (ethereum#18166)

* les: fix fetcher syncing logic (ethereum#18072)

* swarm/network/simulation: fix New function for-loop scope (ethereum#18161)

* swarm/api: improve not found error msg (ethereum#18171)

* light: odrTrie tryUpdate should use update (ethereum#18107)

TryUpdate does not call t.trie.TryUpdate(key, value) and calls t.trie.TryDelete
instead. The update operation simply deletes the corresponding entry, though
it could retrieve later by odr. However, it adds further network overhead.

* swarm/pss: Message handler refactor (ethereum#18169)

* tests: Add flag to use EVMC for state tests (ethereum#18084)

* Remove multihash from Swarm bzz:// for Feeds (ethereum#18175)

* Accounting metrics reporter (ethereum#18136)

* swarm/network: Correct neighborhood depth (ethereum#18066)

* cmd/swarm: update should error on manifest mismatch (ethereum#18047)

* cmd/swarm: fix ethersphere/swarm#979:

update should error on manifest mistmatch

* cmd/swarm: fixed comments and remove sprintf from log.Info

* cmd/swarm: remove unnecessary comment

* swarm: add database abstractions (shed package) (ethereum#18183)

* Increase bzz version (ethereum#18184)

* swarm/network/stream/: added stream protocol version match tests

* Increase BZZ version due to streamer version change; version tests

* swarm/network: increased hive and test protocol version

* p2p/protocols: fix minor comments typo (ethereum#18185)

* p2p/discv5: minor code simplification (ethereum#18188)

* Update net.go

more simple

* Update net.go

* p2p/discv5: gofmt

* core: more detailed metrics for block processing (ethereum#18119)

* eth/downloader: fix light client cht binary search issue

* params: update CHTs for the v1.8.19 release

* params, swarm: release Geth v1.8.19 and Swarm v0.3.7

* params, swarm: start Geth v1.8.20 and Swarm v0.3.8 release cycle

* remove unrelated code

* cmd/evm: commit statedb if dump is requested (ethereum#18208)

Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty.

* tests, core: update tests and make STATICCALL cause touch-delete (ethereum#18187)

* vendor: update leveldb

* remove a no-op line in the code (ethereum#17760)

* mobile: added constructor for BigInts (ethereum#17828)

* accounts/keystore: delete the redundant keystore in filename (ethereum#17930)

* accounts/keystore: reduce file name length

* accounts/keystore: reduce code line width

* cmd/utils: max out the OS file allowance, don't cap to 2K

* cmd/swarm: add flag for application name (swarm or swarm-private) (ethereum#18189)

* cmd/swarm: add flag for application name (swarm or swarm-private)

* cmd/swarm/swarm-smoke: return correct exit code

* cmd/swarm/swarm-smoke: remove colorable

* remove swarm/grafana_dashboards

* vendor: update github.com/karalabe/hid (ethereum#18213)

Fixes ethereum#15101 because hidapi is no longer being called from an
init function.

* p2p: use errors.New instead of fmt.Errorf (ethereum#18193)

* swarm/pss: Add same api interface for all Send* methods (ethereum#18218)

* signer/core: Fixes typo of method name in comment. (ethereum#18222)

* Changed http:// to https:// on JSON-RPC link (ethereum#18224)

Changed http:// to https:// on JSON-RPC link in README.md

* cmd/puppeth: enforce lowercase network names

* cmd/puppeth: implement chainspec converters

* whisperv6: remove duplicated code (ethereum#18015)

* cmd/puppeth: chain import/export via wizard, minor polishes

* Add packing for dynamic array and slice types (ethereum#18051)

* added tests for new abi encoding features (#4)

* added tests from bytes32[][] and string[]

* added offset to other types

* formatting

* Abi/dynamic types (#5)

* Revert "Abi/dynamic types (#5)" (#6)

This reverts commit dabca31.

* Abi/dynamic types (#7)

* some cleanup

* Apply suggestions from code review

apply suggestions

Co-Authored-By: vedhavyas <vedhavyas.singareddi@gmail.com>

* added better formatting (#8)

* review chnages

* better comments

* swarm/network/stream: Debug log instead of Warn for retrieval failure (ethereum#18246)

* swarm/api/http: add resetting timer metrics to requests (ethereum#18249)

* core, internal, eth, miner, les: Take VM config from BlockChain (ethereum#17955)

Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config`
would be taken so as to set some options, based on the default configuration. If some extra
configuration switches were passed to the blockchain, those would be ignored.

This PR adds a function to get the config from the blockchain, and this is what is now used
for RPC calls.

Some subsequent changes need to be made, see ethereum#17955 (review)
for the details of the discussion.

* swarm: snapshot load improvement (ethereum#18220)

* swarm/network: Hive - do not notify peer if discovery is disabled

* p2p/simulations: validate all connections on loading a snapshot

* p2p/simulations: track all connections in on snapshot loading

* p2p/simulations: add snapshotLoadTimeout variable

* p2p/simulations: ignore control events in snapshot load

* p2p/simulations: simplify event loop synchronization

* p2p/simulations: return already connected error from Load function

* p2p/simulations: log warning on snapshot loading disconnection

* node: warn when using deprecated config/resource files (ethereum#18199)

* cmd/puppeth: fix rogue quote in alethGenesisSpec JSON (ethereum#18262)

* eth/tracers: fixed incorrect storage from prestate_tracer (ethereum#18253)

* eth: fixed incorrect storage from prestate_tracer

* eth/tracers: updated assets.go

* params: set mainnet and Rinkeby Constantinople fork blocks

* cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local filesystem

* eth, internal/web3ext: tiny polishes in tracers

* light: fix duplicated argument in bytes.Equal call

Most probably a copy/paste kind of error.
Found with gocritic `dupArg` checker.

* ethereum: fix typo in interfaces.go (ethereum#18266)

* Fix typo in interfaces.go

* Update interfaces.go

* cmd, eth: Add support for `--whitelist <blocknum>=<hash>,...` flag

* Rejects peers that respond with a different hash for any of the passed in block numbers.
* Meant for emergency situations when the network forks unexpectedly.

* cmd/utils, eth: minor polishes on whitelist code

* params: update CHTs for the 1.8.20 release

* swarm/network: Correct ambiguity in compared addresses (ethereum#18251)

* cmd/swarm, metrics, swarm/api/client, swarm/storage, swarm/metrics, swarm/api/http: add instrumentation (ethereum#18274)

* cmd/faucet: fix faucet static peer regression

* cmd/puppeth: support latest docker compose, expose faucet UDP

* cmd/geth, core, eth: implement Constantinople override flag (ethereum#18273)

* geth/core/eth: implement constantinople override flag

* les: implemnent constantinople override flag for les clients

* cmd/geth, eth, les: fix typo, move flag to experimentals

* params, swarm: release Geth v1.8.20 and Swarm v0.3.8

* params, swarm: begin Geth v1.9.0 family, Swarm v0.3.9 cycle

* swarm/shed: add metrics to each shed db (ethereum#18277)

* swarm/shed: add metrics to each shed db

* swarm/shed: push metrics prefix up

* swarm/shed: rename prefix to metricsPrefix

* swarm/shed: unexport Meter, remove Mutex for quit channel

* swarm/storage: simplify ChunkValidator interface (ethereum#18285)

* usbwallet: check returned error when decoding hexstr (ethereum#18056)

* usbwallet: check returned error when decoding hexstr

* Update accounts/usbwallet/ledger.go

Co-Authored-By: CoreyLin <514971757@qq.com>

* usbwallet: check hex decode error

* crypto/secp256k1: Fix invalid document link (ethereum#18297)

* accounts/abi: argument type and name were reversed (ethereum#17947)

argument type and name were reversed

* rpc: add application/json-rpc as accepted content type, fixes ethereum#18293 (ethereum#18310)

* Comment error (ethereum#18303)

* Change issue labels in bot configs to the new prefixed version

* core/state: rename 'new' variable (ethereum#18301)

* p2p/discv5: don't hash findnode target in lookup against table (ethereum#18309)

* .github: add @gballet as abi codeowner (ethereum#18306)

* fix slice unpack bug in accounts/abi (ethereum#18321)

* fix slice unpack bug in accounts/abi

* swarm/storage/feed: remove unused code (ethereum#18324)

* p2p/simulation: move connection methods from swarm/network/simulation (ethereum#18323)

* Update visualized snapshot test (ethereum#18286)

* swarm/network/stream: fix visualized_snapshot_sync_sim_test

* swarm/network/stream: updated visualized snapshot-test;data in p2p event

* swarm/network/stream: cleanup visualized snapshot sync test

* swarm/network/stream: re-enable t.Skip for visualized test

* swarm/network/stream: addressed PR comments

* swarm/network/simulation:commented out unreachable code-avoid vet errors (ethereum#18263)

* swarm/pss: Reduce input vulnerabilities (ethereum#18304)

* swarm/storage: remove unused methods from Chunk interface (ethereum#18283)

* downloader: fix edgecase where returned index is OOB for downloader (ethereum#18335)

* downloader: fix edgecase where returned index is OOB for downloader

* downloader: documentation

Co-Authored-By: holiman <martin@swende.se>

* core: sanitize more TxPoolConfig fields (ethereum#17210)

* core: sanitize more TxPoolConfig fields

* core: fix TestTransactionPendingMinimumAllowance

* p2p/simulation: Test snapshot correctness and minimal benchmark (ethereum#18287)

* p2p/simulation: WIP minimal snapshot test

* p2p/simulation: Add snapshot create, load and verify to snapshot test

* build: add test tag for tests

* p2p/simulations, build: Revert travis change, build test sym always

* p2p/simulations: Add comments, timeout check on additional events

* p2p/simulation: Add benchmark template for minimal peer protocol init

* p2p/simulations: Remove unused code

* p2p/simulation: Correct timer reset

* p2p/simulations: Put snapshot check events in buffer and call blocking

* p2p/simulations: TestSnapshot fail if Load function returns early

* p2p/simulations: TestSnapshot wait for all connections before returning

* p2p/simulation: Revert to before wait for snap load (5e75594)

* p2p/simulations: add "conns after load" subtest to TestSnapshot

and nudge

* swarm/pss: forwarding function refactoring (ethereum#18353)

* eth/downloader: progress in stateSync not used anymore (ethereum#17998)

* p2p/protocols: accounting metrics rpc (ethereum#18336)

* p2p/protocols: accounting metrics rpc added (ethereum#847)

* p2p/protocols: accounting api documentation added (ethereum#847)

* p2p/protocols: accounting api doc updated (ethereum#847)

* p2p/protocols: accounting api doc update (ethereum#847)

* p2p/protocols: accounting api doc update (ethereum#847)

* p2p/protocols: fix file is not gofmted

* fix lint error

* updated comments after review

* add account balance to rpc

* naming changed after review

* swarm/network: Revised depth and health for Kademlia (ethereum#18354)

* swarm/network: Revised depth calculation with tests

* swarm/network: WIP remove redundant "full" function

* swarm/network: WIP peerpot refactor

* swarm/network: Make test methods submethod of peerpot and embed kad

* swarm/network: Remove commented out code

* swarm/network: Rename health test functions

* swarm/network: Too many n's

* swarm/network: Change hive Healthy func to accept addresses

* swarm/network: Add Healthy proxy method for api in hive

* swarm/network: Skip failing test out of scope for PR

* swarm/network: Skip all tests dependent on SuggestPeers

* swarm/network: Remove commented code and useless kad Pof member

* swarm/network: Remove more unused code, add counter on depth test errors

* swarm/network: WIP Create Healthy assertion tests

* swarm/network: Roll back health related methods receiver change

* swarm/network: Hardwire network minproxbinsize in swarm sim

* swarm/network: Rework Health test to strict

Pending add test for saturation
And add test for as many as possible up to saturation

* swarm/network: Skip discovery tests (dependent on SuggestPeer)

* swarm/network: Remove useless minProxBinSize in stream

* swarm/network: Remove unnecessary testing.T param to assert health

* swarm/network: Implement t.Helper() in checkHealth

* swarm/network: Rename check back to assert now that we have helper magic

* swarm/network: Revert WaitTillHealthy change (deferred to nxt PR)

* swarm/network: Kademlia tests GotNN => ConnectNN

* swarm/network: Renames and comments

* swarm/network: Add comments

* accounts/abi: add support for unpacking returned bytesN arrays (ethereum#15242)

* accounts/abi: Brings out the msg defined at require statement in SC function (ethereum#17328)

* swarm: remove unused/dead code (ethereum#18351)

* fix string array unpack bug in accounts/abi (ethereum#18364)

* core/types: update incorrect comment

* accounts/abi: change unpacking of abi fields w/ underscores (ethereum#16513)

* accounts/abi: fix name styling when unpacking abi fields w/ underscores

ABI fields with underscores that are being unpacked
into structs expect structs with following form:

int_one -> Int_one

whereas in abigen the generated structs are camelcased

int_one -> IntOne

so updated the unpack method to expect camelcased structs as well.

* accounts/abi: fix case of generated java functions (ethereum#18372)

* rpc: Warn the user when the path name is too long for the Unix ipc endpoint (ethereum#18330)

* swarm/storage: change Proximity function and add TestProximity test (ethereum#18379)

* build: add LGPL license at update-license.go (ethereum#18377)

* add LGPL licence at update-licence.go

* add empty line

* travis, appveyor: bump to Go 1.11.4 (ethereum#18314)

* travis, appveyor: bump to Go 1.11.4

* internal/build: revert comment changes

* accounts/abi/bind: add optional block number for calls (ethereum#17942)

* vendor: vendor/github.com/mattn/go-isatty - add missing files (reported by mksully22) (ethereum#18376)

* swarm/docker: Dockerfile for swarm:edge docker image (ethereum#18386)

* vendor, crypto, swarm: switch over to upstream sha3 package

* vendor: update the entire golang.org/x/crypto dependency

* cmd/puppeth: fix panic error when export aleth genesis wo/ precompile-addresses (ethereum#18344)

* cmd/puppeth: fix panic error when export aleth genesis wo/ precompile-addresses

* cmd/puppeth: don't need to handle duplicate set

* eth/tracer: extend create2 (ethereum#18318)

* eth/tracer: extend create2

* eth/tracers: fix create2-flaw in prestate_tracer

* eth/tracers: fix test

* eth/tracers: update assets

* accounts/keystore: fix comment typo (ethereum#18395)

* A few minor code inspection fixes (ethereum#18393)

* swarm/network: fix code inspection problems

- typos
- redundant import alias

* p2p/simulations: fix code inspection problems

- typos
- unused function parameters
- redundant import alias
- code style issue: snake case

* swarm/network: fix unused method parameters inspections

* accounts/keystore: small code simplification (ethereum#18394)

* internal/ethapi: ask transaction pool for pending nonce (ethereum#15794)

* cmd/geth: support dumpconfig optionally saving to file (ethereum#18327)

* Changed dumpConfig function to optionally save to file

* Added O_TRUNC flag to file open and cleaned up code

* swarm: Shed Index and Uint64Field additions (ethereum#18398)

* swarm/storage/mock/test: fix T.Fatal inside a goroutine (ethereum#18399)

* swarm, p2p/protocols: Stream accounting (ethereum#18337)

* swarm: completed 1st phase of swap accounting

* swarm, p2p/protocols: added stream pricing

* swarm/network/stream: gofmt simplify stream.go

* swarm: fixed review comments

* swarm: used snapshots for swap tests

* swarm: custom retrieve for swap (less cascaded requests at any one time)

* swarm: addressed PR comments

* swarm: log output formatting

* swarm: removed parallelism in swap tests

* swarm: swap tests simplification

* swarm: removed swap_test.go

* swarm/network/stream: added prefix space for comments

* swarm/network/stream: unit test for prices

* swarm/network/stream: don't hardcode price

* swarm/network/stream: fixed invalid price check

* github: remove swarm github codeowners (ethereum#18412)

* swarm: Fix T.Fatal inside a goroutine in tests (ethereum#18409)

* swarm/storage: fix T.Fatal inside a goroutine

* swarm/network/simulation: fix T.Fatal inside a goroutine

* swarm/network/stream: fix T.Fatal inside a goroutine

* swarm/network/simulation: consistent failures in TestPeerEventsTimeout

* swarm/network/simulation: rename sendRunSignal to triggerSimulationRun

* swarm/network: remove isproxbin bool from kad.Each* iterfunc (ethereum#18239)

* swarm/network, swarm/pss: remove isproxbin bool from kad.Each* iterfunc

* swarm/network: restore comment and unskip snapshot sync tests

* accounts/abi: tuple support (ethereum#18406)

* swarm/network: Rename minproxbinsize, add as member of simulation (ethereum#18408)

* swarm/network: Rename minproxbinsize, add as member of simulation

* swarm/network: Deactivate WaitTillHealthy, unreliable pending suggestpeer

* accounts/abi: Extra slice tests (ethereum#18424)

Co-authored-by: weimumu <934657014@qq.com>

* p2p/simulations: eliminate concept of pivot (ethereum#18426)

* core, eth: fix database version (ethereum#18429)

* core, eth: fix database version

* eth: polish error message

* Stream subscriptions (ethereum#18355)

* swarm/network: eachBin now starts at kaddepth for nn

* swarm/network: fix Kademlia.EachBin

* swarm/network: fix kademlia.EachBin

* swarm/network: correct EachBin implementation according to requirements

* swarm/network: less addresses simplified tests

* swarm: calc kad depth outside loop in EachBin test

* swarm/network: removed printResults

* swarm/network: cleanup imports

* swarm/network: remove kademlia.EachBin; fix RequestSubscriptions and add unit test

* swarm/network/stream: address PR comments

* swarm/network/stream: package-wide subscriptionFunc

* swarm/network/stream: refactor to kad.EachConn

* swarm/pot: pot.remove fixed (ethereum#18431)

* swarm/pot: refactored pot.remove(), updated comments

* swarm/pot: comments updated

* swarm/pot: each() functions refactored (ethereum#18452)

* accounts/abi: Add tests for reflection ahead of refactor (ethereum#18434)

* params: postpone Constantinople due to net SSTORE reentrancy

* params, swarm: release Geth v1.8.21 and Swarm v0.3.9

* core, cmd/puppeth: implement constantinople fix, disable EIP-1283 (ethereum#18486)

This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg,
but the genesis/config field is ConstantinopleFix.

The block numbers are:

    7280000 for Constantinople on Mainnet
    7280000 for ConstantinopleFix on Mainnet
    4939394 for ConstantinopleFix on Ropsten
    9999999 for ConstantinopleFix on Rinkeby (real number decided later)

This PR also defaults to using the same ConstantinopleFix number as whatever
Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix
is not set.This means that for private networks which have already transitioned
to Constantinople, this PR will break the network unless ConstantinopleFix is
explicitly set!

* travis, appveyor: bump to Go 1.11.5 (ethereum#18947)

* build: tweak debian source package build/upload options (ethereum#18962)

dput --passive should make repo pushes from Travis work again.
dput --no-upload-log works around an issue I had while uploading locally.

debuild -d says that debuild shouldn't check for build dependencies when
creating the source package. This option is needed to make builds work
in environments where the installed Go version doesn't match the
declared dependency in the source package.

* p2p/discover, p2p/enode: rework endpoint proof handling, packet logging (ethereum#18963)

This change resolves multiple issues around handling of endpoint proofs.
The proof is now done separately for each IP and completing the proof
requires a matching ping hash.

Also remove waitping because it's equivalent to sleep. waitping was
slightly more efficient, but that may cause issues with findnode if
packets are reordered and the remote end sees findnode before pong.

Logging of received packets was hitherto done after handling the packet,
which meant that sent replies were logged before the packet that
generated them. This change splits up packet handling into 'preverify'
and 'handle'. The error from 'preverify' is logged, but 'handle' happens
after the message is logged. This fixes the order. Packet logs now
contain the node ID.

* params: new CHTs (ethereum#18577)

* p2p/discover: improve table addition code (ethereum#18974)

This change clears up confusion around the two ways in which nodes
can be added to the table.

When a neighbors packet is received as a reply to findnode, the nodes
contained in the reply are added as 'seen' entries if sufficient space
is available.

When a ping is received and the endpoint verification has taken place,
the remote node is added as a 'verified' entry or moved to the front of
the bucket if present. This also updates the node's IP address and port
if they have changed.

* params, swarm/version: Geth 1.8.22-stable, Swarm 0.3.10-stable

* eth: make tracers respect pre- EIP 158/161 rule

* core: fix error in block iterator (ethereum#18986)

* cmd/puppeth: handle pre-set Petersburg number, save changed fork rules

* core: repro ethereum#18977

* core: fix pruner panic when importing low-diff-large-sidechain

* cmd, core, params: add support for Goerli

(cherry picked from commit b0ed083)

* build: use SFTP for launchpad uploads (ethereum#19037)

* build: use sftp for launchpad uploads

* .travis.yml: configure sftp export

* build: update CI docs

(cherry picked from commit 3de19c8)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994 (ethereum#19035)

* common/fdlimit: cap on MacOS file limits, fixes ethereum#18994

* common/fdlimit: fix Maximum-check to respect OPEN_MAX

* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()

* common/fdlimit: goimports

* common/fdlimit: check value after setting fdlimit

* common/fdlimit: make comment a bit more descriptive

* cmd/utils: make fdlimit happy path a bit cleaner

(cherry picked from commit f48da43)

* .travis.yml: fix upload destination (ethereum#19043)


(cherry picked from commit edf976e)

* build: avoid dput and upload with sftp directly (ethereum#19067)


(cherry picked from commit a8ddf7a)

* common/fdlimit: fix windows build (ethereum#19068)


(cherry picked from commit ba90a4a)

* vendor: update syscalls dependency

(cherry picked from commit dcc045f)

* vendor: pull in upstream syscall fixes for non-linux/arm64

(cherry picked from commit 9d3ea8d)

* trie: fix error in node decoding (ethereum#19111)

* vendor: update bigcache

(cherry picked from commit 37e5a90)

* travis.yml: add launchpad SSH public key (ethereum#19115)


(cherry picked from commit 75a9314)

* build: explicitly force .xz compression (old debuild picks gzip) (ethereum#19118)


(cherry picked from commit c0b9c76)

* swarm/network: fix data race in TestNetworkID test (ethereum#18460)

(cherry picked from commit 96c7c18)

* swarm/storage: fix mockNetFetcher data races (ethereum#18462)

fixes: ethersphere/swarm#1117
(cherry picked from commit f728837)

* cmd/swarm/swarm-snapshot: swarm snapshot generator (ethereum#18453)

* cmd/swarm/swarm-snapshot: add binary to create network snapshots

* cmd/swarm/swarm-snapshot: refactor and extend tests

* p2p/simulations: remove unused triggerChecks func and fix linter

* internal/cmdtest: raise the timeout for killing TestCmd

* cmd/swarm/swarm-snapshot: add more comments and other minor adjustments

* cmd/swarm/swarm-snapshot: remove redundant check in createSnapshot

* cmd/swarm/swarm-snapshot: change comment wording

* p2p/simulations: revert Simulation.Run from master

https://github.com/ethersphere/go-ethereum/pull/1077/files#r247078904

* cmd/swarm/swarm-snapshot: address pr comments

* swarm/network/simulations/discovery: removed snapshot write to file

* cmd/swarm/swarm-snapshot, swarm/network/simulations: removed redundant connection event check, fixed lint error

(cherry picked from commit 34f11e7)

* swarm/network: rewrite of peer suggestion engine, fix skipped tests (ethereum#18404)

* swarm/network: fix skipped tests related to suggestPeer

* swarm/network: rename depth to radius

* swarm/network: uncomment assertHealth and improve comments

* swarm/network: remove commented code

* swarm/network: kademlia suggestPeer algo correction

* swarm/network: kademlia suggest peer

 * simplify suggest Peer code
 * improve peer suggestion algo
 * add comments
 * kademlia testing improvements
   * assertHealth -> checkHealth (test helper)
   * testSuggestPeer -> checkSuggestPeer (test helper)
   * remove testSuggestPeerBug and TestKademliaCase

* swarm/network: kademlia suggestPeer cleanup, improved comments

* swarm/network: minor comment, discovery test default arg

(cherry picked from commit bcb2594)

* swarm/network: fix data race warning on TestBzzHandshakeLightNode (ethereum#18459)

(cherry picked from commit 81e26d5)

* Upload speed (ethereum#18442)

(cherry picked from commit 257bfff)

* cmd/swarm/swarm-snapshot: disable tests on windows (ethereum#18478)

(cherry picked from commit 632135c)

* cmd/swarm: use resetting timer to measure fetch time (ethereum#18474)

(cherry picked from commit a0b0db6)

* cmd/swarm/swarm-smoke: use ResettingTimer instead of Counters for times (ethereum#18479)

(cherry picked from commit 5609577)

* p2p/simulations: fix data race on swarm/network/simulations (ethereum#18464)

(cherry picked from commit 85a79b3)

* swarm: bootnode-mode, new bootnodes and no p2p package discovery (ethereum#18498)

(cherry picked from commit bbd1203)

* swarm: fix a data race on startTime (ethereum#18511)

(cherry picked from commit fa34429)

* swarm/version: commit version added (ethereum#18510)

(cherry picked from commit ad13d2d)

* p2p/testing, swarm: remove unused testing.T in protocol tester (ethereum#18500)

(cherry picked from commit 2abeb35)

* swarm/network: Remove extra random peer, connect test sanity, comments (ethereum#18964)

(cherry picked from commit f9401ae)

* swarm: fix flaky delivery tests (ethereum#18971)

(cherry picked from commit 592bf6a)

* swarm/storage: Get all chunk references for a given file (ethereum#19002)

(cherry picked from commit 3eff652)

* cmd/swarm: hashes command (ethereum#19008)

(cherry picked from commit 7f55b0c)

* cmd/swarm/swarm-smoke: sliding window test (ethereum#18967)

(cherry picked from commit b91bf08)

* cmd/swarm/swarm-smoke: remove wrong metrics (ethereum#18970)

(cherry picked from commit c5c9cef)

* cmd/swarm/swarm-smoke: refactor generateEndpoints (ethereum#19006)

(cherry picked from commit d212535)

* swarm: Debug API and HasChunks() API endpoint (ethereum#18980)

(cherry picked from commit 41597c2)

* swarm/storage: fix test timeout with -race by increasing mget timeout

(cherry picked from commit 1c3aa8d)

* swarm/pss: Remove pss service leak in test (ethereum#18992)

(cherry picked from commit 7c60d0a)

* swarm/storage/localstore: new localstore package (ethereum#19015)

(cherry picked from commit 4f3d22f)

* swarm/network: fix data race in fetcher_test.go (ethereum#18469)

(cherry picked from commit 19bfcbf)

* swarm/network, swarm/storage: Preserve opentracing contexts (ethereum#19022)

(cherry picked from commit 0c10d37)

* swarm/pss: transition to whisper v6 (ethereum#19023)

(cherry picked from commit cde02e0)

* swarm: GetPeerSubscriptions RPC (ethereum#18972)

(cherry picked from commit 43e1b7b)

* swarm/network: refactor simulation tests bootstrap (ethereum#18975)

(cherry picked from commit 597597e)

* cmd/swarm/global-store: global store cmd (ethereum#19014)

(cherry picked from commit 33d0a0e)

* swarm: CI race detector test adjustments (ethereum#19017)

(cherry picked from commit 27e3f96)

* swarm/docker: add global-store and split docker images (ethereum#19038)

(cherry picked from commit 6cb7d52)

* swarm/pss: mutex lifecycle fixed (ethereum#19045)

(cherry picked from commit b30109d)

* swarm/storage: fix HashExplore concurrency bug ethersphere#1211 (ethereum#19028)

* swarm/storage: fix HashExplore concurrency bug ethersphere#1211

*  swarm/storage: lock as value not pointer

* swarm/storage: wait for  to complete

* swarm/storage: fix linter problems

* swarm/storage: append to nil slice

(cherry picked from commit 3d22a46)

* swarm: fix uptime gauge update goroutine leak by introducing cleanup functions (ethereum#19040)

(cherry picked from commit d596bea)

* swarm: fix network/stream data races (ethereum#19051)

* swarm/network/stream: newStreamerTester cleanup only if err is nil

* swarm/network/stream: raise newStreamerTester waitForPeers timeout

* swarm/network/stream: fix data races in GetPeerSubscriptions

* swarm/storage: prevent data race on LDBStore.batchesC

ethersphere/swarm#1198 (comment)

* swarm/network/stream: fix TestGetSubscriptionsRPC data race

ethersphere/swarm#1198 (comment)

* swarm/network/stream: correctly use Simulation.Run callback

ethersphere/swarm#1198 (comment)

* swarm/network: protect addrCountC in Kademlia.AddrCountC function

ethersphere/swarm#1198 (comment)

* p2p/simulations: fix a deadlock calling getRandomNode with lock

ethersphere/swarm#1198 (comment)

* swarm/network/stream: terminate disconnect goruotines in tests

* swarm/network/stream: reduce memory consumption when testing data races

* swarm/network/stream: add watchDisconnections helper function

* swarm/network/stream: add concurrent counter for tests

* swarm/network/stream: rename race/norace test files and use const

* swarm/network/stream: remove watchSim and its panic

* swarm/network/stream: pass context in watchDisconnections

* swarm/network/stream: add concurrent safe bool for watchDisconnections

* swarm/storage: fix LDBStore.batchesC data race by not closing it

(cherry picked from commit 3fd6db2)

* swarm/storage/netstore: add fetcher cancellation on shutdown (ethereum#19049)

swarm/network/stream: remove netstore internal wg
swarm/network/stream: run individual tests with t.Run

(cherry picked from commit 3ee09ba)

* swarm/network: Saturation check for healthy networks (ethereum#19071)

* swarm/network: new saturation for  implementation

* swarm/network: re-added saturation func in Kademlia as it is used elsewhere

* swarm/network: saturation with higher MinBinSize

* swarm/network: PeersPerBin with depth check

* swarm/network: edited tests to pass new saturated check

* swarm/network: minor fix saturated check

* swarm/network/simulations/discovery: fixed renamed RPC call

* swarm/network: renamed to isSaturated and returns bool

* swarm/network: early depth check

(cherry picked from commit 2af2472)

* swarm/storage: fix influxdb gc metrics report (ethereum#19102)

(cherry picked from commit 5b8ae78)

* swarm/pss: refactoring (ethereum#19110)

* swarm/pss: split pss and keystore

* swarm/pss: moved whisper to keystore

* swarm/pss: goimports fixed

(cherry picked from commit 12ca3b1)

* p2p, swarm: fix node up races by granular locking (ethereum#18976)

* swarm/network: DRY out repeated giga comment

I not necessarily agree with the way we wait for event propagation.
But I truly disagree with having duplicated giga comments.

* p2p/simulations: encapsulate Node.Up field so we avoid data races

The Node.Up field was accessed concurrently without "proper" locking.
There was a lock on Network and that was used sometimes to access
the  field. Other times the locking was missed and we had
a data race.

For example: ethereum#18464
The case above was solved, but there were still intermittent/hard to
reproduce races. So let's solve the issue permanently.

resolves: ethersphere/swarm#1146

* p2p/simulations: fix unmarshal of simulations.Node

Making Node.Up field private in 13292ee
broke TestHTTPNetwork and TestHTTPSnapshot. Because the default
UnmarshalJSON does not handle unexported fields.

Important: The fix is partial and not proper to my taste. But I cut
scope as I think the fix may require a change to the current
serialization format. New ticket:
ethersphere/swarm#1177

* p2p/simulations: Add a sanity test case for Node.Config UnmarshalJSON

* p2p/simulations: revert back to defer Unlock() pattern for Network

It's a good patten to call `defer Unlock()` right after `Lock()` so
(new) error cases won't miss to unlock. Let's get back to that pattern.

The patten was abandoned in 85a79b3,
while fixing a data race. That data race does not exist anymore,
since the Node.Up field got hidden behind its own lock.

* p2p/simulations: consistent naming for test providers Node.UnmarshalJSON

* p2p/simulations: remove JSON annotation from private fields of Node

As unexported fields are not serialized.

* p2p/simulations: fix deadlock in Network.GetRandomDownNode()

Problem: GetRandomDownNode() locks -> getDownNodeIDs() ->
GetNodes() tries to lock -> deadlock

On Network type, unexported functions must assume that `net.lock`
is already acquired and should not call exported functions which
might try to lock again.

* p2p/simulations: ensure method conformity for Network

Connect* methods were moved to p2p/simulations.Network from
swarm/network/simulation. However these new methods did not follow
the pattern of Network methods, i.e., all exported method locks
the whole Network either for read or write.

* p2p/simulations: fix deadlock during network shutdown

`TestDiscoveryPersistenceSimulationSimAdapter` often got into deadlock.
The execution was stuck on two locks, i.e, `Kademlia.lock` and
`p2p/simulations.Network.lock`. Usually the test got stuck once in each
20 executions with high confidence.

`Kademlia` was stuck in `Kademlia.EachAddr()` and `Network` in
`Network.Stop()`.

Solution: in `Network.Stop()` `net.lock` must be released before
calling `node.Stop()` as stopping a node (somehow - I did not find
the exact code path) causes `Network.InitConn()` to be called from
`Kademlia.SuggestPeer()` and that blocks on `net.lock`.

Related ticket: ethersphere/swarm#1223

* swarm/state: simplify if statement in DBStore.Put()

* p2p/simulations: remove faulty godoc from private function

The comment started with the wrong method name.

The method is simple and self explanatory. Also, it's private.
=> Let's just remove the comment.

(cherry picked from commit 50b872b)

* cmd/swarm/swarm-smoke: Trigger chunk debug on timeout (ethereum#19101)

* cmd/swarm/swarm-smoke: first version trigger has-chunks on timeout

* cmd/swarm/swarm-smoke: finalize trigger to chunk debug

* cmd/swarm/swarm-smoke: fixed httpEndpoint for trigger

* cmd/swarm/swarm-smoke: port

* cmd/swarm/swarm-smoke: ws not rpc

* cmd/swarm/swarm-smoke: added debug output

* cmd/swarm/swarm-smoke: addressed PR comments

* cmd/swarm/swarm-smoke: renamed track-timeout and track-chunks

(cherry picked from commit 62d7688)

* contracts/*: golint updates for this or self warning

(cherry picked from commit 53b823a)

* swarm: Reinstate Pss Protocol add call through swarm service (ethereum#19117)

* swarm: Reinstate Pss Protocol add call through swarm service

* swarm: Even less self

(cherry picked from commit d88c6ce)

* swarm/metrics: Send the accounting registry to InfluxDB (ethereum#18470)

(cherry picked from commit f28da4f)

* cmd/utils: allow for multiple influxdb tags (ethereum#18520)

This PR is replacing the metrics.influxdb.host.tag cmd-line flag with metrics.influxdb.tags - a comma-separated key/value tags, that are passed to the InfluxDB reporter, so that we can index measurements with multiple tags, and not just one host tag.

This will be useful for Swarm, where we want to index measurements not just with the host tag, but also with bzzkey and git commit version (for long-running deployments).

(cherry picked from commit 21acf0b)

* params, swarm: release Geth v1.8.23, Swarm v0.3.11

* light, params: update CHTs, integrate CHT for Goerli too

* common/fdlimit: fix macos file descriptors for Go 1.12

* all: simplify timestamps to uint64 (ethereum#19372)

* all: simplify timestamps to uint64

* tests: update definitions

* clef, faucet, mobile: leftover uint64 fixups

* ethash: fix tests

* graphql: update schema for timestamp

* ethash: remove unused variable

* trie: there's no point in retrieving the metaroot

* travis: update builders to xenial to shadow Go releases

* core: re-omit new log event when logs rebirth

* core: minor code polishes + rebase fixes

* params: set Rinkeby Petersburg fork block (4th May, 2019)

* p2p/discover: bump failure counter only if no nodes were provided (ethereum#19362)

This resolves a minor issue where neighbors responses containing less
than 16 nodes would bump the failure counter, removing the node. One
situation where this can happen is a private deployment where the total
number of extant nodes is less than 16.

Issue found by @Jsying.

* eth, les, geth: implement cli-configurable global gas cap for RPC calls (ethereum#19401)

* eth, les, geth: implement cli-configurable global gas cap for RPC calls

* graphql, ethapi: place gas cap in DoCall

* ethapi: reformat log message

* params, swarm: release Geth v1.8.24 (noop Swarm 0.3.12)

* cmd/geth: fix accidental --rpccorsdomain and --rpcvhosts removal

* params, swarm: hotfix Geth v1.8.25 release to restore rpc flags

* les: backported new SendTx cost calculation

* les: check required message types in cost table

* params, swarm: release Geth v1.8.26 (+noop Swarm v0.3.14)

* eth, les, light: enforce CHT checkpoints on fast-sync too

* params, swarm: release Geth v1.8.27 (noop Swarm v0.3.15)

* 1.8.27 with changes redone to compile

* fix compile

* runner update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants