-
Notifications
You must be signed in to change notification settings - Fork 190
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
[API] Added committers' corresponding public keys to consensus API #2088
Conversation
@hyunsooda I think If GetSignatureAddress (wrapper to ecrecover) fails we can just return the error. Same as how we handle proposer ecrecover failure https://github.com/klaytn/klaytn/blob/v1.12.0/consensus/istanbul/backend/engine.go#L789-L792 klay_getBlockWithConsensusInfo
{
"baseFeePerGas": "0x5d21dba00",
"blockScore": "0x1",
"committee": [
"0x571e53df607be97431a5bbefca1dffe5aef56f4d",
"0x5cb1a7dccbd0dc446e3640898ede8820368554c8",
"0x99fb17d324fa0e07f23b49d09028ac0919414db6",
"0xb74ff9dea397fe9e231df545eb53fe2adf776cb2"
],
+ "committers": [
+ "0x5cb1a7dccbd0dc446e3640898ede8820368554c8",
+ "0x99fb17d324fa0e07f23b49d09028ac0919414db6",
+ "0xb74ff9dea397fe9e231df545eb53fe2adf776cb2"
+ ],
"extraData": "0xd883010c00846b6c617988676f312e32302e36856c696e757800000000000000f90164f85494571e53df607be97431a5bbefca1dffe5aef56f4d945cb1a7dccbd0dc446e3640898ede8820368554c89499fb17d324fa0e07f23b49d09028ac0919414db694b74ff9dea397fe9e231df545eb53fe2adf776cb2b84159a0ef003b209de77c89814d1b1224af371cb211240c9ba4272c626140ece7b823f5455e984da9824a0c190b98716dc01475dc95edd6263adcb552017ccd639d01f8c9b8410bf3f9b38d1a01a1b1d7869a6a81e8c740e9af8fc56135763bc2e4f600dad2b272ccc6f32116f4a004dc976bf377e43ec5a26ad14ed88971c3e2355b5c7d052b01b841aa86bf506a91d67ef1059dc68c06c3746bfecdf409159b5945b0be8348ce343b3f737f996ad223fac80d971e9cae45256e02074526389536d13de57fe5e1582700b841e7e12de541bc974e81c8641d9f89d3beb1a29384ff2f1e189a35cf628470abcd3589d456261112a455ce87afc83dc6f176d2390d70c7c47bca5c796c8d12651700",
"gasUsed": "0xd1a3f",
"governanceData": "0x",
"hash": "0x5c2cc15e52444c4c02bbea3a7c73309ee95e2190903679f676bc8c139fdf27bb", ken util decode-extra
{
"committedSeal": [
"0xdb00803e64c3e16cdd8b09b3f4633a6d44a025596f30d171ac42019ddb85a7673846d79e7ba199de6ce7d4f9dfc93510b3b1ba9df526be9e45c537bf6b8050a401",
"0xb24a29fc57e1bcf7d22c5720d5ddf6c9ad5f55a121b3e78ad92d23bb5f20fde74dab8499a81f9e51b865a7c4b772bbd665567754cf6b1c2374a5aca6c9bd7eba01",
"0xfdb24127a7842f1b7e22908895c543aa32eed676463315770d6795e6da4795460499aede9266e5cd51ff5517245f7107930ba0efcc65193613800dbe6312af2700"
],
"committedSealSize": 3,
+ "committers": [
+ "0x571E53Df607bE97431a5bBeFcA1DFfE5aEF56F4d",
+ "0x5Cb1A7dccbd0Dc446e3640898EDE8820368554c8",
+ "0x99FB17d324fa0e07F23b49d09028Ac0919414dB6"
+ ],
"hash": "0xb7128deb19882e10a42b21adf9f6a54143a5793d83aee8a964677b7aa454aa87",
"proposer": "0xB74Ff9DEa397fE9E231df545eb53fE2ADF776cb2",
"seal": "0xd3d8d1372ad89ef89015a233e53a652fcab5b066b85a2c642f1b27ec7e5187ca41aea21036c3c8ef337893c5d38fec3075eb5bb7c21718c2451e72298fb9805d00",
"validatorSize": 4,
"validators": [
"0x571E53Df607bE97431a5bBeFcA1DFfE5aEF56F4d",
"0x5Cb1A7dccbd0Dc446e3640898EDE8820368554c8",
"0x99FB17d324fa0e07F23b49d09028Ac0919414dB6",
"0xB74Ff9DEa397fE9E231df545eb53fE2ADF776cb2"
]
} |
If unable to obtain a committer address (or any other errors), should the call return an error even if other information can be retrieved?
I'll do that. |
@hyunsooda Yes just return the error. Nevertheless, I think the error is unlikely because it's just ecrecover. |
Updated. PTAL |
What do you think if we call "signer" rather than "committer"? EDIT: I agree with using "committer" here. Thanks. |
Proposed changes
Added committers' corresponding public keys to consensus API
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...