Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update plasma encoding && update e2e_test #27

Merged
merged 1 commit into from
Jun 6, 2024
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test:
go test -v ./...

e2e-test: submodules srs
go test -timeout 50m -v -testnet-integration ./test/e2e_test.go
go test -timeout 50m -v ./test/e2e_test.go -testnet-integration

.PHONY: lint
lint:
Expand Down
2 changes: 1 addition & 1 deletion eigenda/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
type Commitment []byte

func (c Commitment) Encode() []byte {
return append([]byte{byte(EigenDA), byte(EigenV0)}, c...)
return append([]byte{byte(op_plasma.GenericCommitmentType), byte(EigenDA), byte(EigenV0)}, c...)
}

// DecodeCommitment verifies and decodes an EigenDACommit from raw encoded bytes.
Expand Down
11 changes: 9 additions & 2 deletions test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"testing"
"time"

plasma "github.com/Layr-Labs/eigenda-proxy"
proxy "github.com/Layr-Labs/eigenda-proxy"
"github.com/Layr-Labs/eigenda-proxy/eigenda"
"github.com/Layr-Labs/eigenda-proxy/metrics"
Expand All @@ -32,6 +31,7 @@ func init() {

// Use of single port makes tests incapable of running in parallel
const (
privateKey = "SIGNER_PRIVATE_KEY"
transport = "http"
serviceName = "eigenda_proxy"
host = "127.0.0.1"
Expand All @@ -42,12 +42,18 @@ const (
type TestSuite struct {
ctx context.Context
log log.Logger
server *plasma.DAServer
server *proxy.DAServer
}

func createTestSuite(t *testing.T) (TestSuite, func()) {
ctx := context.Background()

// load signer key from environment
pk := os.Getenv(privateKey)
if pk == "" {
t.Fatal("SIGNER_PRIVATE_KEY environment variable not set")
}

log := oplog.NewLogger(os.Stdout, oplog.CLIConfig{
Level: log.LevelDebug,
Format: oplog.FormatLogFmt,
Expand All @@ -62,6 +68,7 @@ func createTestSuite(t *testing.T) (TestSuite, func()) {
StatusQueryTimeout: time.Minute * 45,
StatusQueryRetryInterval: time.Second * 1,
DisableTLS: false,
SignerPrivateKeyHex: pk,
},
}

Expand Down
Loading