piplabs / story

Official repo for the Story L1 consensus client, contracts, and associated tooling.
GNU General Public License v3.0
39 stars 27 forks source link

canceller role unset #289

Closed lucas2brh closed 1 month ago

lucas2brh commented 1 month ago

Description and context

Notice that the wallet lacks the role of canceller when testing Canceller can cancel calls before the executor executes.

Timelock-04: Canceller can cancel calls before executor executes

Timelock functional test
    Timelock-04: Canceller can cancel calls before executor executes
...

Canceller: xxx
Has CANCELLER_ROLE: false
Error during scheduling or canceling timelocked transaction: Error: execution reverted (unknown custom error) (action="estimateGas", data="0xe2517d3f0000000000000000000000009dd1c4d9dc87ddbf4fa1721b94b7af4f08d8a83cfd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", reason=null, transaction={ "data": "0xc4d252f5c649e42346c42db5f2cbfe4597fe1623819f46fc151300393f5ea679030ff4bd", "from": "0x9dd1C4d9Dc87dD
CANCELLER: xxx
Has CANCELLER_ROLE: false
    ✔ should check roles (999ms)

Steps to reproduce

Experienced behavior

Expected behavior

Solution recommendation

lucas2brh commented 1 month ago

We didn’t return the canceller here, which might be the reason why the role granting failed.

Additionally, I tested with the proposer wallet to cancel the schedule and confirmed it’s working.

Canceller: ${proposer_wallet}
Has CANCELLER_ROLE: true
Transaction canceled successfully, Tx Hash: 0x5ca2f9975e9d708054f1fefdc425358919c4a25ff0eb06be7f63ae0c82832416
Transaction hash (schedule): 0xb4295d601bdc580d66bdb804179fad88e45e9862e3597dc1ab1c4c3882c1533f
Test passed: Proposer schedule setFee call.
Transaction hash (cancel): 0x5ca2f9975e9d708054f1fefdc425358919c4a25ff0eb06be7f63ae0c82832416
Test passed: Canceller can cancel the scheduled call.
   ✔ Step 01: schedule setFee and then cancel (16751ms)
lucas2brh commented 1 month ago

Having the test case Timelock-04 and confirmed passed, closing.