From d299a2497cafe41b3f17692f075d0a282cdac842 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 5 Oct 2022 14:02:55 -0500 Subject: [PATCH] Log tx sender in validator address isn't whitelisted log line --- validator/eoa_validator_wallet.go | 4 ++++ validator/staker.go | 2 +- validator/validator_wallet.go | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/validator/eoa_validator_wallet.go b/validator/eoa_validator_wallet.go index c1c6cc0c20..14a8431306 100644 --- a/validator/eoa_validator_wallet.go +++ b/validator/eoa_validator_wallet.go @@ -54,6 +54,10 @@ func (w *EoaValidatorWallet) AddressOrZero() common.Address { return w.auth.From } +func (w *EoaValidatorWallet) TxSenderAddress() *common.Address { + return &w.auth.From +} + func (w *EoaValidatorWallet) L1Client() arbutil.L1Interface { return w.client } diff --git a/validator/staker.go b/validator/staker.go index 2626917271..8c25f5f12e 100644 --- a/validator/staker.go +++ b/validator/staker.go @@ -316,7 +316,7 @@ func (s *Staker) Act(ctx context.Context) (*types.Transaction, error) { return nil, err } if !whitelisted { - log.Warn("validator address isn't whitelisted", "address", s.wallet.Address()) + log.Warn("validator address isn't whitelisted", "address", s.wallet.Address(), "txSender", s.wallet.TxSenderAddress()) } } if !s.shouldAct(ctx) { diff --git a/validator/validator_wallet.go b/validator/validator_wallet.go index f7419fa6a6..6374a17c2d 100644 --- a/validator/validator_wallet.go +++ b/validator/validator_wallet.go @@ -40,6 +40,7 @@ type ValidatorWalletInterface interface { Initialize(context.Context) error Address() *common.Address AddressOrZero() common.Address + TxSenderAddress() *common.Address RollupAddress() common.Address ChallengeManagerAddress() common.Address L1Client() arbutil.L1Interface @@ -137,6 +138,13 @@ func (v *ContractValidatorWallet) AddressOrZero() common.Address { return *v.address } +func (v *ContractValidatorWallet) TxSenderAddress() *common.Address { + if v.auth == nil { + return nil + } + return &v.auth.From +} + func (v *ContractValidatorWallet) From() common.Address { if v.auth == nil { return common.Address{}