Skip to content
Merged
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
13 changes: 13 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@ target "op-batcher" {
tags = [for tag in split(",", IMAGE_TAGS) : "${REGISTRY}/${REPOSITORY}/op-batcher:${tag}"]
}

target "op-batcher-enclave" {
dockerfile = "ops/docker/op-stack-go/Dockerfile"
context = "."
args = {
GIT_COMMIT = "${GIT_COMMIT}"
GIT_DATE = "${GIT_DATE}"
OP_BATCHER_VERSION = "${OP_BATCHER_VERSION}"
}
target = "op-batcher-enclave-target"
platforms = split(",", PLATFORMS)
tags = [for tag in split(",", IMAGE_TAGS) : "${REGISTRY}/${REPOSITORY}/op-batcher-enclave:${tag}"]
}

target "op-proposer" {
dockerfile = "ops/docker/op-stack-go/Dockerfile"
context = "."
Expand Down
46 changes: 46 additions & 0 deletions espresso/enclave-tests/enclave_smoke_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Steps to run these tests on a Nitro-enabled EC2 machine:
//
// - Run `just op-batcher-enclave-image` in kurtosis-devnet/ folder
// This is just to warm up the docker build cache, otherwise
// tests may time out building the batcher image from scratch
//
// - `export ESPRESSO_RUN_ENCLAVE_TESTS=true`
// Enclave tests are skipped by default
//
// - `go test ./espresso/enclave-tests/...`
// Run the tests
package enclave_tests

import (
"context"
"testing"

env "github.com/ethereum-optimism/optimism/espresso/environment"
)

// TestE2eDevNetWithEspressoSimpleTransactions launches the e2e Dev Net with the Espresso Dev Node
// and runs a couple of simple transactions to it.
func TestE2eDevNetWithEspressoSimpleTransactions(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

env.RunOnlyWithEnclave(t)

launcher := new(env.EspressoDevNodeLauncherDocker)
launcher.EnclaveBatcher = true

system, espressoDevNode, err := launcher.StartDevNet(ctx, t)
if have, want := err, error(nil); have != want {
t.Fatalf("failed to start dev environment with espresso dev node:\nhave:\n\t\"%v\"\nwant:\n\t\"%v\"\n", have, want)
}

// Signal the testnet to shut down on exit
defer env.Stop(t, espressoDevNode)
defer env.Stop(t, system)
// Send Transaction on L1, and wait for verification on the L2 Verifier
env.RunSimpleL1TransferAndVerifier(ctx, t, system)

// Submit a Transaction on the L2 Sequencer node, to a Burn Address
env.RunSimpleL2Burn(ctx, t, system)

}
Loading