From 008f533d9143b4a9305e34ecce99fda59733c434 Mon Sep 17 00:00:00 2001 From: drk Date: Sun, 13 Oct 2024 23:20:46 -0500 Subject: [PATCH] parameters are set to test colosseum, and base fee print --- core/genesis.go | 2 +- core/types/wo.go | 1 + params/config.go | 2 +- params/protocol_params.go | 15 +++++++-------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 3245caddb..bdf4acea6 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -370,7 +370,7 @@ func DefaultColosseumGenesisBlock(consensusEngine string, genesisNonce uint64) * Nonce: genesisNonce, ExtraData: hexutil.MustDecode("0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fb"), GasLimit: 5000000, - Difficulty: big.NewInt(1000000000), + Difficulty: big.NewInt(30000000000), } } diff --git a/core/types/wo.go b/core/types/wo.go index 8a3a23164..c32908623 100644 --- a/core/types/wo.go +++ b/core/types/wo.go @@ -492,6 +492,7 @@ func (wo *WorkObject) TransactionsInfo() map[string]interface{} { txInfo["coinbaseEtxInbound"] = coinbaseInboundEtx txInfo["conversionEtxOutbound"] = conversionOutboundEtx txInfo["conversionEtxInbound"] = conversionInboundEtx + txInfo["baseFee"] = wo.BaseFee() return txInfo } diff --git a/params/config.go b/params/config.go index 5a382cf1a..922df15c1 100644 --- a/params/config.go +++ b/params/config.go @@ -26,7 +26,7 @@ import ( // Genesis hashes to enforce below configs on. var ( // Progpow GenesisHashes - ProgpowColosseumGenesisHash = common.HexToHash("0x1ff6d28f14b993b75883c4611e8f9a8d157cd4e872e76f43c27c0bdfa0970069") + ProgpowColosseumGenesisHash = common.HexToHash("0x863406b0b535b316d4ae5a4d97336c0a015a36c0e5c055aa2e4461e9048b62c9") ProgpowGardenGenesisHash = common.HexToHash("0xb610af2eef9d854d01510785b0171247cb221912124c74fcef888bbed42448bb") ProgpowOrchardGenesisHash = common.HexToHash("0x863406b0b535b316d4ae5a4d97336c0a015a36c0e5c055aa2e4461e9048b62c9") ProgpowLighthouseGenesisHash = common.HexToHash("0xf60de17f1ae6cbae820d14599eb95581f5c18799f84904520c264be9cfff64c4") diff --git a/params/protocol_params.go b/params/protocol_params.go index 3eb0d3059..4ee7ec3ef 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -164,12 +164,11 @@ var ( OrchardGasCeil uint64 = 30000000 LighthouseGasCeil uint64 = 30000000 LocalGasCeil uint64 = 30000000 - DifficultyBoundDivisor = big.NewInt(2048) // The bound divisor of the difficulty, used in the update calculations. - DurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. - GardenDurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. - 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. + DurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. + GardenDurationLimit = big.NewInt(5) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. + 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 = 100 BlocksPerDay uint64 = new(big.Int).Div(big.NewInt(86400), DurationLimit).Uint64() // BlocksPerDay is the number of blocks per day assuming 12 second block time DifficultyAdjustmentPeriod = big.NewInt(720) // This is the number of blocks over which the average has to be taken @@ -180,11 +179,11 @@ var ( WorkSharesInclusionDepth = 3 // Number of blocks upto which the work shares can be referenced and this is protocol enforced LockupByteToBlockDepth = make(map[uint8]uint64) LockupByteToRewardsRatio = make(map[uint8]*big.Int) - ExchangeRate = big.NewInt(73170731707317073) // This is the initial exchange rate in Qi per Quai in Its/Qit + ExchangeRate = big.NewInt(86196385918997143) // This is the initial exchange rate in Qi per Quai in Its/Qit // Garden = big.NewInt(166666666666666667) // These numbers should be "equivalent" to the initial conversion rate QuaiToQiConversionBase = big.NewInt(10000000) // UNUSED Is the starting "historical conversion" in Qits for 10,000 Quai we need 10,000*1e3 QiToQuaiConversionBase = big.NewInt(10000000) // UNUSED Is the starting "historical conversion" in Qits for 10,000 Qi we need 10,000*1e3 - OneOverKqi = big.NewInt(3e12) // This is the number of hashes need to get 1 Qit. 3e9 is ~$0.001 + OneOverKqi = big.NewInt(30000000) // This is the number of hashes need to get 1 Qit. 3e9 is ~$0.001 // = big.NewInt(500) MaxTimeDiffBetweenBlocks int64 = 100 // Max time difference between the blocks to 100 secs OneOverAlpha = big.NewInt(200) // The alpha value for the quai to qi conversion ControllerKickInBlock uint64 = 1000000000