From c4a4992efa16ffeec89512327e53c47da8c735d2 Mon Sep 17 00:00:00 2001 From: robertlincecum Date: Thu, 6 Mar 2025 09:53:49 -0600 Subject: [PATCH 1/4] removed time to start tx --- params/protocol_params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/protocol_params.go b/params/protocol_params.go index d3396e94ff..0a0f30ff5d 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -168,7 +168,7 @@ var ( OrchardDurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. LighthouseDurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. LocalDurationLimit = big.NewInt(1) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. - TimeToStartTx uint64 = 15 * BlocksPerDay + TimeToStartTx uint64 = 0 BlocksPerDay uint64 = new(big.Int).Div(big.NewInt(86400), DurationLimit).Uint64() // BlocksPerDay is the number of blocks per day assuming 5 second block time BlocksPerWeek uint64 = 7 * BlocksPerDay BlocksPerMonth uint64 = 30 * BlocksPerDay From c06d7a85a686ce72f341b6e90250d14b9ce43041 Mon Sep 17 00:00:00 2001 From: robertlincecum Date: Thu, 6 Mar 2025 10:10:59 -0600 Subject: [PATCH 2/4] tag go-quai image with latest --- .github/workflows/antithesis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/antithesis.yml b/.github/workflows/antithesis.yml index f3aa9c229d..4cd6e457e7 100644 --- a/.github/workflows/antithesis.yml +++ b/.github/workflows/antithesis.yml @@ -38,7 +38,9 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: us-central1-docker.pkg.dev/molten-verve-216720/dominant-repository/go-quai:${{ env.IMAGE_TAG }} + tags: | + us-central1-docker.pkg.dev/molten-verve-216720/dominant-repository/go-quai:${{ env.IMAGE_TAG }} + us-central1-docker.pkg.dev/molten-verve-216720/dominant-repository/go-quai:latest cache-to: type=inline - name: Run Antithesis Test From 43c0ccd3b1095ea58310cc9c9a8de920f8c7c2c2 Mon Sep 17 00:00:00 2001 From: robertlincecum Date: Thu, 6 Mar 2025 12:03:57 -0600 Subject: [PATCH 3/4] conditionally set time for transactions to 0 if Lighthouse --- cmd/utils/flags.go | 1 + params/protocol_params.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 42d9286d1d..8e7591b6f9 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1232,6 +1232,7 @@ func setConsensusEngineConfig(cfg *quaiconfig.Config) { cfg.Progpow.DurationLimit = params.LighthouseDurationLimit cfg.Progpow.GasCeil = params.LighthouseGasCeil cfg.Progpow.MinDifficulty = new(big.Int).Div(core.DefaultLighthouseGenesisBlock(cfg.ConsensusEngine, cfg.GenesisNonce, cfg.GenesisExtra).Difficulty, common.Big2) + params.TimeToStartTx = 0 case params.LocalName: cfg.Progpow.DurationLimit = params.LocalDurationLimit cfg.Progpow.GasCeil = params.LocalGasCeil diff --git a/params/protocol_params.go b/params/protocol_params.go index 0a0f30ff5d..d3396e94ff 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -168,7 +168,7 @@ var ( OrchardDurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. LighthouseDurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. LocalDurationLimit = big.NewInt(1) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. - TimeToStartTx uint64 = 0 + TimeToStartTx uint64 = 15 * BlocksPerDay BlocksPerDay uint64 = new(big.Int).Div(big.NewInt(86400), DurationLimit).Uint64() // BlocksPerDay is the number of blocks per day assuming 5 second block time BlocksPerWeek uint64 = 7 * BlocksPerDay BlocksPerMonth uint64 = 30 * BlocksPerDay From 4310e4027d3c8525df6d88c00dd7a7d6d66494be Mon Sep 17 00:00:00 2001 From: robertlincecum Date: Thu, 6 Mar 2025 15:37:04 -0600 Subject: [PATCH 4/4] change TimeToStartTx to 0 in Dockerfile --- Dockerfile | 6 ++++++ cmd/utils/flags.go | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f2f8648d5..f94f082955 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,12 @@ RUN go mod download # Copy the source code COPY . . +# Modify params/protocol_params.go before building +RUN sed -i 's/TimeToStartTx[[:space:]]*uint64[[:space:]]*=[[:space:]]*15 \* BlocksPerDay/TimeToStartTx uint64 = 0/' params/protocol_params.go + +# Verify the modification (optional, remove if not needed) +RUN grep "TimeToStartTx" params/protocol_params.go + # Build the Go app using the Makefile RUN make go-quai diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 8e7591b6f9..42d9286d1d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1232,7 +1232,6 @@ func setConsensusEngineConfig(cfg *quaiconfig.Config) { cfg.Progpow.DurationLimit = params.LighthouseDurationLimit cfg.Progpow.GasCeil = params.LighthouseGasCeil cfg.Progpow.MinDifficulty = new(big.Int).Div(core.DefaultLighthouseGenesisBlock(cfg.ConsensusEngine, cfg.GenesisNonce, cfg.GenesisExtra).Difficulty, common.Big2) - params.TimeToStartTx = 0 case params.LocalName: cfg.Progpow.DurationLimit = params.LocalDurationLimit cfg.Progpow.GasCeil = params.LocalGasCeil