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(taiko-client): avoid using empty p2pSigner when start preconf p2p server #18980

Closed
wants to merge 6 commits into from
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
6 changes: 6 additions & 0 deletions packages/taiko-client/driver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/taikoxyz/taiko-mono/packages/taiko-client/cmd/flags"
"github.com/taikoxyz/taiko-mono/packages/taiko-client/pkg/jwt"
"github.com/taikoxyz/taiko-mono/packages/taiko-client/pkg/rpc"
"github.com/taikoxyz/taiko-mono/packages/taiko-client/pkg/utils"
)

// Config contains the configurations to initialize a Taiko driver.
Expand Down Expand Up @@ -126,6 +127,11 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
return nil, err
}

// Check if the P2P signer setup is empty.
if c.Uint64(flags.PreconfBlockServerPort.Name) > 0 && utils.IsNil(signerConfigs) {
return nil, errors.New("`--p2p.sequencer.key` flag is required for preconfirmation server")
}

return &Config{
ClientConfig: clientConfig,
RetryInterval: c.Duration(flags.BackOffRetryInterval.Name),
Expand Down
5 changes: 5 additions & 0 deletions packages/taiko-client/integration_test/test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export TEST_ACCOUNT_PRIVATE_KEY=0x7c852118294e51e653712a81e05800f419141751be58f6
export TREASURY=0x1670010000000000000000000000000000010001
export VERBOSITY=${VERBOSITY-3}

# Preconf p2p variables.
export PRECONFIRMATION_P2P_DISCOVERY_PATH=memory
export PRECONFIRMATION_P2P_PEERSTORE_PATH=memory
export PRECONFIRMATION_P2P_NO_DISCOVERY=true

# show the integration test environment variables.
# L1_BEACON=$L1_BEACON
echo "RUN_TESTS=true
Expand Down