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

consensus/clique: implement getSignerForBlock #22987

Merged
merged 7 commits into from
Jul 13, 2021

Conversation

MariusVanDerWijden
Copy link
Member

Prints the signer for a certain block

@MariusVanDerWijden
Copy link
Member Author

@holiman suggested to have getSealerForBlockRlp

@karalabe
Copy link
Member

karalabe commented Jun 2, 2021

Could we do getSigner (i.e. no block) and allow specifying either a number a hash (these 2 are easy, we have a rpc.hashOrNumber type) and also perhaps an RLP hex dump (block will always be >> than 32byte hash, so no clash). I think it would be useful to multiplex the various calls one might make without having to remember 3 method names. Just my 2c.

consensus/clique/api.go Outdated Show resolved Hide resolved
@MariusVanDerWijden
Copy link
Member Author

So 890673a implements getSignerForBlock (doxxed and pretty decently)
While 168c82d implements getSignerin a way that lets us take the RLP too. I haven't tested the second one yet. I believe that it is not working yet due to the inputBlockNumberFormatterin web3.js

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

Looks like a really useful api endpoint!

consensus/clique/api.go Outdated Show resolved Hide resolved
internal/web3ext/web3ext.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
@fjl fjl changed the title clique: implement getSignerForBlock consensus/clique: implement getSignerForBlock Jul 13, 2021
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
consensus/clique/api.go Outdated Show resolved Hide resolved
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

SGTM

@karalabe karalabe added this to the 1.10.5 milestone Jul 13, 2021
@karalabe karalabe merged commit b9e6e43 into ethereum:master Jul 13, 2021
sidhujag pushed a commit to sidhujag/go-ethereum that referenced this pull request Jul 28, 2021
* clique: implement getSignerForBlock

* consensus/clique: use blockNrOrHash in getSignerForBlock

* consensus/clique: implement getSigner

* consensus/clique: fixed rlp decoding

* consensus/clique: use Author instead of getSigner

* consensus/clique: nit nit nit

* consensus/clique: nit nit nit
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
* clique: implement getSignerForBlock

* consensus/clique: use blockNrOrHash in getSignerForBlock

* consensus/clique: implement getSigner

* consensus/clique: fixed rlp decoding

* consensus/clique: use Author instead of getSigner

* consensus/clique: nit nit nit

* consensus/clique: nit nit nit
@MariusVanDerWijden MariusVanDerWijden deleted the clique-get-signer branch November 30, 2021 15:26
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.

3 participants