From cfb1a1123e0aeee724191009dc38c2e89e16a318 Mon Sep 17 00:00:00 2001 From: Zehui Zheng Date: Thu, 12 Dec 2024 21:10:02 -0800 Subject: [PATCH] adjust env config --- Makefile | 5 ++--- internal/config/config.go | 4 +--- internal/config/generate/Config.toml | 10 ---------- internal/config/generated.go | 12 ------------ 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index b972f75f..4bebb464 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ env: @echo export CARTESI_TEST_POSTGRES_ENDPOINT="postgres://test_user:password@localhost:5432/test_rollupsdb?sslmode=disable" @echo export CARTESI_TEST_MACHINE_IMAGES_PATH=\"$(CARTESI_TEST_MACHINE_IMAGES_PATH)\" @echo export PATH=$(CURDIR):$$PATH - @echo export ESPRESSO_BASE_URL="https://query.decaf.testnet.espresso.network/v0" - @echo export ESPRESSO_STARTING_BLOCK="882494" + @echo export ESPRESSO_BASE_URL="https://query.decaf.testnet.espresso.network" + @echo export ESPRESSO_STARTING_BLOCK="977675" @echo export ESPRESSO_NAMESPACE="55555" - @echo export MAIN_SEQUENCER="espresso" # set to either espresso or ethereum diff --git a/internal/config/config.go b/internal/config/config.go index 34d4dc85..1b276ab0 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -39,7 +39,6 @@ type NodeConfig struct { EspressoStartingBlock uint64 EspressoNamespace uint64 EspressoServiceEndpoint string - MainSequencer string } // Auth is used to sign transactions. @@ -98,11 +97,10 @@ func FromEnv() NodeConfig { config.AdvancerPollingInterval = GetAdvancerPollingInterval() config.ValidatorPollingInterval = GetValidatorPollingInterval() config.ClaimerPollingInterval = GetClaimerPollingInterval() - config.EspressoBaseUrl = GetBaseUrl() + config.EspressoBaseUrl = GetBaseUrl() + "/v0" config.EspressoStartingBlock = GetStartingBlock() config.EspressoNamespace = GetNamespace() config.EspressoServiceEndpoint = GetServiceEndpoint() - config.MainSequencer = GetSequencer() return config } diff --git a/internal/config/generate/Config.toml b/internal/config/generate/Config.toml index 66777b2d..8c58bc2a 100644 --- a/internal/config/generate/Config.toml +++ b/internal/config/generate/Config.toml @@ -244,16 +244,6 @@ go-type = "string" description = """ URL to Espresso nonce and submit service""" -# -# Sequencer -# - -[sequencer.MAIN_SEQUENCER] -default = "espresso" -go-type = "string" -description = """ -Main sequencer.""" - # # Temporary # diff --git a/internal/config/generated.go b/internal/config/generated.go index 83d3b890..3afc8f2a 100644 --- a/internal/config/generated.go +++ b/internal/config/generated.go @@ -504,18 +504,6 @@ func GetValidatorPollingInterval() Duration { return val } -func GetSequencer() string { - s, ok := os.LookupEnv("MAIN_SEQUENCER") - if !ok { - s = "espresso" - } - val, err := toString(s) - if err != nil { - panic(fmt.Sprintf("failed to parse MAIN_SEQUENCER: %v", err)) - } - return val -} - func GetSnapshotDir() string { s, ok := os.LookupEnv("CARTESI_SNAPSHOT_DIR") if !ok {