Commit graph

16613 commits

Author SHA1 Message Date
Pratik Patil
b6b897fa8f
Merge pull request #1315 from maticnetwork/master
Master to develop
2024-08-27 12:50:49 +05:30
Pratik Patil
635dacc63e
PIP-30: increased max code size limit to 32KB (#1310)
* PIP-30: increased max code size limit to 32KB

* fixed tests
2024-08-20 09:02:48 +05:30
Marcello Ardizzone
6e946c4a28
Merge pull request #1293 from maticnetwork/dependabot/go_modules/google.golang.org/grpc-1.64.1
build(deps): bump google.golang.org/grpc from 1.64.0 to 1.64.1
2024-08-19 06:42:12 +02:00
dependabot[bot]
665c911960
build(deps): bump google.golang.org/grpc from 1.64.0 to 1.64.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 04:37:01 +00:00
Marcello Ardizzone
50092672c1
Merge pull request #1309 from maticnetwork/merge-master-develop
merge master into develop
2024-08-19 05:56:05 +02:00
Marcello Ardizzone
aa54ff55a8
internal/debug: remove memsize to fix docker (#1308)
* chg: remove memsize

* chg: fix lint
2024-08-16 10:50:00 +02:00
Pratik Patil
d903330c62
Merge pull request #1305 from maticnetwork/1.3.5-candidate
v1.3.7
2024-08-12 12:08:42 +05:30
Pratik Patil
bd5ed4c2c3
Merge branch 'master' of https://github.com/maticnetwork/bor into 1.3.5-candidate 2024-08-12 10:21:34 +05:30
Pratik Patil
7646fb573e
version bump 1.3.7 2024-08-12 10:06:36 +05:30
Pratik Patil
2cdef71e09
Merge pull request #1302 from maticnetwork/1.3.6-candidate
v1.3.6
2024-08-07 19:27:06 +05:30
Pratik Patil
d2e45831ad
version bump v1.3.6 2024-08-07 18:53:41 +05:30
Pratik Patil
557ab43365
core/state: bug fix block stm 2024-08-07 18:53:01 +05:30
Pratik Patil
369a59e220
version bump to 1.3.5-beta 2024-07-30 10:01:08 +05:30
Pratik Patil
6939df80da
replaced 4337 with PIP-15 2024-07-30 10:00:12 +05:30
Pratik Patil
d0c74c4cf2
fix: eth/protocol: bunduled transactions are not broadcasted to the peers (#1296) 2024-07-29 14:44:48 +05:30
Pratik Patil
577a8a0376
p2p/discover: add missing lock when calling tab.handleAddNode (#29960) (#1295)
Co-authored-by: Gealber Morales <48373523+Gealber@users.noreply.github.com>
2024-07-26 13:38:52 +05:30
Denny Ooi
164933d316
p2p/discover: unwrap 4-in-6 UDP source addresses (#29944) (#1292)
Fixes an issue where discovery responses were not recognized.

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-07-26 10:51:47 +05:30
Pratik Patil
e2cee054c6
Merge pull request #1294 from maticnetwork/master
v1.3.4 Backport master to develop
2024-07-26 10:12:59 +05:30
Pratik Patil
18a5d28154
Merge pull request #1291 from maticnetwork/1.3.4-candidate
v1.3.4
2024-07-26 10:07:39 +05:30
Manav Darji
29840e2016
bump version to v1.3.4 2024-07-25 16:48:09 +05:30
Manav Darji
dce4253605
PIP-35: enforce gas related configs for mainnet (#1290)
* enforce gas configs for all networks

* eth/gasprice: remove else if for log

* docs/cli: update example config

* fix tests

* internal/cli/server: fix tests

* miner: fix tests
2024-07-23 19:32:48 +05:30
Manav Darji
31545e5365
bump version to v1.3.4-beta3 2024-07-11 14:08:46 +05:30
Manav Darji
67159969e0
miner: log last tx hash before commit interrupt (#1289) 2024-07-11 14:08:07 +05:30
Manav Darji
1a05223076
PIP-35 for amoy: enforce gas related configs (#1285)
* enforce gas related configs for amoy

* internal/cli/server: revert changes to default config.toml for test

* eth: check nil genesis for tests
2024-07-11 11:05:12 +05:30
0xsajal
75f1f9ad77
README: Update discord link (#1288) 2024-07-10 17:09:27 +05:30
Manav Darji
32c9405afa
core/rawdb: log ancient pruner offset 2024-06-24 17:33:17 +05:30
Manav Darji
b228a47491
bump version to v1.3.4-beta2 2024-06-21 21:01:59 +05:30
Manav Darji
0bc2dcbd71
cmd/utils: use defined filter api instance instead of a new one (#1270) 2024-06-20 17:19:12 +05:30
dufucun
0d20e247b5
chore: fix some function names (#1257)
Signed-off-by: dufucun <dufuchun@sohu.com>
Co-authored-by: dufucun <dufucunn@sohu.com>
2024-06-20 07:07:27 +02:00
Manav Darji
c551b4198e
bump version to v1.3.4-beta 2024-06-19 10:58:22 +05:30
Manav Darji
2fd85b3717
eth, consensus: refactor whitelisting related logs and improve error handling (#1268)
* eth, consensus: refactor whitelisting related logs and error handling

* core: fix lint

* eth: fix tests, check against root error

* eth: use ctx correctly while logging

* eth: refactor comments and error message
2024-06-18 14:43:51 +05:30
Manav Darji
9c2d462e21
internal/cli: check for delete permissions before starting to prune (#1269) 2024-06-18 14:43:29 +05:30
Marcello Ardizzone
a9e5c95be8
chg: upgrade deps and solve sec issues (#1261)
* chg: upgrade deps and solve sec issues

* chg: use old kzg-4844 repo

* chg: ignore explicitly Errorf return value
2024-06-13 14:55:40 +05:30
Pratik Patil
bd5d54e9fe
Merge pull request #1267 from maticnetwork/psp-p2p-upstream
p2p: cherry-pick commits from geth for peering issues
2024-06-13 13:00:54 +05:30
Marcello Ardizzone
d67620c8f4
core, eth, internal, miner, params: enforce 30gwei for gas related configs in bor (#1264)
* add: enforce 30gwei for gas related configs in bor

* chg: fix lint
2024-06-12 14:41:25 +05:30
Pratik Patil
d0a212b4d0
Merge pull request #1266 from maticnetwork/master
Back merge master to develop after v1.3.3 release
2024-06-12 14:34:41 +05:30
Pratik Patil
625774fa78
Merge pull request #1265 from maticnetwork/1.3.3-candidate
v1.3.3 release
2024-06-12 12:53:42 +05:30
Pratik Patil
22670cd283
version bump to 1.3.3 2024-06-12 12:15:57 +05:30
Felix Lange
642f5528f6
p2p: fix race in dialScheduler (#29235)
Co-authored-by: Stefan <stefan@starflinger.eu>
2024-06-11 16:43:07 +05:30
Felix Lange
0e093b2c9c
p2p/discover: refactor node and endpoint representation (#29844)
Here we clean up internal uses of type discover.node, converting most code to use
enode.Node instead. The discover.node type used to be the canonical representation of
network hosts before ENR was introduced. Most code worked with *node to avoid conversions
when interacting with Table methods. Since *node also contains internal state of Table and
is a mutable type, using *node outside of Table code is prone to data races. It's also
cleaner not having to wrap/unwrap *enode.Node all the time.

discover.node has been renamed to tableNode to clarify its purpose.

While here, we also change most uses of net.UDPAddr into netip.AddrPort. While this is
technically a separate refactoring from the *node -> *enode.Node change, it is more
convenient because *enode.Node handles IP addresses as netip.Addr. The switch to package
netip in discovery would've happened very soon anyway.

The change to netip.AddrPort stops at certain interface points. For example, since package
p2p/netutil has not been converted to use netip.Addr yet, we still have to convert to
net.IP/net.UDPAddr in a few places.
2024-06-11 15:53:50 +05:30
lightclient
7850a9f5f6
p2p/discover: fix update logic in handleAddNode (#29836)
It seems the semantic differences between addFoundNode and addInboundNode were lost in
(and are unsure if is available) whereas addInboundNode is for adding nodes that have
contacted the local node and we can verify they are active.

handleAddNode seems to be the consolidation of those two methods, yet it bumps the node in
the bucket (updating it's IP addr) even if the node was not an inbound. This PR fixes
this. It wasn't originally caught in tests like TestTable_addSeenNode because the
manipulation of the node object actually modified the node value used by the test.

New logic is added to reject non-inbound updates unless the sequence number of the
(signed) ENR increases. Inbound updates, which are published by the updated node itself,
are always accepted. If an inbound update changes the endpoint, the node will be
revalidated on an expedited schedule.

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-06-11 15:23:31 +05:30
Aaron Chen
b2c178d935
p2p/enode: fix TCPEndpoint (#29827) 2024-06-11 15:17:53 +05:30
Felix Lange
be1e580459
p2p/enode: fix endpoint determination for IPv6 (#29801)
enode.Node has separate accessor functions for getting the IP, UDP port and TCP port.
These methods performed separate checks for attributes set in the ENR.

With this PR, the accessor methods will now return cached information, and the endpoint is
determined when the node is created. The logic to determine the preferred endpoint is now
more correct, and considers how 'global' each address is when both IPv4 and IPv6 addresses
are present in the ENR.
2024-06-11 14:51:57 +05:30
Felix Lange
706cf1c779
p2p/discover: fix crash when revalidated node is removed (#29864)
In #29572, I assumed the revalidation list that the node is contained in could only ever
be changed by the outcome of a revalidation request. But turns out that's not true: if the
node gets removed due to FINDNODE failure, it will also be removed from the list it is in.
This causes a crash.

The invariant is: while node is in table, it is always in exactly one of the two lists. So
it seems best to store a pointer to the current list within the node itself.
2024-06-11 14:07:20 +05:30
Felix Lange
1351a54287
p2p/discover: improved node revalidation (#29572)
Node discovery periodically revalidates the nodes in its table by sending PING, checking
if they are still alive. I recently noticed some issues with the implementation of this
process, which can cause strange results such as nodes dropping unexpectedly, certain
nodes not getting revalidated often enough, and bad results being returned to incoming
FINDNODE queries.

In this change, the revalidation process is improved with the following logic:

- We maintain two 'revalidation lists' containing the table nodes, named 'fast' and 'slow'.
- The process chooses random nodes from each list on a randomized interval, the interval being
  faster for the 'fast' list, and performs revalidation for the chosen node.
- Whenever a node is newly inserted into the table, it goes into the 'fast' list.
  Once validation passes, it transfers to the 'slow' list. If a request fails, or the
  node changes endpoint, it transfers back into 'fast'.
- livenessChecks is incremented by one for successful checks. Unlike the old implementation,
  we will not drop the node on the first failing check. We instead quickly decay the
  livenessChecks give it another chance.
- Order of nodes in bucket doesn't matter anymore.

I am also adding a debug API endpoint to dump the node table content.

Co-authored-by: Martin HS <martin@swende.se>
2024-06-11 13:53:35 +05:30
Manav Darji
e6a462504a
bump version to v1.3.3-beta3 2024-06-10 12:34:00 +05:30
Manav Darji
2aa76a9926
eth: change block propagation and announcement logs to debug 2024-06-10 12:32:17 +05:30
Manav Darji
6bc8334852
eth/fetcher: modify queue limits for improving sync near chain tip (#1260) 2024-06-07 21:57:19 +05:30
Anshal Shukla
e28c2036fc
remove additional bootnodes (#1255) 2024-06-06 23:13:43 +05:30
Marcello Ardizzone
57b77e3b6c
chg: fix percentile validation in fee history (#1235) 2024-06-06 11:23:30 +05:30