Skip to content

Commit

Permalink
Merge pull request #27 from Layr-Labs/epociask--update-plasma-commit
Browse files Browse the repository at this point in the history
fix: Update plasma encoding && update e2e_test
  • Loading branch information
ethenotethan authored Jun 6, 2024
2 parents c8b5c14 + 38e3df2 commit c26c709
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
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

0 comments on commit c26c709

Please sign in to comment.