-
Notifications
You must be signed in to change notification settings - Fork 1
Testnet06 Creation #22
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| code: |- | ||
| (coin.create-allocation-account "allocation00" (time "1900-10-15T18:00:00Z") "allocation00" 1000000.0) | ||
| (coin.create-allocation-account "allocation01" (time "2026-01-31T18:00:00Z") "allocation01" 1000000.0) | ||
| (coin.create-allocation-account "allocation02" (time "2026-06-31T18:00:00Z") "allocation02" 1000000.0) | ||
| nonce: testnet-allocations-0 | ||
| keyPairs: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Internal testnet accounts | ||
| code: |- | ||
| (coin.coinbase "sender0" (read-keyset "sender0") 1.0) | ||
| (coin.coinbase "pascal" (read-keyset "pascal") 100000.0) | ||
| (coin.coinbase "edmund" (read-keyset "edmund") 100000.0) | ||
| (coin.coinbase "jose" (read-keyset "jose") 100000.0) | ||
| (coin.coinbase "jumbo" (read-keyset "jumbo") 100000.0) | ||
| (coin.coinbase "philipp" (read-keyset "edmund") 100000.0) | ||
| (coin.coinbase "louis" (read-keyset "louis") 100000.0) | ||
|
|
||
|
|
||
| data: | ||
| sender0: ["c03e76c81a56f831a1ea91b93545d6b49daffc53c7416e065fcffb025faee47e"] | ||
| pascal: ["85e745b37605de2e4be123c8e9e65404227912c429e45f87b348b5c19ffb1f38"] | ||
| edmund: ["bb42ed45d8f2676b0b75cc11abe834f8287841322271ba574011e4fdf23631b7"] | ||
| jose: ["f5a17c5fd9f9d2623ba5e6283de1445f694c0d5a6f7df7b6a44a4f887b3e9eae"] | ||
| jumbo: ["eeb0fca9d4d8a72178e4d150152858484a63c27d3991caf48cc9003479156f00"] | ||
| philipp: ["3c7cd44578bb90b793e62a10f05a99ce9a2e0f067fbb4ff094d19e13a279ef9b"] | ||
| louis: ["c389e2fab9fabdc2958d3d9916ea7899f35b906d192b69f211a79bb4c2379bcf"] | ||
| nonce: testnet06-grants-0 | ||
| keyPairs: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Internal testnet accounts | ||
| code: |- | ||
| (coin.coinbase "sender0" (read-keyset "sender0") 1.0) | ||
|
|
||
| data: | ||
| sender0: ["c03e76c81a56f831a1ea91b93545d6b49daffc53c7416e065fcffb025faee47e"] | ||
| nonce: testnet06-grants-N | ||
| keyPairs: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| code: |- | ||
| (define-keyset "allocation00" (read-keyset "allocation00")) | ||
| (define-keyset "allocation01" (read-keyset "allocation01")) | ||
| (define-keyset "allocation02" (read-keyset "allocation02")) | ||
|
|
||
| data: | ||
| allocation00: ["f8a1c425cb65899ae0bf0dd4c6a982554f2ce8914c5084446f4999c3c0019990"] | ||
| allocation01: ["e55612401fb67190d3c0a905749264806a3b66c9b9d048b84b96e120e4a387dc"] | ||
| allocation02: ["d2502cdab08ef8649090e924d0fd69ce89c2c314fb52bf54405769aa5b425eeb"] | ||
|
|
||
| nonce: testnet06-keysets-N | ||
| keyPairs: [] |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| {-# language LambdaCase #-} | ||
| {-# language NumericUnderscores #-} | ||
| {-# language OverloadedStrings #-} | ||
| {-# language PatternSynonyms #-} | ||
| {-# language QuasiQuotes #-} | ||
| {-# language ViewPatterns #-} | ||
|
|
||
| module Chainweb.Version.Testnet06(testnet06, pattern Testnet06) where | ||
|
|
||
| import qualified Data.HashMap.Strict as HM | ||
| import qualified Data.Set as Set | ||
|
|
||
| import Chainweb.BlockCreationTime | ||
| import Chainweb.BlockHeight | ||
| import Chainweb.ChainId | ||
| import Chainweb.Difficulty | ||
| import Chainweb.Graph | ||
| import Chainweb.Time | ||
| import Chainweb.Utils | ||
| import Chainweb.Utils.Rule | ||
| import Chainweb.Version | ||
| import P2P.BootstrapNodes | ||
|
|
||
| import Pact.Types.Verifier | ||
|
|
||
| import qualified Chainweb.Pact.Transactions.OtherTransactions as CoinV2 | ||
| import qualified Chainweb.Pact.Transactions.CoinV3Transactions as CoinV3 | ||
| import qualified Chainweb.Pact.Transactions.CoinV4Transactions as CoinV4 | ||
| import qualified Chainweb.Pact.Transactions.CoinV5Transactions as CoinV5 | ||
| import qualified Chainweb.Pact.Transactions.CoinV6Transactions as CoinV6 | ||
|
|
||
| import qualified Chainweb.BlockHeader.Genesis.Testnet060Payload as TST0 | ||
| import qualified Chainweb.BlockHeader.Genesis.Testnet061to19Payload as TSTN | ||
|
|
||
| pattern Testnet06 :: ChainwebVersion | ||
| pattern Testnet06 <- ((== testnet06) -> True) where | ||
| Testnet06 = testnet06 | ||
|
|
||
| testnet06 :: ChainwebVersion | ||
| testnet06 = ChainwebVersion | ||
| { _versionCode = ChainwebVersionCode 0x00000008 | ||
| , _versionName = ChainwebVersionName "testnet06" | ||
|
|
||
| , _versionForks = tabulateHashMap $ \case | ||
| SlowEpoch -> AllChains $ ForkAtBlockHeight $ BlockHeight 0 | ||
| Vuln797Fix -> AllChains $ ForkAtBlockHeight $ BlockHeight 0 | ||
| PactBackCompat_v16 -> AllChains $ ForkAtBlockHeight $ BlockHeight 0 | ||
| OldTargetGuard -> AllChains $ ForkAtBlockHeight $ BlockHeight 0 | ||
| SkipFeatureFlagValidation -> AllChains $ ForkAtBlockHeight $ BlockHeight 0 | ||
| SkipTxTimingValidation -> AllChains $ ForkAtBlockHeight $ BlockHeight 2 | ||
| ModuleNameFix -> AllChains $ ForkAtBlockHeight $ BlockHeight 2 | ||
| ModuleNameFix2 -> AllChains $ ForkAtBlockHeight $ BlockHeight 2 | ||
| CoinV2 -> onChains $ [(unsafeChainId 0, ForkAtBlockHeight $ BlockHeight 3)] <> [(unsafeChainId i, ForkAtBlockHeight $ BlockHeight 4) | i <- [1..19]] | ||
| OldDAGuard -> AllChains $ ForkAtBlockHeight $ BlockHeight 13 | ||
| PactEvents -> AllChains $ ForkAtBlockHeight $ BlockHeight 40 | ||
| SPVBridge -> AllChains $ ForkAtBlockHeight $ BlockHeight 50 | ||
| Pact4Coin3 -> AllChains $ ForkAtBlockHeight $ BlockHeight 80 | ||
| Pact42 -> AllChains $ ForkAtBlockHeight $ BlockHeight 90 | ||
| EnforceKeysetFormats -> AllChains $ ForkAtBlockHeight $ BlockHeight 100 | ||
| CheckTxHash -> AllChains $ ForkAtBlockHeight $ BlockHeight 110 | ||
| Chainweb213Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 95 | ||
| Chainweb214Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 115 | ||
| Chainweb215Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 165 | ||
| Pact44NewTrans -> AllChains $ ForkAtBlockHeight $ BlockHeight 185 | ||
| Chainweb216Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 215 | ||
| Chainweb217Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 470 | ||
| Chainweb218Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 500 | ||
| Chainweb219Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 550 | ||
| Chainweb220Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 560 | ||
| Chainweb221Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 580 | ||
| Chainweb222Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 590 | ||
| Chainweb223Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 600 | ||
| Chainweb224Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 610 | ||
| Chainweb225Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 620 | ||
| Pact5Fork -> AllChains $ ForkAtBlockHeight $ BlockHeight 640 | ||
| Chainweb228Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 650 | ||
| Chainweb230Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 680 | ||
| Chainweb231Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 690 | ||
| Chainweb31 -> AllChains $ ForkAtBlockHeight $ BlockHeight 700 | ||
|
Comment on lines
+45
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may as well activate these at genesis. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not activate step by step ? More fun ... lol. |
||
| MigratePlatformShare -> AllChains $ ForkNever | ||
|
|
||
| , _versionUpgrades = foldr (chainZip HM.union) (AllChains mempty) | ||
| [ indexByForkHeights testnet06 | ||
| [ (CoinV2, AllChains (Pact4Upgrade CoinV2.transactions False)) | ||
| , (Pact4Coin3, AllChains (Pact4Upgrade CoinV3.transactions True)) | ||
| , (Chainweb214Pact, AllChains (Pact4Upgrade CoinV4.transactions True)) | ||
| , (Chainweb215Pact, AllChains (Pact4Upgrade CoinV5.transactions True)) | ||
| , (Chainweb223Pact, AllChains (Pact4Upgrade CoinV6.transactions False)) | ||
| ] | ||
| ] | ||
|
|
||
| , _versionGraphs = Bottom (minBound, twentyChainGraph) | ||
| , _versionBlockDelay = BlockDelay 30_000_000 | ||
| , _versionWindow = WindowWidth 120 | ||
| , _versionHeaderBaseSizeBytes = 318 - 110 | ||
| , _versionBootstraps = domainAddr2PeerInfo testnet06BootstrapHosts | ||
| , _versionGenesis = VersionGenesis | ||
| { _genesisBlockTarget = onChains $ concat | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is probably good, it should work for CPU mining. |
||
| [ [(unsafeChainId i, HashTarget $ maxBound `div` 100_000) | i <- [0..19]] | ||
| ] | ||
| , _genesisTime = AllChains $ BlockCreationTime [timeMicrosQQ| 2026-02-16T08:15:00.000000 |] | ||
| , _genesisBlockPayload = onChains $ concat | ||
| [ [(unsafeChainId 0, TST0.payloadBlock)] | ||
| , [(unsafeChainId i, TSTN.payloadBlock) | i <- [1..19]] | ||
| ] | ||
| } | ||
|
|
||
| , _versionMaxBlockGasLimit = Bottom (minBound, Just 180_000) | ||
| , _versionSpvProofRootValidWindow = Bottom (minBound, Nothing) | ||
| , _versionCheats = VersionCheats | ||
| { _disablePow = False | ||
| , _fakeFirstEpochStart = False | ||
| , _disablePact = False | ||
| } | ||
| , _versionDefaults = VersionDefaults | ||
| { _disablePeerValidation = False | ||
| , _disableMempoolSync = False | ||
| } | ||
| , _versionVerifierPluginNames = AllChains $ | ||
| (600, Set.fromList $ map VerifierName ["hyperlane_v3_message"]) `Above` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly you can just activate this from genesis. |
||
| Bottom (minBound, mempty) | ||
| , _versionQuirks = noQuirks | ||
| , _versionForkNumber = 0 | ||
| , _versionForkVoteCastingLength = 120 * 119 -- 5 days | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using up to date coin/ns contracts here, see the devnet ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes together with the "progressives forks", or "Fork all at Genesis".
If the "Progressive fork" solution is used, Coin V1 should be used at genesis. Cause more recent versions of coin requires modern Pact versions.