Skip to content

Commit

Permalink
Merge branch 'master' into retryable-expiry-test
Browse files Browse the repository at this point in the history
  • Loading branch information
eljobe authored Jan 17, 2025
2 parents c8d46ed + 353207d commit 82074b7
Show file tree
Hide file tree
Showing 32 changed files with 499 additions and 178 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
run: ${{ github.workspace }}/.github/workflows/gotestsum.sh --tags stylustest --run TestProgramLong --timeout 60m --cover

- name: Archive detailed run log
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.test-mode }}-full.log
path: full.log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
echo -e "\x1b[1;34mWAVM module root:\x1b[0m $module_root"
- name: Upload WAVM machine as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wavm-machine-${{ steps.module-root.outputs.module-root }}
path: target/machines/latest/*
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ RUN rm -f /home/user/target/machines/latest
COPY --from=prover-export /bin/jit /usr/local/bin/
COPY --from=node-builder /workspace/target/bin/deploy /usr/local/bin/
COPY --from=node-builder /workspace/target/bin/seq-coordinator-invalidate /usr/local/bin/
COPY --from=node-builder /workspace/target/bin/mockexternalsigner /usr/local/bin/
COPY --from=module-root-calc /workspace/target/machines/latest/machine.wavm.br /home/user/target/machines/latest/
COPY --from=module-root-calc /workspace/target/machines/latest/until-host-io-state.bin /home/user/target/machines/latest/
COPY --from=module-root-calc /workspace/target/machines/latest/module-root.txt /home/user/target/machines/latest/
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ all: build build-replay-env test-gen-proofs
@touch .make/all

.PHONY: build
build: $(patsubst %,$(output_root)/bin/%, nitro deploy relay daserver datool seq-coordinator-invalidate nitro-val seq-coordinator-manager dbconv)
build: $(patsubst %,$(output_root)/bin/%, nitro deploy relay daserver datool mockexternalsigner seq-coordinator-invalidate nitro-val seq-coordinator-manager dbconv)
@printf $(done)

.PHONY: build-node-deps
Expand Down Expand Up @@ -314,6 +314,9 @@ $(output_root)/bin/daserver: $(DEP_PREDICATE) build-node-deps
$(output_root)/bin/datool: $(DEP_PREDICATE) build-node-deps
go build $(GOLANG_PARAMS) -o $@ "$(CURDIR)/cmd/datool"

$(output_root)/bin/mockexternalsigner: $(DEP_PREDICATE) build-node-deps
go build $(GOLANG_PARAMS) -o $@ "$(CURDIR)/cmd/mockexternalsigner"

$(output_root)/bin/seq-coordinator-invalidate: $(DEP_PREDICATE) build-node-deps
go build $(GOLANG_PARAMS) -o $@ "$(CURDIR)/cmd/seq-coordinator-invalidate"

Expand Down
61 changes: 23 additions & 38 deletions arbitrator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion arbitrator/tools/wasmer
Submodule wasmer updated 580 files
14 changes: 1 addition & 13 deletions arbitrator/wasm-libraries/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions arbnode/dataposter/data_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"github.com/ethereum/go-ethereum/signer/core/apitypes"

"github.com/offchainlabs/nitro/arbnode/dataposter/dbstorage"
"github.com/offchainlabs/nitro/arbnode/dataposter/externalsignertest"
"github.com/offchainlabs/nitro/arbnode/dataposter/noop"
redisstorage "github.com/offchainlabs/nitro/arbnode/dataposter/redis"
"github.com/offchainlabs/nitro/arbnode/dataposter/slice"
Expand Down Expand Up @@ -1297,6 +1298,21 @@ type ExternalSignerCfg struct {
InsecureSkipVerify bool `koanf:"insecure-skip-verify"`
}

func ExternalSignerTestCfg(addr common.Address, url string) (*ExternalSignerCfg, error) {
cp, err := externalsignertest.CertPaths()
if err != nil {
return nil, fmt.Errorf("getting certificates path: %w", err)
}
return &ExternalSignerCfg{
Address: common.Bytes2Hex(addr.Bytes()),
URL: url,
Method: externalsignertest.SignerMethod,
RootCA: cp.ServerCert,
ClientCert: cp.ClientCert,
ClientPrivateKey: cp.ClientKey,
}, nil
}

type DangerousConfig struct {
// This should be used with caution, only when dataposter somehow gets in a
// bad state and we require clearing it.
Expand Down
18 changes: 1 addition & 17 deletions arbnode/dataposter/dataposter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package dataposter
import (
"context"
"errors"
"fmt"
"math/big"
"testing"
"time"
Expand All @@ -25,21 +24,6 @@ import (
"github.com/offchainlabs/nitro/util/arbmath"
)

func signerTestCfg(addr common.Address, url string) (*ExternalSignerCfg, error) {
cp, err := externalsignertest.CertPaths()
if err != nil {
return nil, fmt.Errorf("getting certificates path: %w", err)
}
return &ExternalSignerCfg{
Address: common.Bytes2Hex(addr.Bytes()),
URL: url,
Method: externalsignertest.SignerMethod,
RootCA: cp.ServerCert,
ClientCert: cp.ClientCert,
ClientPrivateKey: cp.ClientKey,
}, nil
}

var (
blobTx = types.NewTx(
&types.BlobTx{
Expand Down Expand Up @@ -80,7 +64,7 @@ func TestExternalSigner(t *testing.T) {
return
}
}()
signerCfg, err := signerTestCfg(srv.Address, srv.URL())
signerCfg, err := ExternalSignerTestCfg(srv.Address, srv.URL())
if err != nil {
t.Fatalf("Error getting signer test config: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions arbnode/dataposter/externalsignertest/externalsignertest.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type CertAbsPaths struct {
type SignerServer struct {
*http.Server
*SignerAPI
listener net.Listener
Listener net.Listener
}

func basePath() (string, error) {
Expand Down Expand Up @@ -147,7 +147,7 @@ func (s *SignerServer) Start() error {
if err != nil {
return err
}
if err := s.ServeTLS(s.listener, cp.ServerCert, cp.ServerKey); err != nil && !errors.Is(err, http.ErrServerClosed) {
if err := s.ServeTLS(s.Listener, cp.ServerCert, cp.ServerKey); err != nil && !errors.Is(err, http.ErrServerClosed) {
return err
}
return nil
Expand Down
Loading

0 comments on commit 82074b7

Please sign in to comment.