Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/_go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
jobs:
go-tests:
name: Full Go tests (matrix)
runs-on: ${{ startsWith(matrix.test-mode, 'defaults') && 'ubuntu-24.04-8core' || 'ubuntu-latest' }}
runs-on: 'ubuntu-24.04-dummy'
strategy:
fail-fast: false
matrix:
test-mode: [defaults-A, defaults-B, flaky, pathdb, challenge, stylus, l3challenge]
test-mode: [defaults-A, defaults-B, defaults-C, flaky, pathdb, challenge, stylus, l3challenge]
services:
redis:
image: redis
Expand Down Expand Up @@ -66,7 +66,16 @@ jobs:
run: >-
${{ github.workspace }}/.github/workflows/gotestsum.sh
--tags cionly --timeout 60m --test_state_scheme hash
--junitfile test-results/junit-b.xml --skip '^Test[A-L]'
--junitfile test-results/junit-b.xml --run '^Test[M-S]'

- name: run tests without race detection and hash state scheme (C-batch)
if: matrix.test-mode == 'defaults-C'
id: run-tests-defaults-c
continue-on-error: true
run: >-
${{ github.workspace }}/.github/workflows/gotestsum.sh
--tags cionly --timeout 60m --test_state_scheme hash
--junitfile test-results/junit-c.xml --skip '^Test[A-S]'

- name: Process JUnit XML logs
if: startsWith(matrix.test-mode, 'defaults') && always()
Expand Down
32 changes: 17 additions & 15 deletions arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ type BatchPoster struct {
espressoStreamer *espressostreamer.EspressoStreamer
espressoBatcherAddrMonitor *BatcherAddrMonitor
espressoRestarting bool
signerAddr common.Address
}

type l1BlockBound int
Expand Down Expand Up @@ -620,20 +621,11 @@ func NewBatchPoster(ctx context.Context, opts *BatchPosterOpts) (*BatchPoster, e

submitterOptions = append(submitterOptions, submitter.WithInitialFinalizedSequencerMessageCount(sequencerMessageCount))

initStringAddresses := opts.Config().InitBatcherAddresses
// Convert the init addresses to common.Address
initAddresses := []common.Address{}
for _, addr := range initStringAddresses {
initAddresses = append(initAddresses, common.HexToAddress(addr))
}
if len(initAddresses) == 0 {
addr, err := recoverAddressFromSigner(opts.DataSigner)
if err != nil {
return nil, fmt.Errorf("failed to recover address from signer: %w", err)
}

initAddresses = []common.Address{addr}
addr, err := recoverAddressFromSigner(opts.DataSigner)
if err != nil {
return nil, err
}
b.signerAddr = addr

// We dont need auth reads here because batch poster is not reliant on the
// database for determining which messages to post, it gets the messages
Expand All @@ -643,7 +635,6 @@ func NewBatchPoster(ctx context.Context, opts *BatchPosterOpts) (*BatchPoster, e
return nil, err
}
monitor := NewBatcherAddrMonitor(
initAddresses,
&db,
opts.L1Reader,
opts.DeployInfo.SequencerInbox,
Expand All @@ -658,7 +649,9 @@ func NewBatchPoster(ctx context.Context, opts *BatchPosterOpts) (*BatchPoster, e
nil,
hotShotClient,
false,
monitor.GetValidAddresses,
func(l1Height uint64, addr common.Address) (bool, error) {
return monitor.IsValid(ctx, addr, l1Height)
},
opts.Config().EspressoTxnsPollingInterval,
)

Expand Down Expand Up @@ -1911,6 +1904,15 @@ func (b *BatchPoster) MaybePostSequencerBatch(ctx context.Context) (bool, error)
return false, fmt.Errorf("unable to register signer: %w", err)
}
}
canSend, err := b.espressoStreamer.CanBatcherAddressSend(ctx, b.signerAddr)
if err != nil {
log.Warn("failed to check if batcher address can send", "err", err)
return false, nil
}
if !canSend {
log.Warn("batcher address cannot send at this time", "address", b.signerAddr)
return false, nil
}
}

nonce, batchPositionBytes, err := b.dataPoster.GetNextNonceAndMeta(ctx)
Expand Down
Loading
Loading