Repository navigation
Fix SCW initialization bug in staker - #3695
Conversation
|
|
||
| type ValidatorWalletInterface interface { | ||
| Initialize(context.Context) error | ||
| Initialize(context.Context, bool) error |
There was a problem hiding this comment.
In general, it is a bit of a code smell to use booleans like this as control variables. It makes it unclear what it does without needing to resort to comments and it would be more idiomatic to define to initialization functions. One that's called CreateAndInitialize, and another called Initialize()
There was a problem hiding this comment.
I agree! fixed it
❌ 4 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
|
@ganeshvanahalli, I feel like we're in a sort of "Chicken and Egg" situation here where this PR is pulling in OffchainLabs/nitro-testnode#149, but that PR is waiting on this one to be merged. Can you help bring things into a logical state? |
@eljobe thanks for spotting this, I have testnode master and release sync PR here, once that is merged we can go ahead and merge OffchainLabs/nitro-testnode#149 as testnode master branch is meant to be mainly used in dev mode. And in the future sync of master and release branch of testnode- this fix from nitro will be pulled in anyway. WDYT? |
bdc268c
| "github.com/offchainlabs/nitro/staker/bold" | ||
| "github.com/offchainlabs/nitro/staker/legacy" | ||
| "github.com/offchainlabs/nitro/staker/multi_protocol" | ||
| legacystaker "github.com/offchainlabs/nitro/staker/legacy" |
There was a problem hiding this comment.
Why do these package aliases keep creeping back in. Are they needed?
Package aliases have been removed
This PR fixes a bug where
AssertionChainwhen created uses the deep copy of txOpts which is txBuilder.SingleTxAuth(), in the case of using smart contract wallet (set using--node.staker.use-smart-contract-wallet) this address is initially0x0and is later filled onceExecuteTransactionsis called on the txBuilder, which is incorrect hence we create the SCW when needed during initialization itself.This is tested by enabling use of smart contract wallet by default on the nitro-testnode and verifying that assertions are being posted.
Pulls nitro-testnode PR- OffchainLabs/nitro-testnode#149
Resolves NIT-3859