-
Notifications
You must be signed in to change notification settings - Fork 153
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
Add latest p2p #636
Add latest p2p #636
Commits on Jun 5, 2024
-
eth,eth/protocols/eth,internal/era,metrics,p2p/enode,rpc,signer/core:…
… all: fix function names in docs (#29128) Signed-off-by: cui fliter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 38b8fd2 - Browse repository at this point
Copy the full SHA 38b8fd2View commit details -
cmd/era,cmd/geth,cmd/utils,core/txpool,internal/era,internal/era/e2st…
…ore,internal/era,miner,node,p2p/discover,p2p/discover/v5wire,p2p/dnsdisc,p2p/enode,p2p/nat,p2p/simulations/adapters,signer/core/apitypes,trie,triedb/pathdb: all: replace fmt.Errorf() with errors.New() if no param required (#29126) replace-fmt-errorf Co-authored-by: [email protected] <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9914051 - Browse repository at this point
Copy the full SHA 9914051View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6df05be - Browse repository at this point
Copy the full SHA 6df05beView commit details -
p2p/simulations/adapters: p2p/simulations/adapters: fix error message…
…s in TestTCPPipeBidirections (#29207)
Configuration menu - View commit details
-
Copy full SHA for 7d1d20d - Browse repository at this point
Copy the full SHA 7d1d20dView commit details -
p2p: p2p: fix race in dialScheduler (#29235)
Co-authored-by: Stefan <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5b0d3af - Browse repository at this point
Copy the full SHA 5b0d3afView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce8cae4 - Browse repository at this point
Copy the full SHA ce8cae4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b0e339 - Browse repository at this point
Copy the full SHA 4b0e339View commit details -
p2p/dnsdisc: p2p/dnsdisc: using clear builtin func (#29418)
Co-authored-by: Felix Lange <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f6a5198 - Browse repository at this point
Copy the full SHA f6a5198View commit details -
p2p/discover/v5wire: p2p/discover/v5wire: add tests for invalid hands…
…hake and auth data size (#29708)
Configuration menu - View commit details
-
Copy full SHA for 53f8434 - Browse repository at this point
Copy the full SHA 53f8434View commit details -
cmd/devp2p,internal/testlog,node,p2p/discover,p2p: p2p/discover: impr…
…oved 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 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce5f562 - Browse repository at this point
Copy the full SHA ce5f562View commit details -
p2p/enode,p2p/enr: p2p/enode: fix endpoint determination for IPv6 (#2…
…9801) 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.
Configuration menu - View commit details
-
Copy full SHA for ca413e7 - Browse repository at this point
Copy the full SHA ca413e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e86463 - Browse repository at this point
Copy the full SHA 5e86463View commit details -
Configuration menu - View commit details
-
Copy full SHA for c99b76a - Browse repository at this point
Copy the full SHA c99b76aView commit details -
p2p/discover: p2p/discover: fix crash when revalidated node is remove…
…d (#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.
Configuration menu - View commit details
-
Copy full SHA for e2585ca - Browse repository at this point
Copy the full SHA e2585caView commit details -
p2p/discover: p2p/discover: fix update logic in handleAddNode (#29836)
It seems the semantic differences between addFoundNode and addInboundNode were lost in #29572. My understanding is addFoundNode is for a node you have not contacted directly (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 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 85f238c - Browse repository at this point
Copy the full SHA 85f238cView commit details -
p2p/simulations/adapters,p2p/simulations/examples: p2p/simulations: r…
…emove stale information about docker adapter (#29874)
Configuration menu - View commit details
-
Copy full SHA for c68003a - Browse repository at this point
Copy the full SHA c68003aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53978f7 - Browse repository at this point
Copy the full SHA 53978f7View commit details -
cmd/devp2p/internal/v4test,p2p/discover,p2p/discover/v4wire,p2p/disco…
…ver,p2p: 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.
Configuration menu - View commit details
-
Copy full SHA for 8e8ed66 - Browse repository at this point
Copy the full SHA 8e8ed66View commit details -
.travis.yml,Dockerfile,Dockerfile.alltools,accounts/scwallet,build,cr…
…ypto,crypto/ecies,crypto/secp256k1,crypto,go.sum,p2p/rlpx: all: update to go version 1.22.1 (#28946) Since Go 1.22 has deprecated certain elliptic curve operations, this PR removes references to the affected functions and replaces them with a custom implementation in package crypto. This causes backwards-incompatible changes in some places. --------- Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Felix Lange <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dd2800c - Browse repository at this point
Copy the full SHA dd2800cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 444bacf - Browse repository at this point
Copy the full SHA 444bacfView commit details
Commits on Jun 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ee41303 - Browse repository at this point
Copy the full SHA ee41303View commit details -
rlp: rlp: using unsafe.Slice instead of SliceHeader (#29067)
Co-authored-by: Felix Lange <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 549da55 - Browse repository at this point
Copy the full SHA 549da55View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfada26 - Browse repository at this point
Copy the full SHA cfada26View commit details -
Configuration menu - View commit details
-
Copy full SHA for 850db88 - Browse repository at this point
Copy the full SHA 850db88View commit details -
Merge pull request #637 from etclabscore/merge/foundation-release/1.1…
…3.15-p2p-lint Fix lint issue SA1019 reflect.SliceHeader
Configuration menu - View commit details
-
Copy full SHA for 6c483de - Browse repository at this point
Copy the full SHA 6c483deView commit details