Skip to content

Commit

Permalink
Enable hyperlane's message verification plugin. (#1839)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgenii Akentev authored Feb 29, 2024
1 parent baae635 commit 854918e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/Chainweb/Version/Mainnet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Chainweb.Version.Mainnet(mainnet, pattern Mainnet01) where

import Control.Lens
import qualified Data.HashMap.Strict as HM
import qualified Data.Set as Set

import Chainweb.BlockCreationTime
import Chainweb.BlockHeight
Expand All @@ -21,6 +22,8 @@ import Chainweb.Utils.Rule
import Chainweb.Version
import P2P.BootstrapNodes

import Pact.Types.Verifier

import qualified Chainweb.BlockHeader.Genesis.Mainnet0Payload as MN0
import qualified Chainweb.BlockHeader.Genesis.Mainnet1Payload as MN1
import qualified Chainweb.BlockHeader.Genesis.Mainnet2Payload as MN2
Expand Down Expand Up @@ -144,7 +147,7 @@ mainnet = ChainwebVersion
Chainweb221Pact -> AllChains (ForkAtBlockHeight $ BlockHeight 4_177_889) -- 2023-10-20 00:00:00+00:00
Chainweb222Pact -> AllChains (ForkAtBlockHeight $ BlockHeight 4_335_753) -- 2023-12-14 00:00:00+00:00
Chainweb223Pact -> AllChains (ForkAtBlockHeight $ BlockHeight 4_577_530) -- 2024-03-07 00:00:00+00:00
Chainweb224Pact -> AllChains ForkNever -- TODO: don't forget to enable the hyperlane_v3_message verifier plugin
Chainweb224Pact -> AllChains ForkNever

, _versionGraphs =
(to20ChainsMainnet, twentyChainGraph) `Above`
Expand Down Expand Up @@ -206,5 +209,6 @@ mainnet = ChainwebVersion
{ _disablePeerValidation = False
, _disableMempoolSync = False
}
, _versionVerifierPluginNames = AllChains $ End mempty
, _versionVerifierPluginNames = AllChains $ (4_577_530, Set.fromList $ map VerifierName ["hyperlane_v3_message"]) `Above`
End mempty
}
6 changes: 5 additions & 1 deletion src/Chainweb/Version/RecapDevelopment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
module Chainweb.Version.RecapDevelopment(recapDevnet, pattern RecapDevelopment) where

import qualified Data.HashMap.Strict as HM
import qualified Data.Set as Set

import Chainweb.BlockCreationTime
import Chainweb.BlockHeight
Expand All @@ -19,6 +20,8 @@ import Chainweb.Utils
import Chainweb.Utils.Rule
import Chainweb.Version

import Pact.Types.Verifier

import qualified Chainweb.BlockHeader.Genesis.RecapDevelopment0Payload as RDN0
import qualified Chainweb.BlockHeader.Genesis.RecapDevelopment1to9Payload as RDNN
import qualified Chainweb.BlockHeader.Genesis.RecapDevelopment10to19Payload as RDNKAD
Expand Down Expand Up @@ -112,5 +115,6 @@ recapDevnet = ChainwebVersion
{ _disablePeerValidation = True
, _disableMempoolSync = False
}
, _versionVerifierPluginNames = AllChains (End mempty)
, _versionVerifierPluginNames = AllChains $ (600, Set.fromList $ map VerifierName ["hyperlane_v3_message"]) `Above`
End mempty
}
6 changes: 5 additions & 1 deletion src/Chainweb/Version/Testnet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Chainweb.Version.Testnet(testnet, pattern Testnet04) where

import Control.Lens
import qualified Data.HashMap.Strict as HM
import qualified Data.Set as Set

import Chainweb.BlockCreationTime
import Chainweb.BlockHeight
Expand All @@ -21,6 +22,8 @@ import Chainweb.Utils.Rule
import Chainweb.Version
import P2P.BootstrapNodes

import Pact.Types.Verifier

import qualified Chainweb.Pact.Transactions.CoinV3Transactions as CoinV3
import qualified Chainweb.Pact.Transactions.CoinV4Transactions as CoinV4
import qualified Chainweb.Pact.Transactions.CoinV5Transactions as CoinV5
Expand Down Expand Up @@ -177,5 +180,6 @@ testnet = ChainwebVersion
{ _disablePeerValidation = False
, _disableMempoolSync = False
}
, _versionVerifierPluginNames = AllChains $ End mempty
, _versionVerifierPluginNames = AllChains $ (4_100_681, Set.fromList $ map VerifierName ["hyperlane_v3_message"]) `Above`
End mempty
}

0 comments on commit 854918e

Please sign in to comment.