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

les: separate peer into clientPeer and serverPeer #19991

Merged
merged 2 commits into from
Feb 26, 2020

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Aug 22, 2019

This is the second big refactor PR for les package.

In this PR, peers are separated into two types: serverPeer and clientPeer. The former refers to the peers of light_client. The latter refers to the peers of les_server.

@rjl493456442 rjl493456442 force-pushed the peer-separation branch 2 times, most recently from 6d9ab88 to 03feffd Compare August 26, 2019 05:40
@rjl493456442
Copy link
Member Author

@zsfelfoldi I think this big stuff is ready for review. If you have the plan to review something, please take a look.

Copy link
Contributor

@zsfelfoldi zsfelfoldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of it is nice, the only serious issue is the blocking send in broadcastHeaders. Also, splitting peerSet too would be nice (unless it would cause some serious trouble elsewhere which I am not aware of).

les/server_handler.go Outdated Show resolved Hide resolved
les/peer.go Outdated Show resolved Hide resolved
les/peer.go Outdated Show resolved Hide resolved
les/peer.go Outdated Show resolved Hide resolved
les/txrelay.go Show resolved Hide resolved
@rjl493456442
Copy link
Member Author

@zsfelfoldi Fixed, ptal again

Copy link
Contributor

@zsfelfoldi zsfelfoldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karalabe karalabe merged commit 4fabd9c into ethereum:master Feb 26, 2020
@karalabe karalabe added this to the 1.9.12 milestone Feb 26, 2020
pull bot pushed a commit to scope-demo/go-ethereum that referenced this pull request Feb 26, 2020
* les: separate peer into clientPeer and serverPeer

* les: address comments
tonyredondo pushed a commit to scope-demo/go-ethereum that referenced this pull request Feb 27, 2020
* internal/ethapi: default to zero address for calls (ethereum#20702)

This makes eth_call and eth_estimateGas use the zero address
as sender when the "from" parameter is not supplied.

Co-authored-by: Felix Lange <[email protected]>

* les: separate peer into clientPeer and serverPeer (ethereum#19991)

* les: separate peer into clientPeer and serverPeer

* les: address comments

* mobile: add CallOpts.SetFrom (ethereum#20721)

This was missing because I forgot to wrap it when bind.CallOpts.From
as added.

* crypto/bn256: fix import line (ethereum#20723)

* p2p/discv5: fix test on go 1.14 (ethereum#20724)

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: gary rong <[email protected]>
Co-authored-by: Adam Schmideg <[email protected]>
kjx98 pushed a commit to kjx98/go-ethereum that referenced this pull request Mar 17, 2020
* les: separate peer into clientPeer and serverPeer

* les: address comments
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
* les: separate peer into clientPeer and serverPeer

* les: address comments
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

Successfully merging this pull request may close these issues.

4 participants