Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c4fff0f
params: update Ropsten CHT too
karalabe Nov 8, 2021
851256e
Merge pull request #23869 from karalabe/cht-1.10.12-ropsten
karalabe Nov 8, 2021
787a3b1
eth/tracers: make native calltracer default (#23867)
s1na Nov 8, 2021
6c4dc6c
params: release Geth v1.10.12
karalabe Nov 8, 2021
ad11691
params: begin v1.10.13 release cycle
karalabe Nov 8, 2021
9489853
core: check effective tip in txpool pricelimit validation (#23855)
fjl Nov 8, 2021
6b9c77f
eth/tracers: package restructuring (#23857)
holiman Nov 9, 2021
0efed7f
cmd/devp2p/internal/ethtest: clarify protocol version in tests (#23872)
holiman Nov 9, 2021
fb7da82
p2p: fix typo in v4wire.go
eltociear Nov 10, 2021
e185a8c
Merge pull request #23880 from eltociear/patch-3
karalabe Nov 10, 2021
f32feeb
core/vm: implement EIP-2681: Limit account nonce to 2^64-1 (#23853)
gumb0 Nov 11, 2021
c57df9c
core/rawdb: add slow path for getting legacy logs (#23879)
s1na Nov 11, 2021
5358e49
cmd/devp2p: update TTL max for Cloudflare (#23885)
meowsbits Nov 11, 2021
e9294a7
eth/tracers: add golang 4byte tracer (#23882)
wardbradt Nov 11, 2021
abc74a5
accounts/abi/bind/backends: fix race condition in simulated backend …
joshuacolvin0 Nov 12, 2021
b0b708b
cmd/evm: add `gasUsed` to t8n `result` (#23919)
lightclient Nov 16, 2021
05acc27
eth/tracers: make native 4byte default, remove js version (#23916)
s1na Nov 16, 2021
b7a6409
core/rawdb: better error message in freezer (#23901)
holiman Nov 16, 2021
33f2813
cmd/geth: add flag --dev.gaslimit for dev mode (#23686)
jessetane Nov 16, 2021
fa96718
cmd/evm: rename t8n result to match types.Header (ReceiptRoot->Receip…
lightclient Nov 17, 2021
16341e0
ethclient: fix tx sender cache miss detection (#23877)
PlasmaPower Nov 17, 2021
ab31fbb
core/vm: don't use iota for opcode definitions
holiman Nov 18, 2021
c52def7
eth/gasprice: sanitize max header and block history (#23886)
Nov 18, 2021
e761255
cmd/evm: make t9n intrinsicGas output hex, fixes #23883 (#23889)
holiman Nov 19, 2021
e076143
eth: fix typo in comment (#23941)
a2br Nov 22, 2021
6f2c3f2
cmd/geth: add ancient flag to db inspect (#23946)
lightclient Nov 22, 2021
5d4bcbc
trie: more tests for stacktrie (#23936)
chfast Nov 22, 2021
441c7f2
cmd/evm: add b11r tool (#23843)
lightclient Nov 22, 2021
d9c13d4
core, eth/downloader: fix resetting below freezer threshold
karalabe Nov 22, 2021
17f1c2d
Merge pull request #23949 from karalabe/fix-repair-heuristic
karalabe Nov 22, 2021
23f69c6
cmd/evm: add support for signing transactions in the unprotected form…
lightclient Nov 23, 2021
50e07a1
Merge pull request #23928 from holiman/no_iota
karalabe Nov 23, 2021
347c37b
core/rawdb: use AncientRange when initializing leveldb from freezer (…
holiman Nov 23, 2021
d15e423
p2p/enode: store local port number as uint16 (#23926)
jfcg Nov 23, 2021
743769f
trie: reject deletions when verifying range proofs
karalabe Nov 23, 2021
7322b25
Merge pull request #23960 from karalabe/verify-range-deletion
karalabe Nov 23, 2021
0a7672f
cmd/evm: rename t8n args to improve clarity when tracing (#23934)
lightclient Nov 24, 2021
7a0c19f
params: release Geth v1.10.13
karalabe Nov 24, 2021
8151dd6
params: begin v1.10.14 release cycle
karalabe Nov 24, 2021
66ee942
consensus/clique: fix block number unmarshal (#23961)
s1na Nov 24, 2021
10b1cd9
core/vm: use proper JumpTable type
chfast Nov 24, 2021
ad7c90c
cmd/devp2p/internal/v4test: fix false-positive hive test (#23966)
holiman Nov 24, 2021
9055cc1
core/vm, core/state/snapshot: remove unused code (#23956)
holiman Nov 25, 2021
1876cb4
all: move loggers to eth/tracers (#23892)
s1na Nov 25, 2021
4ebeca1
Merge pull request #23967 from ipsilon/evm_jumptable_type
karalabe Nov 25, 2021
519cf98
core/vm: simplify op lookup in contract (#23974)
gumb0 Nov 25, 2021
3038e48
all: core rework for the merge transition (#23761)
MariusVanDerWijden Nov 26, 2021
c10a0a6
eth: request id dispatcher and direct req/reply APIs (#23576)
karalabe Nov 26, 2021
ec98b1d
eth/catalyst: implement kintsugi spec v1.0.0-alpha.3
MariusVanDerWijden Nov 2, 2021
9795f76
eth/catalyst: fix nitpicks
MariusVanDerWijden Nov 30, 2021
a5df595
core/genesis.go: fix override
MariusVanDerWijden Nov 30, 2021
4598b2b
eth/catalyst: fixed nitpicks by holiman
MariusVanDerWijden Dec 2, 2021
c659403
eth/catalyst: happy linter happy life
MariusVanDerWijden Dec 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ func (b *SimulatedBackend) PendingNonceAt(ctx context.Context, account common.Ad
// SuggestGasPrice implements ContractTransactor.SuggestGasPrice. Since the simulated
// chain doesn't have miners, we just return a gas price of 1 for any call.
func (b *SimulatedBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error) {
b.mu.Lock()
defer b.mu.Unlock()

if b.pendingBlock.Header().BaseFee != nil {
return b.pendingBlock.Header().BaseFee, nil
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/devp2p/dns_cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
log.Info(fmt.Sprintf("Creating %s = %q", path, val))
ttl := rootTTL
if path != name {
ttl = treeNodeTTL // Max TTL permitted by Cloudflare
ttl = treeNodeTTLCloudflare // Max TTL permitted by Cloudflare

}
record := cloudflare.DNSRecord{Type: "TXT", Name: path, Content: val, TTL: ttl}
_, err = c.CreateDNSRecord(context.Background(), c.zoneID, record)
Expand Down
5 changes: 3 additions & 2 deletions cmd/devp2p/dnscmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ var (
)

const (
rootTTL = 30 * 60 // 30 min
treeNodeTTL = 4 * 7 * 24 * 60 * 60 // 4 weeks
rootTTL = 30 * 60 // 30 min
treeNodeTTL = 4 * 7 * 24 * 60 * 60 // 4 weeks
treeNodeTTLCloudflare = 24 * 60 * 60 // 1 day
)

// dnsSync performs dnsSyncCommand.
Expand Down
2 changes: 1 addition & 1 deletion cmd/devp2p/internal/ethtest/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (c *Conn) handshake() error {
}
c.negotiateEthProtocol(msg.Caps)
if c.negotiatedProtoVersion == 0 {
return fmt.Errorf("unexpected eth protocol version")
return fmt.Errorf("could not negotiate protocol (remote caps: %v, local eth version: %v)", msg.Caps, c.ourHighestProtoVersion)
}
return nil
default:
Expand Down
88 changes: 44 additions & 44 deletions cmd/devp2p/internal/ethtest/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,35 @@ func NewSuite(dest *enode.Node, chainfile string, genesisfile string) (*Suite, e
func (s *Suite) AllEthTests() []utesting.Test {
return []utesting.Test{
// status
{Name: "TestStatus", Fn: s.TestStatus},
{Name: "TestStatus65", Fn: s.TestStatus65},
{Name: "TestStatus66", Fn: s.TestStatus66},
// get block headers
{Name: "TestGetBlockHeaders", Fn: s.TestGetBlockHeaders},
{Name: "TestGetBlockHeaders65", Fn: s.TestGetBlockHeaders65},
{Name: "TestGetBlockHeaders66", Fn: s.TestGetBlockHeaders66},
{Name: "TestSimultaneousRequests66", Fn: s.TestSimultaneousRequests66},
{Name: "TestSameRequestID66", Fn: s.TestSameRequestID66},
{Name: "TestZeroRequestID66", Fn: s.TestZeroRequestID66},
// get block bodies
{Name: "TestGetBlockBodies", Fn: s.TestGetBlockBodies},
{Name: "TestGetBlockBodies65", Fn: s.TestGetBlockBodies65},
{Name: "TestGetBlockBodies66", Fn: s.TestGetBlockBodies66},
// broadcast
{Name: "TestBroadcast", Fn: s.TestBroadcast},
{Name: "TestBroadcast65", Fn: s.TestBroadcast65},
{Name: "TestBroadcast66", Fn: s.TestBroadcast66},
{Name: "TestLargeAnnounce", Fn: s.TestLargeAnnounce},
{Name: "TestLargeAnnounce65", Fn: s.TestLargeAnnounce65},
{Name: "TestLargeAnnounce66", Fn: s.TestLargeAnnounce66},
{Name: "TestOldAnnounce", Fn: s.TestOldAnnounce},
{Name: "TestOldAnnounce65", Fn: s.TestOldAnnounce65},
{Name: "TestOldAnnounce66", Fn: s.TestOldAnnounce66},
{Name: "TestBlockHashAnnounce", Fn: s.TestBlockHashAnnounce},
{Name: "TestBlockHashAnnounce65", Fn: s.TestBlockHashAnnounce65},
{Name: "TestBlockHashAnnounce66", Fn: s.TestBlockHashAnnounce66},
// malicious handshakes + status
{Name: "TestMaliciousHandshake", Fn: s.TestMaliciousHandshake},
{Name: "TestMaliciousStatus", Fn: s.TestMaliciousStatus},
{Name: "TestMaliciousHandshake65", Fn: s.TestMaliciousHandshake65},
{Name: "TestMaliciousStatus65", Fn: s.TestMaliciousStatus65},
{Name: "TestMaliciousHandshake66", Fn: s.TestMaliciousHandshake66},
{Name: "TestMaliciousStatus66", Fn: s.TestMaliciousStatus66},
// test transactions
{Name: "TestTransaction", Fn: s.TestTransaction},
{Name: "TestTransaction65", Fn: s.TestTransaction65},
{Name: "TestTransaction66", Fn: s.TestTransaction66},
{Name: "TestMaliciousTx", Fn: s.TestMaliciousTx},
{Name: "TestMaliciousTx65", Fn: s.TestMaliciousTx65},
{Name: "TestMaliciousTx66", Fn: s.TestMaliciousTx66},
{Name: "TestLargeTxRequest66", Fn: s.TestLargeTxRequest66},
{Name: "TestNewPooledTxs66", Fn: s.TestNewPooledTxs66},
Expand All @@ -89,17 +89,17 @@ func (s *Suite) AllEthTests() []utesting.Test {

func (s *Suite) EthTests() []utesting.Test {
return []utesting.Test{
{Name: "TestStatus", Fn: s.TestStatus},
{Name: "TestGetBlockHeaders", Fn: s.TestGetBlockHeaders},
{Name: "TestGetBlockBodies", Fn: s.TestGetBlockBodies},
{Name: "TestBroadcast", Fn: s.TestBroadcast},
{Name: "TestLargeAnnounce", Fn: s.TestLargeAnnounce},
{Name: "TestOldAnnounce", Fn: s.TestOldAnnounce},
{Name: "TestBlockHashAnnounce", Fn: s.TestBlockHashAnnounce},
{Name: "TestMaliciousHandshake", Fn: s.TestMaliciousHandshake},
{Name: "TestMaliciousStatus", Fn: s.TestMaliciousStatus},
{Name: "TestTransaction", Fn: s.TestTransaction},
{Name: "TestMaliciousTx", Fn: s.TestMaliciousTx},
{Name: "TestStatus65", Fn: s.TestStatus65},
{Name: "TestGetBlockHeaders65", Fn: s.TestGetBlockHeaders65},
{Name: "TestGetBlockBodies65", Fn: s.TestGetBlockBodies65},
{Name: "TestBroadcast65", Fn: s.TestBroadcast65},
{Name: "TestLargeAnnounce65", Fn: s.TestLargeAnnounce65},
{Name: "TestOldAnnounce65", Fn: s.TestOldAnnounce65},
{Name: "TestBlockHashAnnounce65", Fn: s.TestBlockHashAnnounce65},
{Name: "TestMaliciousHandshake65", Fn: s.TestMaliciousHandshake65},
{Name: "TestMaliciousStatus65", Fn: s.TestMaliciousStatus65},
{Name: "TestTransaction65", Fn: s.TestTransaction65},
{Name: "TestMaliciousTx65", Fn: s.TestMaliciousTx65},
}
}

Expand Down Expand Up @@ -130,9 +130,9 @@ var (
eth65 = false // indicates whether suite should negotiate eth65 connection or below.
)

// TestStatus attempts to connect to the given node and exchange
// TestStatus65 attempts to connect to the given node and exchange
// a status message with it.
func (s *Suite) TestStatus(t *utesting.T) {
func (s *Suite) TestStatus65(t *utesting.T) {
conn, err := s.dial()
if err != nil {
t.Fatalf("dial failed: %v", err)
Expand All @@ -156,9 +156,9 @@ func (s *Suite) TestStatus66(t *utesting.T) {
}
}

// TestGetBlockHeaders tests whether the given node can respond to
// TestGetBlockHeaders65 tests whether the given node can respond to
// a `GetBlockHeaders` request accurately.
func (s *Suite) TestGetBlockHeaders(t *utesting.T) {
func (s *Suite) TestGetBlockHeaders65(t *utesting.T) {
conn, err := s.dial()
if err != nil {
t.Fatalf("dial failed: %v", err)
Expand Down Expand Up @@ -392,9 +392,9 @@ func (s *Suite) TestZeroRequestID66(t *utesting.T) {
}
}

// TestGetBlockBodies tests whether the given node can respond to
// TestGetBlockBodies65 tests whether the given node can respond to
// a `GetBlockBodies` request and that the response is accurate.
func (s *Suite) TestGetBlockBodies(t *utesting.T) {
func (s *Suite) TestGetBlockBodies65(t *utesting.T) {
conn, err := s.dial()
if err != nil {
t.Fatalf("dial failed: %v", err)
Expand Down Expand Up @@ -460,9 +460,9 @@ func (s *Suite) TestGetBlockBodies66(t *utesting.T) {
}
}

// TestBroadcast tests whether a block announcement is correctly
// TestBroadcast65 tests whether a block announcement is correctly
// propagated to the given node's peer(s).
func (s *Suite) TestBroadcast(t *utesting.T) {
func (s *Suite) TestBroadcast65(t *utesting.T) {
if err := s.sendNextBlock(eth65); err != nil {
t.Fatalf("block broadcast failed: %v", err)
}
Expand All @@ -476,8 +476,8 @@ func (s *Suite) TestBroadcast66(t *utesting.T) {
}
}

// TestLargeAnnounce tests the announcement mechanism with a large block.
func (s *Suite) TestLargeAnnounce(t *utesting.T) {
// TestLargeAnnounce65 tests the announcement mechanism with a large block.
func (s *Suite) TestLargeAnnounce65(t *utesting.T) {
nextBlock := len(s.chain.blocks)
blocks := []*NewBlock{
{
Expand Down Expand Up @@ -569,8 +569,8 @@ func (s *Suite) TestLargeAnnounce66(t *utesting.T) {
}
}

// TestOldAnnounce tests the announcement mechanism with an old block.
func (s *Suite) TestOldAnnounce(t *utesting.T) {
// TestOldAnnounce65 tests the announcement mechanism with an old block.
func (s *Suite) TestOldAnnounce65(t *utesting.T) {
if err := s.oldAnnounce(eth65); err != nil {
t.Fatal(err)
}
Expand All @@ -584,9 +584,9 @@ func (s *Suite) TestOldAnnounce66(t *utesting.T) {
}
}

// TestBlockHashAnnounce sends a new block hash announcement and expects
// TestBlockHashAnnounce65 sends a new block hash announcement and expects
// the node to perform a `GetBlockHeaders` request.
func (s *Suite) TestBlockHashAnnounce(t *utesting.T) {
func (s *Suite) TestBlockHashAnnounce65(t *utesting.T) {
if err := s.hashAnnounce(eth65); err != nil {
t.Fatalf("block hash announcement failed: %v", err)
}
Expand All @@ -600,8 +600,8 @@ func (s *Suite) TestBlockHashAnnounce66(t *utesting.T) {
}
}

// TestMaliciousHandshake tries to send malicious data during the handshake.
func (s *Suite) TestMaliciousHandshake(t *utesting.T) {
// TestMaliciousHandshake65 tries to send malicious data during the handshake.
func (s *Suite) TestMaliciousHandshake65(t *utesting.T) {
if err := s.maliciousHandshakes(t, eth65); err != nil {
t.Fatal(err)
}
Expand All @@ -614,8 +614,8 @@ func (s *Suite) TestMaliciousHandshake66(t *utesting.T) {
}
}

// TestMaliciousStatus sends a status package with a large total difficulty.
func (s *Suite) TestMaliciousStatus(t *utesting.T) {
// TestMaliciousStatus65 sends a status package with a large total difficulty.
func (s *Suite) TestMaliciousStatus65(t *utesting.T) {
conn, err := s.dial()
if err != nil {
t.Fatalf("dial failed: %v", err)
Expand All @@ -641,9 +641,9 @@ func (s *Suite) TestMaliciousStatus66(t *utesting.T) {
}
}

// TestTransaction sends a valid transaction to the node and
// TestTransaction65 sends a valid transaction to the node and
// checks if the transaction gets propagated.
func (s *Suite) TestTransaction(t *utesting.T) {
func (s *Suite) TestTransaction65(t *utesting.T) {
if err := s.sendSuccessfulTxs(t, eth65); err != nil {
t.Fatal(err)
}
Expand All @@ -657,9 +657,9 @@ func (s *Suite) TestTransaction66(t *utesting.T) {
}
}

// TestMaliciousTx sends several invalid transactions and tests whether
// TestMaliciousTx65 sends several invalid transactions and tests whether
// the node will propagate them.
func (s *Suite) TestMaliciousTx(t *utesting.T) {
func (s *Suite) TestMaliciousTx65(t *utesting.T) {
if err := s.sendMaliciousTxs(t, eth65); err != nil {
t.Fatal(err)
}
Expand Down
21 changes: 14 additions & 7 deletions cmd/devp2p/internal/v4test/discv4tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func PingPastExpiration(t *utesting.T) {

reply, _, _ := te.read(te.l1)
if reply != nil {
t.Fatal("Expected no reply, got", reply)
t.Fatalf("Expected no reply, got %v %v", reply.Name(), reply)
}
}

Expand All @@ -247,7 +247,7 @@ func WrongPacketType(t *utesting.T) {

reply, _, _ := te.read(te.l1)
if reply != nil {
t.Fatal("Expected no reply, got", reply)
t.Fatalf("Expected no reply, got %v %v", reply.Name(), reply)
}
}

Expand Down Expand Up @@ -282,9 +282,16 @@ func FindnodeWithoutEndpointProof(t *utesting.T) {
rand.Read(req.Target[:])
te.send(te.l1, &req)

reply, _, _ := te.read(te.l1)
if reply != nil {
t.Fatal("Expected no response, got", reply)
for {
reply, _, _ := te.read(te.l1)
if reply == nil {
// No response, all good
break
}
if reply.Kind() == v4wire.PingPacket {
continue // A ping is ok, just ignore it
}
t.Fatalf("Expected no reply, got %v %v", reply.Name(), reply)
}
}

Expand All @@ -304,7 +311,7 @@ func BasicFindnode(t *utesting.T) {
t.Fatal("read find nodes", err)
}
if reply.Kind() != v4wire.NeighborsPacket {
t.Fatal("Expected neighbors, got", reply.Name())
t.Fatalf("Expected neighbors, got %v %v", reply.Name(), reply)
}
}

Expand Down Expand Up @@ -341,7 +348,7 @@ func UnsolicitedNeighbors(t *utesting.T) {
t.Fatal("read find nodes", err)
}
if reply.Kind() != v4wire.NeighborsPacket {
t.Fatal("Expected neighbors, got", reply.Name())
t.Fatalf("Expected neighbors, got %v %v", reply.Name(), reply)
}
nodes := reply.(*v4wire.Neighbors).Nodes
if contains(nodes, encFakeKey) {
Expand Down
Loading