Felix Lange
ca1d1cb08d
p2p/enode: avoid crashing for invalid IP ( #21981 )
...
The database panicked for invalid IPs. This is usually no problem
because all code paths leading to node DB access verify the IP, but it's
dangerous because improper validation can turn this panic into a DoS
vulnerability. The quick fix here is to just turn database accesses
using invalid IP into a noop. This isn't great, but I'm planning to
remove the node DB for discv5 long-term, so it should be fine to have
this quick fix for half a year.
Fixes #21849
2021-01-11 11:26:39 +08:00
Fuyang Deng
670009d1e1
accounts/abi: fix a bug in getTypeSize method ( #21501 )
...
* accounts/abi: fix a bug in getTypeSize method
e.g. for "Tuple[2]" type, the element of the array is a tuple type and the size of the tuple may not be 32.
* accounts/abi: add unit test of getTypeSize method
2021-01-11 11:26:29 +08:00
Felix Lange
4608da6c13
rpc: fix issue with null JSON-RPC messages ( #21497 )
2021-01-11 11:23:44 +08:00
Marius van der Wijden
d1f95d5fd3
internal/ethapi: fix nil deref + fix estimateGas console bindings ( #21601 )
...
* tried to fix
* fix for js api
* fix for nil pointer ex
* rev space
* rev space
* input call formatter
2021-01-11 11:23:18 +08:00
Martin Holst Swende
ad3ff6452d
core: fix txpool off-by-one error ( #21683 )
2021-01-11 11:22:52 +08:00
6543
0a64615f1e
signer/storage: fix a badly ordered error check ( #21379 )
2021-01-11 11:22:25 +08:00
Slava Karpenko
2a79ac1622
consensus/ethash: use 64bit indexes for the DAG generation ( #21793 )
...
* Bit boundary fix for the DAG generation routine
* Fix unnecessary conversion warnings
Co-authored-by: Sergey Pavlov <spavlov@gmail.com>
2021-01-11 11:20:54 +08:00
fudongbai
0e797c53b7
add x-forward-for message in log
2021-01-11 10:49:34 +08:00
zjubfd
3f3f8d02cf
Merge pull request #59 from binance-chain/issue_58
...
[R4R]fix potential deadlock of pub/sub module
2021-01-11 10:40:14 +08:00
fudongbai
5bd73320ba
add rpc method request gauge
2021-01-10 22:01:20 +08:00
gary rong
5a1b384352
core: persist bad blocks ( #21827 )
...
* core: persist bad blocks
* core, eth, internal: address comments
* core/rawdb: add badblocks to inspector
* core, eth: update
* internal: revert
* core, eth: only save 10 bad blocks
* core/rawdb: address comments
* core/rawdb: fix
* core: address comments
2021-01-10 12:54:15 +01:00
Chris Ziogas
89030ec0b4
eth/downloader: fix race condition in tests ( #22140 )
...
* downloader: fix race condition in tests
* eth/downloader: fix race condition in tests
* Revert "downloader: fix race condition in tests"
This reverts commit 108033ebc6985de83791d375b6e6647a77d28d5a.
2021-01-09 17:29:19 +01:00
Marius van der Wijden
889f5645b5
ethclient: better test suite for ethclient package ( #22127 )
...
This commit extends the ethclient test suite and increases code coverage of the ethclient
package from ~15% to >55%. These tests act as early smoke tests to signal issues in the
RPC-interface. E.g. if a functionality like eth_chainId or eth_call breaks, the test
will break.
2021-01-08 21:29:25 +01:00
Martin Holst Swende
6b88ab75bc
cmd/faucet: fix nonce-gap problem ( #22145 )
...
* cmd/faucet: avoid encoding for each client
* cmd/faucet: fix flaw in clearing of txs, avoid sending more than necessary
* cmd/faucet: fix flaw in tx cropping
* cmd/faucet: revert change to not always send tx info
* cmd/faucet: review fixes
* cmd/faucet: revert #22018 , fix order in UI
* cmd/faucet: fix lock error
* cmd/faucet: revert json changes
* squashme
2021-01-08 12:17:15 +02:00
zjubfd
894b1e3c8d
Merge pull request #54 from binance-chain/fixLess
...
[R4R]les: fix GetProofsV2 bug (#21896 )
2021-01-08 16:47:59 +08:00
gary rong
165f53fc6e
les: remove transaction propagation limits ( #22125 )
2021-01-07 23:39:35 +01:00
Péter Szilágyi
d3952898c3
Merge pull request #22137 from karalabe/faucet-fb-fix
...
cmd/faucet: switch Facebook auth over to mobile site
2021-01-07 18:45:27 +02:00
Péter Szilágyi
3c6665e7d6
cmd/faucet: switch Facebook auth over to mobile site
2021-01-07 18:14:44 +02:00
Martin Holst Swende
4bb5c6ca7a
eth/protocols/snap: speed up hash checks ( #22023 )
...
* eth/protocols/snap: speed up hash checks
* eth/protocols/snap: nit fix
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-01-07 18:12:41 +02:00
Péter Szilágyi
38310f9022
Merge pull request #22136 from karalabe/faucet-websocket-fix
...
cmd/faucet: fix websocket race regression after switching to gorilla
2021-01-07 12:58:42 +02:00
Martin Holst Swende
58b9db5f7c
eth/protocols/snap: track reverts when peer rejects request ( #22016 )
...
* eth/protocols/snap: reschedule missed deliveries
* eth/protocols/snap: clarify log message
* eth/protocols/snap: revert failures async and update runloop
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-01-07 12:58:07 +02:00
Péter Szilágyi
44208d9258
cmd/faucet: fix websocket race regression after switching to gorilla
2021-01-07 10:23:50 +02:00
Péter Szilágyi
8bd8e1b24a
Merge pull request #22122 from karalabe/snapshot-polishes
...
cmd/utils, eth/downloader: minor snap nitpicks
2021-01-07 09:12:20 +02:00
Melvin Junhee Woo
d2e1b17f18
snapshot, trie: fixed typos, mostly in snapshot pkg ( #22133 )
2021-01-07 08:36:21 +02:00
rene
072fd96254
graphql: return decimal for estimateGas
and cumulativeGas
queries ( #22126 )
...
* estimateGas, cumulativeGas
* linted
* add test for estimateGas
2021-01-06 17:19:16 +01:00
Marius van der Wijden
d667ee2d10
crypto: fix ineffectual assignments ( #22124 )
...
* crypto/bls12381: fixed ineffectual assignment
* crypto/signify: fix ineffectual assignment
2021-01-06 13:06:44 +02:00
Péter Szilágyi
83d317cff9
cmd/utils, eth/downloader: minor snap nitpicks
2021-01-06 08:37:45 +02:00
jk-jeongkyun
618454214b
eth/downloader: enhanced test cases for downloader queue ( #22114 )
2021-01-05 14:56:01 +01:00
Marius van der Wijden
9ba306d47e
common/compiler: fix parsing of solc output with solidity v.0.8.0 ( #22092 )
...
Solidity 0.8.0 changes the way that output is marshalled. This patch allows to parse both
the legacy format used previously and the new format.
See also https://docs.soliditylang.org/en/breaking/080-breaking-changes.html#interface-changes
2021-01-05 14:48:22 +01:00
Marius van der Wijden
4714ce9430
cmd/geth: added --mainnet flag ( #21932 )
...
* cmd/geth: added --mainnet flag
* cmd/utils: set default genesis if --mainnet is specified
* cmd/utils: addressed comments
2021-01-05 14:31:23 +01:00
Antoine Toulme
eb2a1dfdd2
graphql: use a decimal representation for gas limit and gas used ( #21883 )
...
This changes the JSON encoding of blocks returned by the API
to have decimal instead of hexadecimal numbers. The spec wants
it this way.
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-01-05 11:22:32 +01:00
Guillaume Ballet
664903dc88
cmd/geth: usb is off by default ( #21984 )
2021-01-05 11:18:22 +01:00
Martin Holst Swende
9584f56b9d
miner: avoid sleeping in miner ( #22108 )
...
This PR removes a logic in the miner, which was originally intended to help temporary testnets based on ethash from "running off into the future". If the difficulty was low, and a few computers started mining several blocks per second, the ethash rules (which demand 1s delay between blocks) would push the blocktimes further and further away.
The solution was to make the miner sleep while this happened.
Nowadays, this problem is solved instead by PoA chains, and it's recommended to let testnets and devnets be based on clique instead. The existing logic is problematic, since it can cause stalls within the miner making it difficult for remote workers to submit work if the channel is blocked on a sleep.
Credits to Saar Tochner for reporting this via the bug bounty
2021-01-05 10:44:33 +01:00
Péter Szilágyi
6ada9f0f38
Merge pull request #22107 from karalabe/faucet-twitter
...
cmd: support v1.1 Twitter API in faucet, fix puppeth
2021-01-05 10:27:33 +02:00
Péter Szilágyi
e4571d8c12
cmd: support v1.1 Twitter API in faucet, fix puppeth
2021-01-04 14:13:21 +02:00
Suriyaa Sundararuban
1951e20d10
SECURITY.md: link to release page ( #22067 )
...
Add links to go-ethereum's GitHub release page.
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-01-04 12:42:47 +01:00
rene
5c2a7ce2cc
node: rename startNetworking to openEndpoints ( #22105 )
2021-01-04 12:39:25 +01:00
Suriyaa Sundararuban
47820ef726
.github: Replace wiki links with new doc pages ( #22065 ) ( #22068 )
2021-01-04 11:58:51 +01:00
Vie
f83fc302a5
cmd/geth: update copyright year ( #22099 )
2021-01-04 11:52:23 +01:00
Melvin Junhee Woo
167ff563d1
core/state/snapshot: gethring -> gathering typo ( #22104 )
2021-01-04 10:07:43 +02:00
yumiel yoomee1313
0a3993c558
accounts/abi/bind: fix erroneous test ( #22053 )
...
closes #22049
2020-12-30 13:10:11 +01:00
fudongbai
3d3f9694a4
fix potential deadlock of pub/sub module
2020-12-30 15:13:11 +08:00
ucwong
a425a47ddc
core/rawdb, eth/protocols : Method name typo fix ( #22026 )
2020-12-27 22:38:16 +01:00
Suriyaa Sundararuban
c17a7733df
docs: replace wiki links with new doc pages in readme.md ( #22065 ) ( #22066 )
2020-12-27 22:28:08 +01:00
jk-jeongkyun
653e8b9dd9
eth/downloader: remove unnecessary condition ( #22052 )
2020-12-27 22:26:42 +01:00
Suriyaa Sundararuban
ab0979f930
signer: docs - replace wiki links with new doc pages ( #22069 )
2020-12-27 22:18:57 +01:00
Suriyaa Sundararuban
0a09a39325
eth/filters: replace wiki links with new doc pages ( #22070 )
2020-12-27 22:09:05 +01:00
Suriyaa Sundararuban
2f8100615a
cmd/geth: replace wiki links with new doc pages ( #22071 )
2020-12-27 22:01:28 +01:00
Martin Holst Swende
b13e9c4e3d
tests/fuzzers: fix false positive in bitutil fuzzer ( #22076 )
2020-12-27 21:58:39 +01:00
Sina Mahmoodi
9c6b5b904a
eth, eth/tracers: include intrinsic gas in calltracer, expose for all tracers ( #22038 )
...
* eth/tracers: share tx gas price with js tracer
* eth/tracers: use `go generate`
* eth/tracers: try with another version of go-bindata
* eth/tracers: export txGas
* eth, eth/tracers: pass intrinsic gas to js tracers
eth/tracers: include tx gas in tracers usedGas
eth/tracers: fix prestate tracer's sender balance
eth/tracers: rm unnecessary import
eth/tracers: pass intrinsicGas separately to tracer
eth/tracers: fix tests broken by lack of txdata
eth, eth/tracers: minor fix
* eth/tracers: regenerate assets + unexport test-struct + add testcase
* eth/tracers: simplify tests + make table-driven
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-12-27 21:57:19 +01:00