-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(protocol): fix an issue for ProverSet.proposeBlock
#17521
Conversation
fix(protocol): fix an issue for
|
Severity Level | Results | |
---|---|---|
Contracts | Critical High Medium Low Note Total |
2 2 0 8 42 54 |
Dependencies | Critical High Medium Low Note Total |
0 0 0 0 0 0 |
For more details view the full report in OpenZeppelin Code Inspector
@@ -83,7 +83,7 @@ contract ProverSet is EssentialContract, IERC1271 { | |||
bytes calldata _txList | |||
) | |||
external | |||
onlyProver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need this check because of this:
taiko-mono/packages/protocol/contracts/L1/libs/LibProposing.sol
Lines 184 to 186 in d3037ad
if (params.hookCalls.length == 0) { | |
if (params.assignedProver != msg.sender) revert L1_NOT_SAME_ADDRESS(); | |
_tko.transferFrom(msg.sender, address(this), _config.livenessBond); |
So now anybody could propose a block through this contract, set no hooks and the assignedProver to the pool contract, and use the TAIKO in this contract as a bond for the proving no? And then the provers in this contract are forced to prove the block, which seems unwanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They still need an enabled prover to sign their blob at first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean this check:
&& ECDSA.recover(meta_.blobHash, params.signature) != msg.sender |
hmmm also does ECDSA.recover even support contracts? Looking at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol it doesn't seem to call isValidSignature
anywhere for contract addresses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right, we may also need to whitelist the proposer addresses in proverSet @dantaik
No description provided.