From 2ed73070795c385fe59595a67259bd853f84b70d Mon Sep 17 00:00:00 2001 From: Evgenii Akentev Date: Tue, 4 Jun 2024 15:36:25 +0400 Subject: [PATCH] Divorce transactionExec between pact4 and pact5 Rework pact errors --- bench/Chainweb/Pact/Backend/ForkingBench.hs | 2 +- cabal.project | 13 +- src/Chainweb/Chainweb.hs | 17 +- src/Chainweb/Chainweb/ChainResources.hs | 4 +- src/Chainweb/Mempool/Consensus.hs | 12 +- src/Chainweb/Mempool/Mempool.hs | 10 +- src/Chainweb/Miner/Miners.hs | 2 +- src/Chainweb/Pact/Backend/Types.hs | 4 +- src/Chainweb/Pact/PactService.hs | 32 +-- src/Chainweb/Pact/PactService/ExecBlock.hs | 63 +++-- src/Chainweb/Pact/RestAPI/Server.hs | 14 +- src/Chainweb/Pact/Service/BlockValidation.hs | 4 +- src/Chainweb/Pact/Service/PactInProcApi.hs | 4 +- src/Chainweb/Pact/Service/Types.hs | 4 +- src/Chainweb/Pact/TransactionExec.hs | 216 +++++++++++------- .../Transactions/CoinCoreV4Transactions.hs | 4 +- .../Pact/Transactions/CoinV3Transactions.hs | 4 +- .../Pact/Transactions/CoinV4Transactions.hs | 4 +- .../Pact/Transactions/CoinV5Transactions.hs | 4 +- .../Pact/Transactions/CoinV6Transactions.hs | 4 +- .../Transactions/FungibleV2Transactions.hs | 4 +- .../Pact/Transactions/Mainnet0Transactions.hs | 4 +- .../Pact/Transactions/Mainnet1Transactions.hs | 4 +- .../Pact/Transactions/Mainnet2Transactions.hs | 4 +- .../Pact/Transactions/Mainnet3Transactions.hs | 4 +- .../Pact/Transactions/Mainnet4Transactions.hs | 4 +- .../Pact/Transactions/Mainnet5Transactions.hs | 4 +- .../Pact/Transactions/Mainnet6Transactions.hs | 4 +- .../Pact/Transactions/Mainnet7Transactions.hs | 4 +- .../Pact/Transactions/Mainnet8Transactions.hs | 4 +- .../Pact/Transactions/Mainnet9Transactions.hs | 4 +- .../Transactions/MainnetKADTransactions.hs | 4 +- .../Pact/Transactions/OtherTransactions.hs | 4 +- .../RecapDevelopmentTransactions.hs | 4 +- src/Chainweb/Pact/Types.hs | 27 ++- src/Chainweb/Rosetta/RestAPI/Server.hs | 8 +- src/Chainweb/Transaction.hs | 31 ++- src/Chainweb/Version.hs | 4 +- src/Chainweb/Version/Guards.hs | 4 + src/Chainweb/WebPactExecutionService.hs | 4 +- test/Chainweb/Test/Pact/Checkpointer.hs | 8 +- test/Chainweb/Test/Pact/PactExec.hs | 4 +- .../Chainweb/Test/Pact/PactSingleChainTest.hs | 16 +- test/Chainweb/Test/Pact/SPV.hs | 4 +- test/Chainweb/Test/Pact/TransactionTests.hs | 4 +- test/Chainweb/Test/Pact/Utils.hs | 2 +- test/Chainweb/Test/TestVersions.hs | 10 +- tools/cwtool/TxSimulator.hs | 2 +- tools/ea/Ea.hs | 14 +- 49 files changed, 367 insertions(+), 252 deletions(-) diff --git a/bench/Chainweb/Pact/Backend/ForkingBench.hs b/bench/Chainweb/Pact/Backend/ForkingBench.hs index 99ecb79974..1c4a0186f8 100644 --- a/bench/Chainweb/Pact/Backend/ForkingBench.hs +++ b/bench/Chainweb/Pact/Backend/ForkingBench.hs @@ -488,7 +488,7 @@ safeCapitalize = maybe [] (uncurry (:) . bimap toUpper (Prelude.map toLower)) . -- TODO: Use the new `assertCommand` function. -validateCommand :: Command Text -> Either String ChainwebTransaction +validateCommand :: Command Text -> Either String Pact4Transaction validateCommand cmdText = case verifyCommand cmdBS of ProcSucc cmd -> Right (mkPayloadWithTextOld <$> cmd) ProcFail err -> Left err diff --git a/cabal.project b/cabal.project index 5ecadacbb9..52d0566d3d 100644 --- a/cabal.project +++ b/cabal.project @@ -69,6 +69,9 @@ package vault package yet-another-logger flags: -tbmqueue +packages: + ../pact-core + -- -------------------------------------------------------------------------- -- -- Source Repository Packages -- @@ -83,11 +86,11 @@ source-repository-package tag: 9ccef1fbeff545f07864896094eb2e2bd4c5ffb3 --sha256: 0pai52mvyikhm527if4gxa1nwsmva3wg3nhvida7qg48rchjrxry -source-repository-package - type: git - location: https://github.com/kadena-io/pact-5.git - tag: c065ebd60ea0460a98779968200e943044fe4939 - --sha256: sha256-pSDMa5QZDF5/dsccDgZFQMfhgo+/HjDqc0m9W9h7m3g= +-- source-repository-package +-- type: git +-- location: https://github.com/kadena-io/pact-5.git +-- tag: c065ebd60ea0460a98779968200e943044fe4939 +-- --sha256: sha256-pSDMa5QZDF5/dsccDgZFQMfhgo+/HjDqc0m9W9h7m3g= source-repository-package type: git diff --git a/src/Chainweb/Chainweb.hs b/src/Chainweb/Chainweb.hs index 3c151b7d60..e88d99adf0 100644 --- a/src/Chainweb/Chainweb.hs +++ b/src/Chainweb/Chainweb.hs @@ -72,8 +72,9 @@ module Chainweb.Chainweb , NowServing(..) -- ** Mempool integration -, ChainwebTransaction -, Mempool.chainwebTransactionConfig +, Pact4Transaction +, Pact5Transaction +, Mempool.pact4TransactionConfig , validatingMempoolConfig , withChainweb @@ -269,7 +270,7 @@ validatingMempoolConfig -> Mempool.GasLimit -> Mempool.GasPrice -> MVar PactExecutionService - -> Mempool.InMemConfig ChainwebTransaction + -> Mempool.InMemConfig Pact4Transaction validatingMempoolConfig cid v gl gp mv = Mempool.InMemConfig { Mempool._inmemTxCfg = txcfg , Mempool._inmemTxBlockSizeLimit = gl @@ -280,7 +281,7 @@ validatingMempoolConfig cid v gl gp mv = Mempool.InMemConfig , Mempool._inmemCurrentTxsSize = currentTxsSize } where - txcfg = Mempool.chainwebTransactionConfig (maxBound :: PactParserVersion) + txcfg = Mempool.pact4TransactionConfig (maxBound :: PactParserVersion) -- The mempool doesn't provide a chain context to the codec which means -- that the latest version of the parser is used. @@ -293,7 +294,7 @@ validatingMempoolConfig cid v gl gp mv = Mempool.InMemConfig -- | Validation: Is this TX associated with the correct `ChainId`? -- - preInsertSingle :: ChainwebTransaction -> Either Mempool.InsertError ChainwebTransaction + preInsertSingle :: Pact4Transaction -> Either Mempool.InsertError Pact4Transaction preInsertSingle tx = do let !pay = payloadObj . P._cmdPayload $ tx pcid = P._pmChainId $ P._pMeta pay @@ -315,9 +316,9 @@ validatingMempoolConfig cid v gl gp mv = Mempool.InMemConfig -- is gossiped to us from a peer's mempool. -- preInsertBatch - :: V.Vector (T2 Mempool.TransactionHash ChainwebTransaction) + :: V.Vector (T2 Mempool.TransactionHash Pact4Transaction) -> IO (V.Vector (Either (T2 Mempool.TransactionHash Mempool.InsertError) - (T2 Mempool.TransactionHash ChainwebTransaction))) + (T2 Mempool.TransactionHash Pact4Transaction))) preInsertBatch txs = do pex <- readMVar mv rs <- _pactPreInsertCheck pex cid (V.map ssnd txs) @@ -762,7 +763,7 @@ runChainweb cw nowServing = do chainDbsToServe :: [(ChainId, BlockHeaderDb)] chainDbsToServe = proj _chainResBlockHeaderDb - mempoolsToServe :: [(ChainId, Mempool.MempoolBackend ChainwebTransaction)] + mempoolsToServe :: [(ChainId, Mempool.MempoolBackend Pact4Transaction)] mempoolsToServe = proj _chainResMempool peerDb = _peerResDb (_chainwebPeer cw) diff --git a/src/Chainweb/Chainweb/ChainResources.hs b/src/Chainweb/Chainweb/ChainResources.hs index 7646a48d15..aafca272c6 100644 --- a/src/Chainweb/Chainweb/ChainResources.hs +++ b/src/Chainweb/Chainweb/ChainResources.hs @@ -60,7 +60,7 @@ import Chainweb.Storage.Table.RocksDB data ChainResources logger = ChainResources { _chainResBlockHeaderDb :: !BlockHeaderDb , _chainResLogger :: !logger - , _chainResMempool :: !(MempoolBackend ChainwebTransaction) + , _chainResMempool :: !(MempoolBackend Pact4Transaction) , _chainResPact :: PactExecutionService } @@ -83,7 +83,7 @@ withChainResources -> ChainId -> RocksDb -> logger - -> (MVar PactExecutionService -> Mempool.InMemConfig ChainwebTransaction) + -> (MVar PactExecutionService -> Mempool.InMemConfig Pact4Transaction) -> PayloadDb tbl -> FilePath -- ^ database directory for checkpointer diff --git a/src/Chainweb/Mempool/Consensus.hs b/src/Chainweb/Mempool/Consensus.hs index 63c1d8ab51..c1aeb8189a 100644 --- a/src/Chainweb/Mempool/Consensus.hs +++ b/src/Chainweb/Mempool/Consensus.hs @@ -56,10 +56,10 @@ import Data.LogMessage (JsonLog(..), LogFunction) ------------------------------------------------------------------------------ data MempoolConsensus = MempoolConsensus - { mpcMempool :: !(MempoolBackend ChainwebTransaction) + { mpcMempool :: !(MempoolBackend Pact4Transaction) , mpcLastNewBlockParent :: !(IORef (Maybe BlockHeader)) , mpcProcessFork - :: LogFunction -> BlockHeader -> IO (Vector ChainwebTransaction, Vector ChainwebTransaction) + :: LogFunction -> BlockHeader -> IO (Vector Pact4Transaction, Vector Pact4Transaction) } data ReintroducedTxsLog = ReintroducedTxsLog @@ -80,7 +80,7 @@ instance Exception MempoolException ------------------------------------------------------------------------------ mkMempoolConsensus :: CanReadablePayloadCas tbl - => MempoolBackend ChainwebTransaction + => MempoolBackend Pact4Transaction -> BlockHeaderDb -> Maybe (PayloadDb tbl) -> IO MempoolConsensus @@ -102,7 +102,7 @@ processFork -> IORef (Maybe BlockHeader) -> LogFunction -> BlockHeader - -> IO (Vector ChainwebTransaction, Vector ChainwebTransaction) + -> IO (Vector Pact4Transaction, Vector Pact4Transaction) processFork blockHeaderDb payloadStore lastHeaderRef logFun newHeader = do now <- getCurrentTimeIntegral lastHeader <- readIORef lastHeaderRef @@ -122,7 +122,7 @@ processForkCheckTTL -> HashableTrans PayloadWithText -> Bool processForkCheckTTL ppv now (HashableTrans t) = either (const False) (const True) $ - txTTLCheck (chainwebTransactionConfig ppv) now t + txTTLCheck (pact4TransactionConfig ppv) now t ------------------------------------------------------------------------------ @@ -194,4 +194,4 @@ chainwebTxsFromPd ppv pd = do let theRights = rights $ toList eithers return $! HS.fromList $ HashableTrans <$!> theRights where - toCWTransaction = codecDecode (chainwebPayloadCodec ppv) + toCWTransaction = codecDecode (pact4PayloadCodec ppv) diff --git a/src/Chainweb/Mempool/Mempool.hs b/src/Chainweb/Mempool/Mempool.hs index 16aa2d7200..397e8e4d1c 100644 --- a/src/Chainweb/Mempool/Mempool.hs +++ b/src/Chainweb/Mempool/Mempool.hs @@ -74,7 +74,7 @@ module Chainweb.Mempool.Mempool , bfTxHashes , bfCount - , chainwebTransactionConfig + , pact4TransactionConfig , mockCodec , mockEncode , mockBlockGasLimit @@ -363,11 +363,11 @@ noopMempool = do ------------------------------------------------------------------------------ -chainwebTransactionConfig +pact4TransactionConfig :: PactParserVersion - -> TransactionConfig ChainwebTransaction -chainwebTransactionConfig ppv = TransactionConfig - { txCodec = chainwebPayloadCodec ppv + -> TransactionConfig Pact4Transaction +pact4TransactionConfig ppv = TransactionConfig + { txCodec = pact4PayloadCodec ppv , txHasher = commandHash , txHashMeta = chainwebTestHashMeta , txGasPrice = getGasPrice diff --git a/src/Chainweb/Miner/Miners.hs b/src/Chainweb/Miner/Miners.hs index 1abed1d328..52cf5c703b 100644 --- a/src/Chainweb/Miner/Miners.hs +++ b/src/Chainweb/Miner/Miners.hs @@ -120,7 +120,7 @@ localTest lf v coord m cdb gen miners = -- mempoolNoopMiner :: LogFunction - -> HashMap ChainId (MempoolBackend ChainwebTransaction) + -> HashMap ChainId (MempoolBackend Pact4Transaction) -> IO () mempoolNoopMiner lf chainRes = runForever lf "Chainweb.Miner.Miners.mempoolNoopMiner" $ do diff --git a/src/Chainweb/Pact/Backend/Types.hs b/src/Chainweb/Pact/Backend/Types.hs index c37343929b..5c183d143e 100644 --- a/src/Chainweb/Pact/Backend/Types.hs +++ b/src/Chainweb/Pact/Backend/Types.hs @@ -403,11 +403,11 @@ newtype SQLiteFlag = SQLiteFlag { getFlag :: CInt } data MemPoolAccess = MemPoolAccess { mpaGetBlock :: !(BlockFill - -> MempoolPreBlockCheck ChainwebTransaction + -> MempoolPreBlockCheck Pact4Transaction -> BlockHeight -> BlockHash -> BlockHeader - -> IO (Vector ChainwebTransaction) + -> IO (Vector Pact4Transaction) ) , mpaSetLastHeader :: !(BlockHeader -> IO ()) , mpaProcessFork :: !(BlockHeader -> IO ()) diff --git a/src/Chainweb/Pact/PactService.hs b/src/Chainweb/Pact/PactService.hs index 78f39d0bb8..9dc6b48074 100644 --- a/src/Chainweb/Pact/PactService.hs +++ b/src/Chainweb/Pact/PactService.hs @@ -483,7 +483,7 @@ execNewBlock mpAccess miner = do -- Run the coinbase transaction cb <- runCoinbase False miner (EnforceCoinbaseFailure True) (CoinbaseUsePrecompiled True) initCache - successes <- liftIO $ Vec.new @_ @_ @(ChainwebTransaction, P.CommandResult [P.TxLogJson]) + successes <- liftIO $ Vec.new @_ @_ @(Pact4Transaction, P.CommandResult [P.TxLogJson]) failures <- liftIO $ Vec.new @_ @_ @TransactionHash -- Heuristic: limit fetches to count of 1000-gas txs in block. @@ -510,7 +510,7 @@ execNewBlock mpAccess miner = do !parentTime = ParentCreationTime (_blockCreationTime $ _parentHeader latestHeader) - getBlockTxs :: CurrentBlockDbEnv logger -> BlockFill -> PactServiceM logger tbl (Vector ChainwebTransaction) + getBlockTxs :: CurrentBlockDbEnv logger -> BlockFill -> PactServiceM logger tbl (Vector Pact4Transaction) getBlockTxs dbEnv bfState = do psEnv <- ask logger <- view psLogger @@ -528,7 +528,7 @@ execNewBlock mpAccess miner = do liftIO $! mpaGetBlock mpAccess bfState validate (pHeight + 1) pHash (_parentHeader latestHeader) - refill :: Word64 -> Micros -> GrowableVec (ChainwebTransaction, P.CommandResult [P.TxLogJson]) -> GrowableVec TransactionHash -> (ModuleCache, CoreModuleCache) -> BlockFill -> PactBlockM logger tbl BlockFill + refill :: Word64 -> Micros -> GrowableVec (Pact4Transaction, P.CommandResult [P.TxLogJson]) -> GrowableVec TransactionHash -> (ModuleCache, CoreModuleCache) -> BlockFill -> PactBlockM logger tbl BlockFill refill fetchLimit txTimeLimit successes failures = go where go :: (ModuleCache, CoreModuleCache) -> BlockFill -> PactBlockM logger tbl BlockFill @@ -594,10 +594,10 @@ execNewBlock mpAccess miner = do -- -- The failed txs are later badlisted. splitResults :: () - => GrowableVec (ChainwebTransaction, P.CommandResult [P.TxLogJson]) + => GrowableVec (Pact4Transaction, P.CommandResult [P.TxLogJson]) -> GrowableVec TransactionHash -- ^ failed txs -> BlockFill - -> [(ChainwebTransaction, Either CommandInvalidError (P.CommandResult [P.TxLogJson]))] + -> [(Pact4Transaction, Either CommandInvalidError (P.CommandResult [P.TxLogJson]))] -> PactBlockM logger tbl (BlockFill, Bool) splitResults successes failures = go where @@ -639,7 +639,7 @@ type GrowableVec = Vec (PrimState IO) execNewGenesisBlock :: (Logger logger, CanReadablePayloadCas tbl) => Miner - -> Vector ChainwebTransaction + -> Vector Pact4Transaction -> PactServiceM logger tbl PayloadWithOutputs execNewGenesisBlock miner newTrans = pactLabel "execNewGenesisBlock" $ readFrom Nothing $ do -- NEW GENESIS COINBASE: Reject bad coinbase, use date rule for precompilation @@ -740,7 +740,7 @@ execReadOnlyReplay lowerBound maybeUpperBound = pactLabel "execReadOnlyReplay" $ execLocal :: (Logger logger, CanReadablePayloadCas tbl) - => ChainwebTransaction + => Pact4Transaction -> Maybe LocalPreflightSimulation -- ^ preflight flag -> Maybe LocalSignatureVerification @@ -989,8 +989,8 @@ execHistoricalLookup bh d k = pactLabel "execHistoricalLookup" $ do execPreInsertCheckReq :: (CanReadablePayloadCas tbl, Logger logger) - => Vector ChainwebTransaction - -> PactServiceM logger tbl (Vector (Either Mempool.InsertError ChainwebTransaction)) + => Vector Pact4Transaction + -> PactServiceM logger tbl (Vector (Either Mempool.InsertError Pact4Transaction)) execPreInsertCheckReq txs = pactLabel "execPreInsertCheckReq" $ do let requestKeys = V.map P.cmdToRequestKey txs logInfo $ "(request keys = " <> sshow requestKeys <> ")" @@ -1020,17 +1020,17 @@ execPreInsertCheckReq txs = pactLabel "execPreInsertCheckReq" $ do attemptBuyGas :: forall logger tbl. (Logger logger) => Miner - -> Vector (Either InsertError ChainwebTransaction) - -> PactBlockM logger tbl (Vector (Either InsertError ChainwebTransaction)) + -> Vector (Either InsertError Pact4Transaction) + -> PactBlockM logger tbl (Vector (Either InsertError Pact4Transaction)) attemptBuyGas miner txsOrErrs = localLabelBlock ("transaction", "attemptBuyGas") $ do (mc, cmc) <- getInitCache l <- view (psServiceEnv . psLogger) V.fromList . toList . sfst <$> V.foldM (buyGasFor l) (T2 mempty (mc, cmc)) txsOrErrs where buyGasFor :: logger - -> T2 (DL.DList (Either InsertError ChainwebTransaction)) (ModuleCache, CoreModuleCache) - -> Either InsertError ChainwebTransaction - -> PactBlockM logger tbl (T2 (DL.DList (Either InsertError ChainwebTransaction)) (ModuleCache, CoreModuleCache)) + -> T2 (DL.DList (Either InsertError Pact4Transaction)) (ModuleCache, CoreModuleCache) + -> Either InsertError Pact4Transaction + -> PactBlockM logger tbl (T2 (DL.DList (Either InsertError Pact4Transaction)) (ModuleCache, CoreModuleCache)) buyGasFor _l (T2 dl (mcache,cmcache)) err@Left {} = return (T2 (DL.snoc dl err) (mcache,cmcache)) buyGasFor l (T2 dl (mcache,cmcache)) (Right tx) = do T2 mcache' !res <- do @@ -1057,8 +1057,8 @@ execPreInsertCheckReq txs = pactLabel "execPreInsertCheckReq" $ do [ P.FlagDisableModuleInstall , P.FlagDisableHistoryInTransactionalMode ] ++ disableReturnRTC (ctxVersion pd) (ctxChainId pd) (ctxCurrentBlockHeight pd) - let usePactTng = False - let buyGasEnv = TransactionEnv P.Transactional (_cpPactDbEnv dbEnv) (_cpPactCoreDbEnv dbEnv) l Nothing (ctxToPublicData pd) spv nid gasPrice rk gasLimit ec Nothing usePactTng + let usePact5 = False + let buyGasEnv = TransactionEnv P.Transactional (_cpPactDbEnv dbEnv) (_cpPactCoreDbEnv dbEnv) l Nothing (ctxToPublicData pd) spv nid gasPrice rk gasLimit ec Nothing usePact5 cr <- liftIO $! catchesPactError l CensorsUnexpectedError diff --git a/src/Chainweb/Pact/PactService/ExecBlock.hs b/src/Chainweb/Pact/PactService/ExecBlock.hs index 6c086ed26a..f94d1a6b39 100644 --- a/src/Chainweb/Pact/PactService/ExecBlock.hs +++ b/src/Chainweb/Pact/PactService/ExecBlock.hs @@ -78,6 +78,7 @@ import qualified Pact.Types.Runtime as P import qualified Pact.Types.SPV as P import qualified Pact.Core.Names as PCore +import qualified Pact.Core.Command as PCore import Chainweb.BlockHeader import Chainweb.BlockHeight @@ -115,7 +116,7 @@ execBlock currHeader payload = do let plData = checkablePayloadToPayloadData payload dbEnv <- view psBlockDbEnv miner <- decodeStrictOrThrow' (_minerData $ _payloadDataMiner plData) - trans <- liftIO $ transactionsFromPayload + trans <- liftIO $ pact4TransactionsFromPayload (pactParserVersion v (_blockChainId currHeader) (_blockHeight currHeader)) plData logger <- view (psServiceEnv . psLogger) @@ -204,7 +205,7 @@ validateChainwebTxs -- ^ reference time for tx validation. -> BlockHeight -- ^ Current block height - -> Vector ChainwebTransaction + -> Vector Pact4Transaction -> RunGas -> IO ValidateTxs validateChainwebTxs logger v cid dbEnv txValidationTime bh txs doBuyGas @@ -221,14 +222,14 @@ validateChainwebTxs logger v cid dbEnv txValidationTime bh txs doBuyGas >>= runValid checkTimes >>= runValid (return . checkCompile v cid bh) - checkUnique :: ChainwebTransaction -> IO (Either InsertError ChainwebTransaction) + checkUnique :: Pact4Transaction -> IO (Either InsertError Pact4Transaction) checkUnique t = do found <- HashMap.lookup (P._cmdHash t) <$> _cpLookupProcessedTx dbEnv (V.singleton $ P._cmdHash t) case found of Nothing -> pure $ Right t Just _ -> pure $ Left InsertErrorDuplicate - checkTimes :: ChainwebTransaction -> IO (Either InsertError ChainwebTransaction) + checkTimes :: Pact4Transaction -> IO (Either InsertError Pact4Transaction) checkTimes t | skipTxTimingValidation v cid bh = return $ Right t @@ -239,7 +240,7 @@ validateChainwebTxs logger v cid dbEnv txValidationTime bh txs doBuyGas | otherwise = return $ Right t - checkTxHash :: ChainwebTransaction -> IO (Either InsertError ChainwebTransaction) + checkTxHash :: Pact4Transaction -> IO (Either InsertError Pact4Transaction) checkTxHash t = case P.verifyHash (P._cmdHash t) (SB.fromShort $ payloadBytes $ P._cmdPayload t) of Left _ @@ -250,7 +251,7 @@ validateChainwebTxs logger v cid dbEnv txValidationTime bh txs doBuyGas Right _ -> pure $ Right t - checkTxSigs :: ChainwebTransaction -> IO (Either InsertError ChainwebTransaction) + checkTxSigs :: Pact4Transaction -> IO (Either InsertError Pact4Transaction) checkTxSigs t | assertValidateSigs validSchemes webAuthnPrefixLegal hsh signers sigs = pure $ Right t | otherwise = return $ Left InsertErrorInvalidSigs @@ -269,15 +270,15 @@ validateChainwebTxs logger v cid dbEnv txValidationTime bh txs doBuyGas runValid _ l@Left{} = pure l -type ValidateTxs = Vector (Either InsertError ChainwebTransaction) +type ValidateTxs = Vector (Either InsertError Pact4Transaction) type RunGas = ValidateTxs -> IO ValidateTxs checkCompile :: ChainwebVersion -> ChainId -> BlockHeight - -> ChainwebTransaction - -> Either InsertError ChainwebTransaction + -> Pact4Transaction + -> Either InsertError Pact4Transaction checkCompile v cid bh tx = case payload of Exec (ExecMsg parsedCode _) -> case compileCode parsedCode of @@ -297,12 +298,12 @@ execTransactions :: (Logger logger) => Bool -> Miner - -> Vector ChainwebTransaction + -> Vector Pact4Transaction -> EnforceCoinbaseFailure -> CoinbaseUsePrecompiled -> Maybe P.Gas -> Maybe Micros - -> PactBlockM logger tbl (Transactions (Either CommandInvalidError (P.CommandResult [P.TxLogJson]))) + -> PactBlockM logger tbl (Transactions (Either CommandInvalidError (Either (P.CommandResult [P.TxLogJson]) PCore.CommandResult))) execTransactions isGenesis miner ctxs enfCBFail usePrecomp gasLimit timeLimit = do mc <- initModuleCacheForBlock isGenesis -- for legacy reasons (ask Emily) we don't use the module cache resulting @@ -314,11 +315,11 @@ execTransactions isGenesis miner ctxs enfCBFail usePrecomp gasLimit timeLimit = execTransactionsOnly :: (Logger logger) => Miner - -> Vector ChainwebTransaction + -> Vector Pact4Transaction -> (ModuleCache, CoreModuleCache) -> Maybe Micros -> PactBlockM logger tbl - (T3 (Vector (ChainwebTransaction, Either CommandInvalidError (P.CommandResult [P.TxLogJson]))) ModuleCache CoreModuleCache) + (T3 (Vector (Pact4Transaction, Either CommandInvalidError (P.CommandResult [P.TxLogJson]))) ModuleCache CoreModuleCache) execTransactionsOnly miner ctxs (mc, cmc) txTimeLimit = do T3 txOuts mcOut cmcOut <- applyPactCmds False ctxs miner (mc, cmc) Nothing txTimeLimit return $! T3 (V.force (V.zip ctxs txOuts)) mcOut cmcOut @@ -346,7 +347,7 @@ runCoinbase -> EnforceCoinbaseFailure -> CoinbaseUsePrecompiled -> (ModuleCache, CoreModuleCache) - -> PactBlockM logger tbl (P.CommandResult [P.TxLogJson]) + -> PactBlockM logger tbl (Either (P.CommandResult [P.TxLogJson]) PCore.CommandResult) runCoinbase True _ _ _ _ = return noCoinbase runCoinbase False miner enfCBFail usePrecomp (mc, cmc) = do logger <- view (psServiceEnv . psLogger) @@ -381,7 +382,7 @@ data CommandInvalidError applyPactCmds :: forall logger tbl. (Logger logger) => Bool - -> Vector ChainwebTransaction + -> Vector Pact4Transaction -> Miner -> (ModuleCache, CoreModuleCache) -> Maybe P.Gas @@ -396,7 +397,7 @@ applyPactCmds isGenesis cmds miner (mc, cmc) blockGas txTimeLimit = do where go :: [Either CommandInvalidError (P.CommandResult [P.TxLogJson])] - -> [ChainwebTransaction] + -> [Pact4Transaction] -> StateT (T3 ModuleCache CoreModuleCache (Maybe P.Gas)) (PactBlockM logger tbl) @@ -419,7 +420,7 @@ applyPactCmd => Bool -> Miner -> Maybe Micros - -> ChainwebTransaction + -> Pact4Transaction -> StateT (T3 ModuleCache CoreModuleCache (Maybe P.Gas)) (PactBlockM logger tbl) @@ -505,11 +506,11 @@ applyPactCmd isGenesis miner txTimeLimit cmd = StateT $ \(T3 mcache cmcache mayb toHashCommandResult :: P.CommandResult [P.TxLogJson] -> P.CommandResult P.Hash toHashCommandResult = over (P.crLogs . _Just) $ P.pactHash . P.encodeTxLogJsonArray -transactionsFromPayload +pact4TransactionsFromPayload :: PactParserVersion -> PayloadData - -> IO (Vector ChainwebTransaction) -transactionsFromPayload ppv plData = do + -> IO (Vector Pact4Transaction) +pact4TransactionsFromPayload ppv plData = do vtrans <- fmap V.fromList $ mapM toCWTransaction $ toList (_payloadDataTransactions plData) @@ -520,7 +521,25 @@ transactionsFromPayload ppv plData = do <> T.intercalate ". " ls return $! V.fromList theRights where - toCWTransaction bs = evaluate (force (codecDecode (chainwebPayloadCodec ppv) $ + toCWTransaction bs = evaluate (force (codecDecode (pact4PayloadCodec ppv) $ + _transactionBytes bs)) + +pact5TransactionsFromPayload + :: PactParserVersion + -> PayloadData + -> IO (Vector Pact5Transaction) +pact5TransactionsFromPayload ppv plData = do + vtrans <- fmap V.fromList $ + mapM toCWTransaction $ + toList (_payloadDataTransactions plData) + let (theLefts, theRights) = partitionEithers $ V.toList vtrans + unless (null theLefts) $ do + let ls = map T.pack theLefts + throwM $ TransactionDecodeFailure $ "Failed to decode pact transactions: " + <> T.intercalate ". " ls + return $! V.fromList theRights + where + toCWTransaction bs = evaluate (force (codecDecode (pact5PayloadCodec ppv) $ _transactionBytes bs)) debugResult :: J.Encode a => Logger logger => Text -> a -> PactServiceM logger tbl () @@ -648,7 +667,7 @@ validateHashes bHeader payload miner transactions = ] ] - addTxOuts :: (ChainwebTransaction, P.CommandResult [P.TxLogJson]) -> J.Builder + addTxOuts :: (Pact4Transaction, P.CommandResult [P.TxLogJson]) -> J.Builder addTxOuts (tx,cr) = J.object [ "tx" J..= fmap (fmap _pcCode . payloadObj) tx , "result" J..= toPairCR cr diff --git a/src/Chainweb/Pact/RestAPI/Server.hs b/src/Chainweb/Pact/RestAPI/Server.hs index 72035d2b6c..abff8eef86 100644 --- a/src/Chainweb/Pact/RestAPI/Server.hs +++ b/src/Chainweb/Pact/RestAPI/Server.hs @@ -134,7 +134,7 @@ import Control.Error (note, rights) data PactServerData logger tbl = PactServerData { _pactServerDataCutDb :: !(CutDB.CutDb tbl) - , _pactServerDataMempool :: !(MempoolBackend ChainwebTransaction) + , _pactServerDataMempool :: !(MempoolBackend Pact4Transaction) , _pactServerDataLogger :: !logger , _pactServerDataPact :: !PactExecutionService } @@ -248,7 +248,7 @@ sendHandler => logger -> ChainwebVersion -> ChainId - -> MempoolBackend ChainwebTransaction + -> MempoolBackend Pact4Transaction -> SubmitBatch -> Handler RequestKeys sendHandler logger v cid mempool (SubmitBatch cmds) = Handler $ do @@ -290,7 +290,7 @@ pollHandler -> CutDB.CutDb tbl -> ChainId -> PactExecutionService - -> MempoolBackend ChainwebTransaction + -> MempoolBackend Pact4Transaction -> Maybe ConfirmationDepth -> Poll -> Handler PollResponses @@ -314,7 +314,7 @@ listenHandler -> CutDB.CutDb tbl -> ChainId -> PactExecutionService - -> MempoolBackend ChainwebTransaction + -> MempoolBackend Pact4Transaction -> ListenerRequest -> Handler ListenResponse listenHandler logger cdb cid pact mem (ListenerRequest key) = do @@ -601,7 +601,7 @@ internalPoll :: CanReadablePayloadCas tbl => PayloadDb tbl -> BlockHeaderDb - -> MempoolBackend ChainwebTransaction + -> MempoolBackend Pact4Transaction -> PactExecutionService -> Maybe ConfirmationDepth -> NonEmpty RequestKey @@ -686,9 +686,9 @@ toPactTx (Transaction b) = note "toPactTx failure" (decodeStrict' b) -- TODO: all of the functions in this module can instead grab the current block height from consensus -- and pass it here to get a better estimate of what behavior is correct. -validateCommand :: ChainwebVersion -> ChainId -> Command Text -> Either String ChainwebTransaction +validateCommand :: ChainwebVersion -> ChainId -> Command Text -> Either String Pact4Transaction validateCommand v cid (fmap encodeUtf8 -> cmdBs) = case parsedCmd of - Right (commandParsed :: ChainwebTransaction) -> + Right (commandParsed :: Pact4Transaction) -> if assertCommand commandParsed (validPPKSchemes v cid bh) diff --git a/src/Chainweb/Pact/Service/BlockValidation.hs b/src/Chainweb/Pact/Service/BlockValidation.hs index 2aa5ee96de..6f354516d4 100644 --- a/src/Chainweb/Pact/Service/BlockValidation.hs +++ b/src/Chainweb/Pact/Service/BlockValidation.hs @@ -68,7 +68,7 @@ local :: Maybe LocalPreflightSimulation -> Maybe LocalSignatureVerification -> Maybe RewindDepth - -> ChainwebTransaction + -> Pact4Transaction -> PactQueue -> IO LocalResult local preflight sigVerify rd ct reqQ = do @@ -103,7 +103,7 @@ pactReadOnlyReplay l u reqQ = do submitRequestAndWait reqQ msg pactPreInsertCheck - :: Vector ChainwebTransaction + :: Vector Pact4Transaction -> PactQueue -> IO (Vector (Either InsertError ())) pactPreInsertCheck txs reqQ = do diff --git a/src/Chainweb/Pact/Service/PactInProcApi.hs b/src/Chainweb/Pact/Service/PactInProcApi.hs index 076e320471..d1a1ab1953 100644 --- a/src/Chainweb/Pact/Service/PactInProcApi.hs +++ b/src/Chainweb/Pact/Service/PactInProcApi.hs @@ -126,11 +126,11 @@ pactMemPoolGetBlock => MempoolConsensus -> logger -> BlockFill - -> (MempoolPreBlockCheck ChainwebTransaction + -> (MempoolPreBlockCheck Pact4Transaction -> BlockHeight -> BlockHash -> BlockHeader - -> IO (Vector ChainwebTransaction)) + -> IO (Vector Pact4Transaction)) pactMemPoolGetBlock mpc theLogger bf validate height hash _bHeader = do logFn theLogger Debug $! "pactMemPoolAccess - getting new block of transactions for " <> "height = " <> sshow height <> ", hash = " <> sshow hash diff --git a/src/Chainweb/Pact/Service/Types.hs b/src/Chainweb/Pact/Service/Types.hs index a9e28adc0b..ae072851e2 100644 --- a/src/Chainweb/Pact/Service/Types.hs +++ b/src/Chainweb/Pact/Service/Types.hs @@ -399,7 +399,7 @@ data ValidateBlockReq = ValidateBlockReq } deriving stock Show data LocalReq = LocalReq - { _localRequest :: !ChainwebTransaction + { _localRequest :: !Pact4Transaction , _localPreflight :: !(Maybe LocalPreflightSimulation) , _localSigVerification :: !(Maybe LocalSignatureVerification) , _localRewindDepth :: !(Maybe RewindDepth) @@ -415,7 +415,7 @@ instance Show LookupPactTxsReq where "LookupPactTxsReq@" ++ show m data PreInsertCheckReq = PreInsertCheckReq - { _preInsCheckTxs :: !(Vector ChainwebTransaction) + { _preInsCheckTxs :: !(Vector Pact4Transaction) } instance Show PreInsertCheckReq where show (PreInsertCheckReq v) = diff --git a/src/Chainweb/Pact/TransactionExec.hs b/src/Chainweb/Pact/TransactionExec.hs index dfe7b8c5ef..5d71af6ffe 100644 --- a/src/Chainweb/Pact/TransactionExec.hs +++ b/src/Chainweb/Pact/TransactionExec.hs @@ -117,7 +117,9 @@ import Pact.Types.Util as PU import Pact.Core.Serialise.LegacyPact () import qualified Pact.Core.Compile as PCore import qualified Pact.Core.Evaluate as PCore +import qualified Pact.Core.Command as PCore import qualified Pact.Core.Capabilities as PCore +import qualified Pact.Core.Errors as PCore import qualified Pact.Core.Names as PCore import qualified Pact.Core.Namespace as PCore import qualified Pact.Core.Persistence as PCore @@ -234,7 +236,7 @@ applyCmd -- ^ cached module state -> ApplyCmdExecutionContext -- ^ is this a local or send execution context? - -> IO (T4 (CommandResult [TxLogJson]) ModuleCache CoreModuleCache (S.Set PactWarning)) + -> IO (T4 (Either (CommandResult [TxLogJson]) PCore.CommandResult) ModuleCache CoreModuleCache (S.Set PactWarning)) applyCmd v logger gasLogger (pdbenv, coreDb) miner (gasModel, gasModelCore) txCtx spv cmd initialGas (mcache0, mccache0) callCtx = do T2 cr st <- runTransactionM cenv txst applyBuyGas @@ -263,7 +265,7 @@ applyCmd v logger gasLogger (pdbenv, coreDb) miner (gasModel, gasModelCore) txCt <> flagsFor v (ctxChainId txCtx) (ctxCurrentBlockHeight txCtx) cenv = TransactionEnv Transactional pdbenv coreDb logger gasLogger (ctxToPublicData txCtx) spv nid gasPrice - requestKey (fromIntegral gasLimit) executionConfigNoHistory quirkGasFee usePactTng + requestKey (fromIntegral gasLimit) executionConfigNoHistory quirkGasFee usePact5 !requestKey = cmdToRequestKey cmd !gasPrice = view cmdGasPrice cmd @@ -279,7 +281,7 @@ applyCmd v logger gasLogger (pdbenv, coreDb) miner (gasModel, gasModelCore) txCt chainweb219Pact' = guardCtx chainweb219Pact txCtx chainweb223Pact' = guardCtx chainweb223Pact txCtx allVerifiers = verifiersAt v cid currHeight - usePactTng = chainweb223Pact v cid currHeight + usePact5 = pact5 v cid currHeight toEmptyPactError (PactError errty _ _ _) = PactError errty def [] mempty toOldListErr pe = pe { peDoc = listErrMsg } @@ -318,10 +320,11 @@ applyCmd v logger gasLogger (pdbenv, coreDb) miner (gasModel, gasModelCore) txCt case verifierResult of Left err -> do let errMsg = "Tx verifier error: " <> getVerifierError err - cmdResult <- failTxWith - (PactError TxFailure def [] (pretty errMsg)) - errMsg - redeemAllGas cmdResult + Left <$> do + cmdResult <- failTxWith + (PactError TxFailure def [] (pretty errMsg)) + errMsg + redeemAllGas cmdResult Right verifierGasRemaining -> do txGasUsed += initGasRemaining - verifierGasRemaining applyPayload @@ -333,18 +336,22 @@ applyCmd v logger gasLogger (pdbenv, coreDb) miner (gasModel, gasModelCore) txCt if chainweb217Pact' then txGasUsed += initialGas else txGasUsed .= initialGas - cr <- catchesPactError logger (onChainErrorPrintingFor txCtx) $! runPayload cmd managedNamespacePolicy - case cr of - Left e - -- 2.19 onwards errors return on chain - | chainweb219Pact' -> displayPactError e - -- 2.17 errors were removed - | chainweb217Pact' -> stripPactError e - | chainweb213Pact' || not (isOldListErr e) -> displayPactError e - | otherwise -> do - r <- failTxWith (toOldListErr e) "tx failure for request key when running cmd" - redeemAllGas r - Right r -> applyRedeem r + if usePactTng then do + cr <- runPayloadTng cmd managedNamespacePolicy + return $ Right $ cr + else Left <$> do + cr <- catchesPactError logger (onChainErrorPrintingFor txCtx) $! runPayload cmd managedNamespacePolicy + case cr of + Left e + -- 2.19 onwards errors return on chain + | chainweb219Pact' -> displayPactError e + -- 2.17 errors were removed + | chainweb217Pact' -> stripPactError e + | chainweb213Pact' || not (isOldListErr e) -> displayPactError e + | otherwise -> do + r <- failTxWith (toOldListErr e) "tx failure for request key when running cmd" + redeemAllGas r + Right r -> applyRedeem r applyRedeem cr = do txGasModel .= _geGasModel freeGasEnv @@ -367,7 +374,7 @@ applyCmd v logger gasLogger (pdbenv, coreDb) miner (gasModel, gasModelCore) txCt $ set crLogs (Just logs) $ over crEvents (es ++) cr - return cr' + return $ cr' listErrMsg :: Doc listErrMsg = @@ -412,7 +419,7 @@ applyGenesisCmd logger (dbEnv, coreDb) spv txCtx cmd = -- after the block height where pact4.4 is on. <> S.fromList [ FlagDisableInlineMemCheck, FlagDisablePact44 ] , _txQuirkGasFee = Nothing - , _txUsePactTng = False + , _txusePact5 = False } txst = TransactionState { _txCache = mempty @@ -475,7 +482,7 @@ applyCoinbase -> CoinbaseUsePrecompiled -- ^ always enable precompilation -> (ModuleCache, CoreModuleCache) - -> IO (T2 (CommandResult [TxLogJson]) (Maybe (ModuleCache, CoreModuleCache))) + -> IO (T2 (Either (CommandResult [TxLogJson]) PCore.CommandResult) (Maybe (ModuleCache, CoreModuleCache))) applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(ParsedDecimal d) txCtx (EnforceCoinbaseFailure enfCBFailure) (CoinbaseUsePrecompiled enablePC) (mc, cmc) | fork1_3InEffect || enablePC = do @@ -502,9 +509,9 @@ applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(Pa , S.singleton FlagDisableHistoryInTransactionalMode , flagsFor v (ctxChainId txCtx) (ctxCurrentBlockHeight txCtx) ] - usePactTng = chainweb223Pact v (ctxChainId txCtx) bh + usePact5 = pact5 v (ctxChainId txCtx) bh tenv = TransactionEnv Transactional dbEnv coreDb logger Nothing (ctxToPublicData txCtx) noSPVSupport - Nothing 0.0 rk 0 ec Nothing usePactTng + Nothing 0.0 rk 0 ec Nothing usePact5 txst = TransactionState mc cmc mempty 0 Nothing (_geGasModel freeGasEnv) (PCore.freeGasModel) mempty initState = setModuleCache mc $ initCapabilities [magic_COINBASE] rk = RequestKey chash @@ -518,7 +525,7 @@ applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(Pa go interp evState cexec@(ExecMsg _ execData) mCoinbaseTerm = evalTransactionM tenv txst $! do case mCoinbaseTerm of - Just coinbaseTerm | usePactTng -> do + Just coinbaseTerm | usePact5 -> do evalEnv <- mkCoreEvalEnv managedNamespacePolicy (MsgData execData Nothing chash mempty []) cr <- liftIO $ PCore.evalTermExec evalEnv evState coinbaseTerm @@ -534,15 +541,13 @@ applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(Pa txCoreCache .= (CoreModuleCache (PCore._erLoadedModules er)) - coreCr <- mkCommandResultFromCoreResult er - return $! T2 - coreCr + (Right $ PCore.CommandResult $ PCore.PactResult $ Right $ PCore.PERExpr er) upgradedModuleCache Left e | throwCritical -> throwM $ CoinbaseFailure $ sshow e - | otherwise -> (`T2` Nothing) <$> failTxWith (PactError EvalError (Info Nothing) [] mempty) "coinbase tx failure" + | otherwise -> (`T2` Nothing) <$> (Left <$> failTxWith (PactError EvalError (Info Nothing) [] mempty) "coinbase tx failure") _ -> do cr <- catchesPactError logger (onChainErrorPrintingFor txCtx) $ applyExec' 0 interp cexec [] [] chash managedNamespacePolicy @@ -551,7 +556,7 @@ applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(Pa case cr of Left e | throwCritical -> throwM $ CoinbaseFailure $ sshow e - | otherwise -> (`T2` Nothing) <$> failTxWith e "coinbase tx failure" + | otherwise -> (`T2` Nothing) <$> (Left <$> failTxWith e "coinbase tx failure") Right er -> do debug $! "successful coinbase of " @@ -564,7 +569,7 @@ applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(Pa logs <- use txLogs return $! T2 - CommandResult + (Left $ CommandResult { _crReqKey = rk , _crTxId = _erTxId er , _crResult = PactResult (Right (last (_erOutput er))) @@ -573,7 +578,7 @@ applyCoinbase v logger (dbEnv, coreDb) (Miner mid mks@(MinerKeys mk)) reward@(Pa , _crContinuation = _erExec er , _crMetaData = Nothing , _crEvents = _erEvents er - } + }) upgradedModuleCache applyLocal @@ -594,7 +599,7 @@ applyLocal -- ^ command with payload to execute -> (ModuleCache, CoreModuleCache) -> ExecutionConfig - -> IO (CommandResult [TxLogJson]) + -> IO (Either (CommandResult [TxLogJson]) PCore.CommandResult) applyLocal logger gasLogger (dbEnv, coreDb) (gasModel, gasModelCore) txCtx spv cmdIn (mc, cmc) execConfig = evalTransactionM tenv txst go where @@ -607,14 +612,14 @@ applyLocal logger gasLogger (dbEnv, coreDb) (gasModel, gasModelCore) txCtx spv c !gasPrice = view cmdGasPrice cmd !gasLimit = view cmdGasLimit cmd tenv = TransactionEnv Local dbEnv coreDb logger gasLogger (ctxToPublicData txCtx) spv nid gasPrice - rk (fromIntegral gasLimit) execConfig Nothing usePactTng + rk (fromIntegral gasLimit) execConfig Nothing usePact5 txst = TransactionState mc cmc mempty 0 Nothing gasModel gasModelCore mempty gas0 = initialGasOf (_cmdPayload cmdIn) currHeight = ctxCurrentBlockHeight txCtx cid = V._chainId txCtx v = _chainwebVersion txCtx allVerifiers = verifiersAt v cid currHeight - usePactTng = chainweb223Pact (ctxVersion txCtx) (ctxChainId txCtx) currHeight + usePact5 = pact5 (ctxVersion txCtx) (ctxChainId txCtx) currHeight -- Note [Throw out verifier proofs eagerly] !verifiersWithNoProof = (fmap . fmap) (\_ -> ()) verifiers @@ -626,7 +631,7 @@ applyLocal logger gasLogger (dbEnv, coreDb) (gasModel, gasModelCore) txCtx spv c case verifierResult of Left err -> do let errMsg = "Tx verifier error: " <> getVerifierError err - failTxWith + Left <$> failTxWith (PactError TxFailure def [] (pretty errMsg)) errMsg Right verifierGasRemaining -> do @@ -640,16 +645,30 @@ applyLocal logger gasLogger (dbEnv, coreDb) (gasModel, gasModelCore) txCtx spv c pure $ setCoreModuleCache cmc' def cr <- catchesPactError logger PrintsUnexpectedError $! case m of Exec em -> do - if usePactTng then applyExecTng gas1 coreState em signers chash managedNamespacePolicy + if usePact5 then applyExecTng gas1 coreState em signers chash managedNamespacePolicy else applyExec gas1 interp em signers verifiersWithNoProof chash managedNamespacePolicy Continuation cm -> - if usePactTng then applyContinuationTng gas1 coreState cm signers chash managedNamespacePolicy + if usePact5 then applyContinuationTng gas1 coreState cm signers chash managedNamespacePolicy else applyContinuation gas1 interp cm signers chash managedNamespacePolicy + if usePactTng then do + cr <- case m of + Exec em -> applyExecTng gas1 coreState em signers chash managedNamespacePolicy + Continuation cm -> applyContinuationTng gas1 coreState cm signers chash managedNamespacePolicy + + Right <$> case PCore._pactResult $ PCore._crResult cr of + Left e -> do + failTx5With e "applyLocal" + pure cr + Right _ -> pure cr + else do + cr <- catchesPactError logger PrintsUnexpectedError $! case m of + Exec em -> applyExec gas1 interp em signers verifiersWithNoProof chash managedNamespacePolicy + Continuation cm -> applyContinuation gas1 interp cm signers chash managedNamespacePolicy - case cr of - Left e -> failTxWith e "applyLocal" - Right r -> return $! r { _crMetaData = Just (J.toJsonViaEncode $ ctxToPublicData' txCtx) } + Left <$> case cr of + Left e -> failTxWith e "applyLocal" + Right r -> return $! r { _crMetaData = Just (J.toJsonViaEncode $ ctxToPublicData' txCtx) } go = checkTooBigTx gas0 gasLimit (applyVerifiers $ _pPayload $ _cmdPayload cmd) return @@ -676,9 +695,9 @@ readInitModules = do rk = RequestKey chash nid = Nothing chash = pactInitialHash - usePactTng = True + usePact5 = True tenv = TransactionEnv Local dbEnv coreDb logger Nothing (ctxToPublicData txCtx) noSPVSupport nid 0.0 - rk 0 def Nothing usePactTng + rk 0 def Nothing usePact5 txst = TransactionState mempty mempty mempty 0 Nothing (_geGasModel freeGasEnv) PCore.freeGasModel mempty interp = defaultInterpreter die msg = throwM $ PactInternalError $ "readInitModules: " <> msg @@ -819,11 +838,25 @@ failTxWith err msg = do l <- view txLogger liftIO $ logFunction l L.Info - (TxFailureLog rk err msg) + (Pact4TxFailureLog rk err msg) return $! CommandResult rk Nothing (PactResult (Left err)) gas (Just logs) Nothing Nothing [] +failTx5With + :: (Logger logger) + => PCore.PactError PCore.SpanInfo + -> Text + -> TransactionM logger p () +failTx5With err msg = do + logs <- use txLogs + gas <- view txGasLimit -- error means all gas was charged + rk <- view txRequestKey + l <- view txLogger + + liftIO $ logFunction l L.Info + (Pact5TxFailureLog rk err msg) + runPayload :: (Logger logger) => Command (Payload PublicMeta ParsedCode) @@ -841,15 +874,37 @@ runPayload cmd nsp = do (fmap . fmap) (\_ -> ()) verifiers `using` (traverse . traverse) rseq - usePactTng <- view txUsePactTng + usePact5 <- view txusePact5 case payload of - Exec pm -> do - if usePactTng then applyExecTng g0 coreState pm signers chash nsp - else applyExec g0 interp pm signers verifiersWithNoProof chash nsp - Continuation ym -> - if usePactTng then applyContinuationTng g0 coreState ym signers chash nsp - else applyContinuation g0 interp ym signers chash nsp + Exec pm -> applyExec g0 interp pm signers verifiersWithNoProof chash nsp + Continuation ym -> applyContinuation g0 interp ym signers chash nsp + where + verifiers = fromMaybe [] $ _pVerifiers $ _cmdPayload cmd + signers = _pSigners $ _cmdPayload cmd + chash = toUntypedHash $ _cmdHash cmd + payload = _pPayload $ _cmdPayload cmd + +runPayloadTng + :: (Logger logger) + => Command (Payload PublicMeta ParsedCode) + -> NamespacePolicy + -> TransactionM logger p PCore.CommandResult +runPayloadTng cmd nsp = do + g0 <- use txGasUsed + interp <- gasInterpreter g0 + coreState <- do + cmc <- use txCoreCache + pure $ setCoreModuleCache cmc def + + -- Note [Throw out verifier proofs eagerly] + let !verifiersWithNoProof = + (fmap . fmap) (\_ -> ()) verifiers + `using` (traverse . traverse) rseq + + case payload of + Exec pm -> applyExecTng g0 coreState pm signers chash nsp + Continuation ym -> applyContinuationTng g0 coreState ym signers chash nsp where verifiers = fromMaybe [] $ _pVerifiers $ _cmdPayload cmd @@ -866,7 +921,7 @@ runGenesis -> Interpreter p -> TransactionM logger p (CommandResult [TxLogJson]) runGenesis cmd nsp interp = case payload of - Exec pm -> + Exec pm -> -- TODO: make it work for the core applyExec 0 interp pm signers verifiersWithNoProof chash nsp Continuation ym -> applyContinuation 0 interp ym signers chash nsp @@ -1003,11 +1058,13 @@ applyExecTng -> [Signer] -> Hash -> NamespacePolicy - -> TransactionM logger p (CommandResult [TxLogJson]) + -> TransactionM logger p PCore.CommandResult -- (Either (PCore.PactError PCore.SpanInfo) (PCore.EvalResult [PCore.TopLevel PCore.SpanInfo])) applyExecTng initialGas coreState em senderSigs hsh nsp = do er <- applyExecTng' initialGas coreState em senderSigs hsh nsp - mkCommandResultFromCoreResult er + -- return er + pure $ PCore.CommandResult $ PCore.PactResult $ PCore.PERTopLevel <$> er + -- either id mkCommandResultFromCoreResult er -- | Variation on 'applyExec' that returns 'EvalResult' as opposed to -- wrapping it up in a JSON result. @@ -1055,7 +1112,7 @@ applyExecTng' -> [Signer] -> Hash -> NamespacePolicy - -> TransactionM logger p (PCore.EvalResult [PCore.TopLevel PCore.SpanInfo]) + -> TransactionM logger p (Either (PCore.PactError PCore.SpanInfo) (PCore.EvalResult [PCore.TopLevel PCore.SpanInfo])) applyExecTng' (Gas initialGas) coreState (ExecMsg parsedCode execData) senderSigs hsh nsp | null (_pcExps parsedCode) = throwCmdEx "No expressions found" | otherwise = do @@ -1080,12 +1137,14 @@ applyExecTng' (Gas initialGas) coreState (ExecMsg parsedCode execData) senderSig Just (Gas fee) -> er' { PCore._erGas = PCore.Gas $ fromIntegral fee } txCoreCache .= (CoreModuleCache $ PCore._erLoadedModules er') - return quirkedEvalResult + return $ Right quirkedEvalResult Left err -> do -- TRACE.traceShowM ("CORE.applyExec' modulecache" :: String, show $ _getCoreModuleCache ccache) TRACE.traceShowM ("CORE.applyExec'!!!!" :: String, show err, show $ PCore.RawCode $ _pcCode parsedCode) + -- TODO: return either an error instead of throwing an exception here fatal $ "Pact Tng execution failed: " <> (T.pack $ show $ PCore.pretty err) + return $ Left err enablePactEvents' :: ChainwebVersion -> V.ChainId -> BlockHeight -> [ExecutionFlag] enablePactEvents' v cid bh = [FlagDisablePactEvents | not (enablePactEvents v cid bh)] @@ -1174,17 +1233,18 @@ applyContinuationTng -> [Signer] -> Hash -> NamespacePolicy - -> TransactionM logger p (CommandResult [TxLogJson]) + -> TransactionM logger p PCore.CommandResult -- (Either (PCore.PactError PCore.SpanInfo) (PCore.EvalResult [PCore.TopLevel PCore.SpanInfo])) applyContinuationTng initialGas coreState cm senderSigs hsh nsp = do er <- applyContinuationTng' initialGas coreState cm senderSigs hsh nsp - cr <- mkCommandResultFromCoreResult er + -- return er + -- either id mkCommandResultFromCoreResult + pure $ PCore.CommandResult $ PCore.PactResult $ PCore.PERTopLevel <$> er + -- for_ _erLogGas $ \gl -> gasLog $ "gas logs: " <> sshow gl -- TODO: set tx warnings to eval warnings -- txWarnings <>= _erWarnings - return cr - setEnvGas :: Gas -> EvalEnv e -> TransactionM logger p () setEnvGas initialGas = liftIO . views eeGas (`writeIORef` gasToMilliGas initialGas) @@ -1230,7 +1290,7 @@ applyContinuationTng' -> [Signer] -> Hash -> NamespacePolicy - -> TransactionM logger p (PCore.EvalResult [PCore.TopLevel PCore.SpanInfo]) + -> TransactionM logger p (Either (PCore.PactError PCore.SpanInfo) (PCore.EvalResult [PCore.TopLevel PCore.SpanInfo])) applyContinuationTng' initialGas coreState (ContMsg pid s rb d proof) senderSigs hsh nsp = do evalEnv <- mkCoreEvalEnv nsp (MsgData d pactStep hsh senderSigs []) @@ -1260,9 +1320,8 @@ applyContinuationTng' initialGas coreState (ContMsg pid s rb d proof) senderSigs Just (Gas fee) -> er' { PCore._erGas = PCore.Gas $ fromIntegral fee } txCoreCache .= (CoreModuleCache $ PCore._erLoadedModules er') - return quirkedEvalResult - Left err -> do - fatal $ "Pact Tng execution failed: " <> (T.pack $ show $ PCore.pretty err) + return $ Right $ quirkedEvalResult + err -> pure err where pactStep = Just $ PactStep s rb pid Nothing @@ -1325,8 +1384,8 @@ buyGas txCtx cmd (Miner mid mks) = go result <- locally txQuirkGasFee (const Nothing) $ applyExec' 0 (interp mcache) buyGasCmd signersWithDebit [] bgHash managedNamespacePolicy - usePactTng <- view txUsePactTng - if usePactTng then do + usePact5 <- view txusePact5 + if usePact5 then do evalEnv <- mkCoreEvalEnv managedNamespacePolicy (MsgData execData Nothing bgHash signersWithDebit []) let @@ -1447,7 +1506,7 @@ redeemGas txCtx cmd (Miner mid mks) = do let sender = view (cmdPayload . pMeta . pmSender) cmd fee <- gasSupplyOf <$> use txGasUsed <*> view txGasPrice -- if we're past chainweb 2.24, we don't use defpacts for gas - usePactTng <- view txUsePactTng + usePact5 <- view txusePact5 let coreState = setCoreModuleCache cmcache $ initCoreCapabilities [core_magic_GAS] @@ -1467,7 +1526,7 @@ redeemGas txCtx cmd (Miner mid mks) = do (Hash chash) = toUntypedHash (_cmdHash cmd) rgHash = Hash (chash <> "-redeemgas") locally txQuirkGasFee (const Nothing) $ - if usePactTng then do + if usePact5 then do evalEnv <- mkCoreEvalEnv managedNamespacePolicy (MsgData execData Nothing rgHash (_pSigners $ _cmdPayload cmd) []) er <- liftIO $ PCore.evalTermExec evalEnv coreState $ mkRedeemGasCoreTerm mid sender @@ -1506,13 +1565,13 @@ redeemGas txCtx cmd (Miner mid mks) = do let redeemGasCmd = ContMsg gid 1 False (toLegacyJson $ object [ "fee" A..= toJsonViaEncode fee ]) Nothing - fmap _crEvents $ locally txQuirkGasFee (const Nothing) $ - if usePactTng then - applyContinuationTng 0 coreState redeemGasCmd + locally txQuirkGasFee (const Nothing) $ + if usePact5 then do + r <- applyContinuationTng 0 coreState redeemGasCmd (_pSigners $ _cmdPayload cmd) (toUntypedHash $ _cmdHash cmd) managedNamespacePolicy - else - applyContinuation 0 (initState mcache) redeemGasCmd + return [] + else fmap _crEvents $ applyContinuation 0 (initState mcache) redeemGasCmd (_pSigners $ _cmdPayload cmd) (toUntypedHash $ _cmdHash cmd) managedNamespacePolicy @@ -1547,9 +1606,9 @@ checkTooBigTx :: (Logger logger) => Gas -> GasLimit - -> TransactionM logger p (CommandResult [TxLogJson]) - -> (CommandResult [TxLogJson] -> TransactionM logger p (CommandResult [TxLogJson])) - -> TransactionM logger p (CommandResult [TxLogJson]) + -> TransactionM logger p (Either (CommandResult [TxLogJson]) PCore.CommandResult) + -> ((CommandResult [TxLogJson]) -> TransactionM logger p ((CommandResult [TxLogJson]))) + -> TransactionM logger p (Either (CommandResult [TxLogJson]) PCore.CommandResult) checkTooBigTx initialGas gasLimit next onFail | initialGas >= fromIntegral gasLimit = do @@ -1557,8 +1616,9 @@ checkTooBigTx initialGas gasLimit next onFail $ "Tx too big (" <> pretty initialGas <> "), limit " <> pretty gasLimit - r <- failTxWith pe "Tx too big" - onFail r + Left <$> do + r <- failTxWith pe "Tx too big" + onFail r | otherwise = next gasInterpreter :: Gas -> TransactionM logger db (Interpreter p) diff --git a/src/Chainweb/Pact/Transactions/CoinCoreV4Transactions.hs b/src/Chainweb/Pact/Transactions/CoinCoreV4Transactions.hs index 490975acba..fcf511a4d2 100644 --- a/src/Chainweb/Pact/Transactions/CoinCoreV4Transactions.hs +++ b/src/Chainweb/Pact/Transactions/CoinCoreV4Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiN190bVdLMmZydWlOVG5lejFPSERud19ZalJhNUVnVDl2WlphcWoxLS1XRSIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6e1wibnMtYWRtaW4ta2V5c2V0XCI6W10sXCJucy1vcGVyYXRlLWtleXNldFwiOltdLFwibnMtZ2VuZXNpcy1rZXlzZXRcIjp7XCJwcmVkXCI6XCI9XCIsXCJrZXlzXCI6W119fSxcImNvZGVcIjpcIihtb2R1bGUgbnMgR09WRVJOQU5DRVxcbiAgXFxcIkFkbWluaXN0ZXJzIGRlZmluaXRpb24gb2YgbmV3IG5hbWVzcGFjZXMgaW4gQ2hhaW53ZWIuXFxcIlx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V5c2V0LiBcXFwiXFxuXFxuICAgICh3aXRoLWNhcGFiaWxpdHkgKE9QRVJBVEUpXFxuXFxuICAgICAgKHZhbGlkYXRlLW5hbWUgbnMtbmFtZSlcXG5cXG4gICAgICAod3JpdGUgcmVnaXN0cnkgbnMtbmFtZVxcbiAgICAgICAgeyAnYWRtaW4tZ3VhcmQ6IGd1YXJkXFxuICAgICAgICAsICdhY3RpdmU6IGFjdGl2ZSB9KVxcblxcbiAgICAgIFxcXCJSZWdpc3RlciBlbnRyeSB3cml0dGVuXFxcIikpXFxuXFxuICAoZGVmdW4gcXVlcnk6b2JqZWN0e3JlZy1lbnRyeX1cXG4gICAgICAoIG5zLW5hbWU6c3RyaW5nIClcXG4gICAgKHJlYWQgcmVnaXN0cnkgbnMtbmFtZSkpXFxuXFxuICApXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJsb2FkLW5zLWRldm5ldC1zZW5kZXIwMFwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/CoinV3Transactions.hs b/src/Chainweb/Pact/Transactions/CoinV3Transactions.hs index f027f015f3..63f937fef1 100644 --- a/src/Chainweb/Pact/Transactions/CoinV3Transactions.hs +++ b/src/Chainweb/Pact/Transactions/CoinV3Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXN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dpdGgtY2FwYWJpbGl0eSAoUkVMRUFTRV9BTExPQ0FUSU9OIGFjY291bnQgYmFsYW5jZSlcXG5cXG4gICAgICAgIChlbmZvcmNlLWd1YXJkIGd1YXJkKVxcblxcbiAgICAgICAgKHdpdGgtY2FwYWJpbGl0eSAoQ1JFRElUIGFjY291bnQpXFxuICAgICAgICAgIChlbWl0LWV2ZW50IChUUkFOU0ZFUiBcXFwiXFxcIiBhY2NvdW50IGJhbGFuY2UpKVxcbiAgICAgICAgICAoY3JlZGl0IGFjY291bnQgZ3VhcmQgYmFsYW5jZSlcXG5cXG4gICAgICAgICAgKHVwZGF0ZSBhbGxvY2F0aW9uLXRhYmxlIGFjY291bnRcXG4gICAgICAgICAgICB7IFxcXCJyZWRlZW1lZFxcXCIgOiB0cnVlXFxuICAgICAgICAgICAgLCBcXFwiYmFsYW5jZVxcXCIgOiAwLjBcXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICBcXFwiQWxsb2NhdGlvbiBzdWNjZXNzZnVsbHkgcmVsZWFzZWQgdG8gbWFpbiBsZWRnZXJcXFwiKSlcXG4gICAgKSkpXFxuXFxuKVxcblwifX0sXCJzaWduZXJzXCI6W10sXCJtZXRhXCI6e1wiY3JlYXRpb25UaW1lXCI6MCxcInR0bFwiOjE3MjgwMCxcImdhc0xpbWl0XCI6MCxcImNoYWluSWRcIjpcIlwiLFwiZ2FzUHJpY2VcIjowLFwic2VuZGVyXCI6XCJcIn0sXCJub25jZVwiOlwiY29pbi1jb250cmFjdC12M1wifSJ9" ] diff --git a/src/Chainweb/Pact/Transactions/CoinV4Transactions.hs b/src/Chainweb/Pact/Transactions/CoinV4Transactions.hs index d2bc73f404..7bf81d6559 100644 --- a/src/Chainweb/Pact/Transactions/CoinV4Transactions.hs +++ b/src/Chainweb/Pact/Transactions/CoinV4Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoieW5ucDFYVVNSTjJrMUYwYTZ2dXM3RFp0SDZjcHN6MVhmX0d3V0xnTFhTTSIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUteGNoYWluLXYxXFxuXFxuICBcXFwiIFRoaXMgaW50ZXJmYWNlIG9mZmVycyBhIHN0YW5kYXJkIGNhcGFiaWxpdHkgZm9yIGNyb3NzLWNoYWluIFxcXFxcXG4gIFxcXFwgdHJhbnNmZXJzIGFuZCBhc3NvY2lhdGVkIGV2ZW50cy4gXFxcIlxcblxcbiAgKGRlZmNhcCBUUkFOU0ZFUl9YQ0hBSU46Ym9vbFxcbiAgICAoIHNlbmRlcjpzdHJpbmdcXG4gICAgICByZWNlaXZlcjpzdHJpbmdcXG4gICAgICBhbW91bnQ6ZGVjaW1hbFxcbiAgICAgIHRhcmdldC1jaGFpbjpzdHJpbmdcXG4gICAgKVxcbiAgICBAZG9jIFxcXCIgTWFuYWdlZCBjYXBhYmlsaXR5IHNlYWxpbmcgQU1PVU5UIGZvciB0cmFuc2ZlciBcXFxcXFxuICAgICAgICAgXFxcXCBmcm9tIFNFTkRFUiB0byBSRUNFSVZFUiBvbiBUQVJHRVQtQ0hBSU4uIFBlcm1pdHMgXFxcXFxcbiAgICAgICAgIFxcXFwgYW55IG51bWJlciBvZiBjcm9zcy1jaGFpbiB0cmFuc2ZlcnMgdXAgdG8gQU1PVU5ULlxcXCJcXG5cXG4gICAgQG1hbmFnZWQgYW1vdW50IFRSQU5TRkVSX1hDSEFJTi1tZ3JcXG4gICAgKVxcblxcbiAgKGRlZnVuIFRSQU5TRkVSX1hDSEFJTi1tZ3I6ZGVjaW1hbFxcbiAgICAoIG1hbmFnZWQ6ZGVjaW1hbFxcbiAgICAgIHJlcXVlc3RlZDpkZWNpbWFsXFxuICAgIClcXG4gICAgQGRvYyBcXFwiIEFsbG93cyBUUkFOU0ZFUi1YQ0hBSU4gQU1PVU5UIHRvIGJlIGxlc3MgdGhhbiBvciBcXFxcXFxuICAgICAgICAgXFxcXCBlcXVhbCBtYW5hZ2VkIHF1YW50aXR5IGFzIGEgb25lLXNob3QsIHJldHVybmluZyAwLjAuXFxcIlxcbiAgKVxcblxcbiAgKGRlZmNhcCBUUkFOU0ZFUl9YQ0hBSU5fUkVDRDpib29sXFxuICAgICggc2VuZGVyOnN0cmluZ1xcbiAgICAgIHJlY2VpdmVyOnN0cmluZ1xcbiAgICAgIGFtb3VudDpkZWNpbWFsXFxuICAgICAgc291cmNlLWNoYWluOnN0cmluZ1xcbiAgICApXFxuICAgIEBkb2MgXFxcIkV2ZW50IGVtaXR0ZWQgb24gcmVjZWlwdCBvZiBjcm9zcy1jaGFpbiB0cmFuc2Zlci5cXFwiXFxuICAgIEBldmVudFxcbiAgKVxcbilcXG5cIn19LFwic2lnbmVyc1wiOltdLFwibWV0YVwiOntcImNyZWF0aW9uVGltZVwiOjAsXCJ0dGxcIjoxNzI4MDAsXCJnYXNMaW1pdFwiOjAsXCJjaGFpbklkXCI6XCJcIixcImdhc1ByaWNlXCI6MCxcInNlbmRlclwiOlwiXCJ9LFwibm9uY2VcIjpcImdlbmVzaXMteGNoYWluXCJ9In0" , diff --git a/src/Chainweb/Pact/Transactions/CoinV5Transactions.hs b/src/Chainweb/Pact/Transactions/CoinV5Transactions.hs index 39c9d259a5..17d643a2d7 100644 --- a/src/Chainweb/Pact/Transactions/CoinV5Transactions.hs +++ b/src/Chainweb/Pact/Transactions/CoinV5Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiOERDei1xb2pVcWUyRTJ6R1V1clhuanBJUHlxSFVlcFlmdFdockhUZVd3SSIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIlxcbihtb2R1bGUgY29pbiBHT1ZFUk5BTkNFXFxuXFxuICBAZG9jIFxcXCInY29pbicgcmVwcmVzZW50cyB0aGUgS2FkZW5hIENvaW4gQ29udHJhY3QuIFRoaXMgY29udHJhY3QgcHJvdmlkZXMgYm90aCB0aGUgXFxcXFxcbiAgXFxcXGJ1eS9yZWRlZW0gZ2FzIHN1cHBvcnQgaW4gdGhlIGZvcm0gb2YgJ2Z1bmQtdHgnLCBhcyB3ZWxsIGFzIHRyYW5zZmVyLCAgICAgICBcXFxcXFxuICBcXFxcY3JlZGl0LCBkZWJpdCwgY29pbmJhc2UsIGFjY291bnQgY3JlYXRpb24gYW5kIHF1ZXJ5LCBhcyB3ZWxsIGFzIFNQViBidXJuICAgIFxcXFxcXG4gIFxcXFxjcmVhdGUuIFRvIGFjY2VzcyB0aGUgY29pbiBjb250cmFjdCwgeW91IG1heSB1c2UgaXRzIGZ1bGx5LXF1YWxpZmllZCBuYW1lLCAgXFxcXFxcbiAgXFxcXG9yIGlzc3VlIHRoZSAnKHVzZSBjb2luKScgY29tbWFuZCBpbiB0aGUgYm9keSBvZiBhIG1vZHVsZSBkZWNsYXJhdGlvbi5cXFwiXFxuXFxuICBAbW9kZWxcXG4gICAg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h3aXRoLWNhcGFiaWxpdHkgKFJFTEVBU0VfQUxMT0NBVElPTiBhY2NvdW50IGJhbGFuY2UpXFxuXFxuICAgICAgICAoZW5mb3JjZS1ndWFyZCBndWFyZClcXG5cXG4gICAgICAgICh3aXRoLWNhcGFiaWxpdHkgKENSRURJVCBhY2NvdW50KVxcbiAgICAgICAgICAoZW1pdC1ldmVudCAoVFJBTlNGRVIgXFxcIlxcXCIgYWNjb3VudCBiYWxhbmNlKSlcXG4gICAgICAgICAgKGNyZWRpdCBhY2NvdW50IGd1YXJkIGJhbGFuY2UpXFxuXFxuICAgICAgICAgICh1cGRhdGUgYWxsb2NhdGlvbi10YWJsZSBhY2NvdW50XFxuICAgICAgICAgICAgeyBcXFwicmVkZWVtZWRcXFwiIDogdHJ1ZVxcbiAgICAgICAgICAgICwgXFxcImJhbGFuY2VcXFwiIDogMC4wXFxuICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgXFxcIkFsbG9jYXRpb24gc3VjY2Vzc2Z1bGx5IHJlbGVhc2VkIHRvIG1haW4gbGVkZ2VyXFxcIikpXFxuICAgICkpKVxcblxcbilcXG5cIn19LFwic2lnbmVyc1wiOltdLFwibWV0YVwiOntcImNyZWF0aW9uVGltZVwiOjAsXCJ0dGxcIjoxNzI4MDAsXCJnYXNMaW1pdFwiOjAsXCJjaGFpbklkXCI6XCJcIixcImdhc1ByaWNlXCI6MCxcInNlbmRlclwiOlwiXCJ9LFwibm9uY2VcIjpcImNvaW4tY29udHJhY3QtdjVcIn0ifQ" ] diff --git a/src/Chainweb/Pact/Transactions/CoinV6Transactions.hs b/src/Chainweb/Pact/Transactions/CoinV6Transactions.hs index ad5d8a6cb3..5342a45303 100644 --- a/src/Chainweb/Pact/Transactions/CoinV6Transactions.hs +++ b/src/Chainweb/Pact/Transactions/CoinV6Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiOGJXY0xlSzFSYUZYVGVLbnhzQ2tuWW5QcnAza29vX0cxTk05eHl0VmFjVSIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIlxcbihtb2R1bGUgY29pbiBHT1ZFUk5BTkNFXFxuXFxuICBAZG9jIFxcXCInY29pbicgcmVwcmVzZW50cyB0aGUgS2FkZW5hIENvaW4gQ29udHJhY3QuIFRoaXMgY29udHJhY3QgcHJvdmlkZXMgYm90aCB0aGUgXFxcXFxcbiAgXFxcXGJ1eS9yZWRlZW0gZ2FzIHN1cHBvcnQgaW4gdGhlIGZvcm0gb2YgJ2Z1bmQtdHgnLCBhcyB3ZWxsIGFzIHRyYW5zZmVyLCAgICAgICBcXFxcXFxuICBcXFxcY3JlZGl0LCBkZWJpdCwgY29pbmJhc2UsIGFjY291bnQgY3JlYXRpb24gYW5kIHF1ZXJ5LCBhcyB3ZWxsIGFzIFNQViBidXJuICAgIFxcXFxcXG4gIFxcXFxjcmVhdGUuIFRvIGFjY2VzcyB0aGUgY29pbiBjb250cmFjdCwgeW91IG1heSB1c2UgaXRzIGZ1bGx5LXF1YWxpZmllZCBuYW1lLCAgXFxcXFxcbiAgXFxcXG9yIGlzc3VlIHRoZSAnKHVzZSBjb2luKScgY29tbWFuZCBpbiB0aGUgYm9keSBvZiBhIG1vZHVsZSBkZWNsYXJhdGlvbi5cXFwiXFxuXFxuICBAbW9kZWxcXG4gICAgWyAoZGVmcHJvcGVydHkgY29uc2VydmVzLW1hc3NcXG4gICAgICAgICg9IChjb2x1bW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cXG5cIn19LFwic2lnbmVyc1wiOltdLFwibWV0YVwiOntcImNyZWF0aW9uVGltZVwiOjAsXCJ0dGxcIjoxNzI4MDAsXCJnYXNMaW1pdFwiOjAsXCJjaGFpbklkXCI6XCJcIixcImdhc1ByaWNlXCI6MCxcInNlbmRlclwiOlwiXCJ9LFwibm9uY2VcIjpcImNvaW4tY29udHJhY3QtdjZcIn0ifQ" ] diff --git a/src/Chainweb/Pact/Transactions/FungibleV2Transactions.hs b/src/Chainweb/Pact/Transactions/FungibleV2Transactions.hs index a94db04c20..9e36bd5a1e 100644 --- a/src/Chainweb/Pact/Transactions/FungibleV2Transactions.hs +++ b/src/Chainweb/Pact/Transactions/FungibleV2Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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BiYWxhbmNlLCB3aXRoIEdVQVJEIGNvbnRyb2xsaW5nIGFjY2Vzcy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIHJvdGF0ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" ] diff --git a/src/Chainweb/Pact/Transactions/Mainnet0Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet0Transactions.hs index 6ba5186ede..54d975ec7c 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet0Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet0Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJ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2VkIGRlY2ltYWwgcHJlY2lzaW9uLlxcXCJcXG4gICAgIClcXG5cXG4gICAoZGVmdW4gZW5mb3JjZS11bml0OmJvb2xcXG4gICAgICggYW1vdW50OmRlY2ltYWwgKVxcbiAgICAgXFxcIiBFbmZvcmNlIG1pbmltdW0gcHJlY2lzaW9uIGFsbG93ZWQgZm9yIHRyYW5zYWN0aW9ucy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIGNyZWF0ZS1hY2NvdW50OnN0cmluZ1xcbiAgICAgKCBhY2NvdW50OnN0cmluZ1xcbiAgICAgICBndWFyZDpndWFyZFxcbiAgICAgKVxcbiAgICAgXFxcIiBDcmVhdGUgQUNDT1VOVCB3aXRoIDAuMCBiYWxhbmNlLCB3aXRoIEdVQVJEIGNvbnRyb2xsaW5nIGFjY2Vzcy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIHJvdGF0ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet1Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet1Transactions.hs index 09024cf524..bf252e1696 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet1Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet1Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgOyBTY2hlbWFcXG5cXG4gICAoZGVmc2NoZW1hIGFjY291bnQtZGV0YWlsc1xcbiAgICBAZG9jIFxcXCJTY2hlbWEgZm9yIHJlc3VsdHMgb2YgJ2FjY291bnQnIG9wZXJhdGlvbi5cXFwiXFxuICAgIEBtb2RlbCBbIChpbnZhcmlhbnQgKCE9IFxcXCJcXFwiIHNlbmRlcikpIF1cXG5cXG4gICAgYWNjb3VudDpzdHJpbmdcXG4gICAgYmFsYW5jZTpkZWNpbWFsXFxuICAgIGd1YXJk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ICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet2Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet2Transactions.hs index 2ed4c34336..91dadd48a8 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet2Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet2Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOy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50OnN0cmluZ1xcbiAgICAgICBndWFyZDpndWFyZFxcbiAgICAgKVxcbiAgICAgXFxcIiBDcmVhdGUgQUNDT1VOVCB3aXRoIDAuMCBiYWxhbmNlLCB3aXRoIEdVQVJEIGNvbnRyb2xsaW5nIGFjY2Vzcy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIHJvdGF0ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet3Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet3Transactions.hs index cce8a14b2c..6f0668a308 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet3Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet3Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =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WJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet4Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet4Transactions.hs index 114ad275ff..96e2ee5527 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet4Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet4Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgOyBTY2hlbWFcXG5cXG4gICAoZGVmc2NoZW1hIGFjY291bnQtZGV0YWlsc1xcbiAgICBAZG9jIFxcXCJTY2hlbWEgZm9yIHJlc3VsdHMgb2YgJ2FjY291bnQnIG9wZXJhdGlvbi5cXFwiXFxuICAgIEBtb2RlbCBbIChpbnZhcmlhbnQgKCE9IFxcXC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wiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet5Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet5Transactions.hs index c24ec780d1..8c34125441 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet5Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet5Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9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0aW9ucy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIGNyZWF0ZS1hY2NvdW50OnN0cmluZ1xcbiAgICAgKCBhY2NvdW50OnN0cmluZ1xcbiAgICAgICBndWFyZDpndWFyZFxcbiAgICAgKVxcbiAgICAgXFxcIiBDcmVhdGUgQUNDT1VOVCB3aXRoIDAuMCBiYWxhbmNlLCB3aXRoIEdVQVJEIGNvbnRyb2xsaW5nIGFjY2Vzcy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIHJvdGF0ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet6Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet6Transactions.hs index 0183e4d61d..db45c5e0ec 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet6Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet6Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgOyBTY2hlbWFcXG5cXG4gICAoZGVmc2NoZW1hIGFjY291bnQtZGV0YWlsc1xcbiAgICBAZG9jIFxcXCJTY2hlbWEgZm9yIHJlc3VsdHMgb2YgJ2FjY291bnQnIG9wZXJhdGlvbi5cXFwiXFxuICAgIEBtb2RlbCBbIChpbnZhcmlhbnQgKCE9IFxcXCJcXFwiIHNlbmRlcikpIF1cXG5cXG4gICAgYWNjb3VudDpzdHJpbmdcXG4gICAgYmFsYW5jZTpkZWNpbWFsXFxuICAgIGd1YXJkOmd1YXJkKVxcblxcblxcbiAgIDsgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxcbiAgIDsgQ2Fwc1xcblxcbiAgIChkZWZjYXAgVFJBTlNGRVI6Ym9vbFxcbiAgICAgK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XRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet7Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet7Transactions.hs index 383a27cfde..e9a9596147 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet7Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet7Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgOyBTY2hlbWFcXG5cXG4gICAoZGVmc2NoZW1hIGFjY291bnQtZGV0YWlsc1xcbiAgICBAZG9jIFxcXCJTY2hlbWEgZm9y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ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet8Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet8Transactions.hs index e18f1a3f43..fe75be81a8 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet8Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet8Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIj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1vdW50OmRlY2ltYWwgKVxcbiAgICAgXFxcIiBFbmZvcmNlIG1pbmltdW0gcHJlY2lzaW9uIGFsbG93ZWQgZm9yIHRyYW5zYWN0aW9ucy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIGNyZWF0ZS1hY2NvdW50OnN0cmluZ1xcbiAgICAgKCBhY2NvdW50OnN0cmluZ1xcbiAgICAgICBndWFyZDpndWFyZFxcbiAgICAgKVxcbiAgICAgXFxcIiBDcmVhdGUgQUNDT1VOVCB3aXRoIDAuMCBiYWxhbmNlLCB3aXRoIEdVQVJEIGNvbnRyb2xsaW5nIGFjY2Vzcy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIHJvdGF0ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/Mainnet9Transactions.hs b/src/Chainweb/Pact/Transactions/Mainnet9Transactions.hs index b4bb7b5cc4..8f0b7c1a03 100644 --- a/src/Chainweb/Pact/Transactions/Mainnet9Transactions.hs +++ b/src/Chainweb/Pact/Transactions/Mainnet9Transactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC0wMDAyLiBcXFwiXFxuXFxuICAgOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgOyBTY2hlbWFcXG5cXG4gICAoZGVmc2NoZW1hIGFjY291bnQtZGV0YWlsc1xcbiAgICBAZG9jIFxcXCJTY2hlbWEgZm9yIHJlc3VsdHMgb2YgJ2FjY291bnQnIG9wZXJhdGlvbi5cXFwiXFxuICAgIEBtb2RlbCBbIChpbnZhcmlhbnQgKCE9IFxcXCJcXFwiIHNlbmRlcikpIF1cXG5cXG4gICAgYWNjb3VudDpzdHJpbmdcXG4gICAgYmFsYW5jZTpkZWNpbWFsXFxuICAgIGd1YXJkOmd1YXJkKVxcblxcblxcbiAgIDsgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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XFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/MainnetKADTransactions.hs b/src/Chainweb/Pact/Transactions/MainnetKADTransactions.hs index 4e25546216..2f20afed6a 100644 --- a/src/Chainweb/Pact/Transactions/MainnetKADTransactions.hs +++ b/src/Chainweb/Pact/Transactions/MainnetKADTransactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoieThkd0Rkc0RZdmM5alg2WHZxVG1CSndEX2xlRlJUTWlJTXJMcjhKODlVOCIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIlxcbihpZlxcbiAgKDw9IDEwMC4wIChjb2luLmdldC1iYWxhbmNlIFxcXCJlN2Y3NjM0ZTkyNTU0MWYzNjhiODI3YWQ1YzcyNDIxOTA1MTAwZjYyMDUyODVhNzhjMTlkN2I0YTM4NzExODA1XFxcIikpXFxuXFxuICAoY29pbi5yZW1lZGlhdGUgXFxcImU3Zjc2MzRlOTI1NTQxZjM2OGI4MjdhZDVjNzI0MjE5MDUxMDBmNjIwNTI4NWE3OGMxOWQ3YjRhMzg3MTE4MDVcXFwiIDEwMC4wKVxcbiAgXFxcIldhcm5pbmc6IGluc3VmZmljaWVudCBmdW5kcyBmb3IgcmVtZWRpYXRpb24sIHNvbGRpZXJpbmcgb25cXFwiKVwifX0sXCJzaWduZXJzXCI6W10sXCJtZXRhXCI6e1wiY3JlYXRpb25UaW1lXCI6MCxcInR0bFwiOjE3MjgwMCxcImdhc0xpbWl0XCI6MCxcImNoYWluSWRcIjpcIlwiLFwiZ2FzUHJpY2VcIjowLFwic2VuZGVyXCI6XCJcIn0sXCJub25jZVwiOlwibWFpbm5ldC1yZW1lZGlhdGlvbnMta2FkLW9wc1wifSJ9" ] diff --git a/src/Chainweb/Pact/Transactions/OtherTransactions.hs b/src/Chainweb/Pact/Transactions/OtherTransactions.hs index 1b33431b73..252373463e 100644 --- a/src/Chainweb/Pact/Transactions/OtherTransactions.hs +++ b/src/Chainweb/Pact/Transactions/OtherTransactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t + fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t in unsafePerformIO $ mapM decodeTx [ "eyJoYXNoIjoiMDVCdGo3ZUJaQlc3by1TYUxvVmhBaWNNVVBaVUJiRzZRVDhfTEFrQ3hIcyIsInNpZ3MiOltdLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpudWxsLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6bnVsbCxcImNvZGVcIjpcIihpbnRlcmZhY2UgZnVuZ2libGUtdjJcXG5cXG4gIFxcXCIgU3RhbmRhcmQgZm9yIGZ1bmdpYmxlIGNvaW5zIGFuZCB0b2tlbnMgYXMgc3BlY2lmaWVkIGluIEtJUC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N0cmluZ1xcbiAgICAgKCBhY2NvdW50OnN0cmluZ1xcbiAgICAgICBndWFyZDpndWFyZFxcbiAgICAgKVxcbiAgICAgXFxcIiBDcmVhdGUgQUNDT1VOVCB3aXRoIDAuMCBiYWxhbmNlLCB3aXRoIEdVQVJEIGNvbnRyb2xsaW5nIGFjY2Vzcy5cXFwiXFxuICAgICApXFxuXFxuICAgKGRlZnVuIHJvdGF0ZTpzdHJpbmdcXG4gICAgICggYWNjb3VudDpzdHJpbmdcXG4gICAgICAgbmV3LWd1YXJkOmd1YXJkXFxuICAgICApXFxuICAgICBcXFwiIFJvdGF0ZSBndWFyZCBmb3IgQUNDT1VOVC4gVHJhbnNhY3Rpb24gaXMgdmFsaWRhdGVkIGFnYWluc3QgXFxcXFxcbiAgICAgXFxcXCBleGlzdGluZyBndWFyZCBiZWZvcmUgaW5zdGFsbGluZyBuZXcgZ3VhcmQuIFxcXCJcXG4gICAgIClcXG5cXG4pXFxuXCJ9fSxcInNpZ25lcnNcIjpbXSxcIm1ldGFcIjp7XCJjcmVhdGlvblRpbWVcIjowLFwidHRsXCI6MTcyODAwLFwiZ2FzTGltaXRcIjowLFwiY2hhaW5JZFwiOlwiXCIsXCJnYXNQcmljZVwiOjAsXCJzZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Transactions/RecapDevelopmentTransactions.hs b/src/Chainweb/Pact/Transactions/RecapDevelopmentTransactions.hs index 5313f8b995..ed3559b45c 100644 --- a/src/Chainweb/Pact/Transactions/RecapDevelopmentTransactions.hs +++ b/src/Chainweb/Pact/Transactions/RecapDevelopmentTransactions.hs @@ -10,10 +10,10 @@ import System.IO.Unsafe import Chainweb.Transaction import Chainweb.Utils -transactions :: [ChainwebTransaction] +transactions :: [Pact4Transaction] transactions = let decodeTx t = - fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t +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ZW5kZXJcIjpcIlwifSxcIm5vbmNlXCI6XCJmdW5naWJsZS1hc3NldC12MlwifSJ9" , diff --git a/src/Chainweb/Pact/Types.hs b/src/Chainweb/Pact/Types.hs index 6d4d4bf4bf..50d2355efe 100644 --- a/src/Chainweb/Pact/Types.hs +++ b/src/Chainweb/Pact/Types.hs @@ -62,7 +62,7 @@ module Chainweb.Pact.Types , txRequestKey , txExecutionConfig , txQuirkGasFee - , txUsePactTng + , txusePact5 -- * Transaction Execution Monad , TransactionM(..) @@ -155,7 +155,8 @@ module Chainweb.Pact.Types -- * types , TxTimeout(..) , ApplyCmdExecutionContext(..) - , TxFailureLog(..) + , Pact4TxFailureLog(..) + , Pact5TxFailureLog(..) -- * miscellaneous , defaultOnFatalError @@ -231,13 +232,14 @@ import Chainweb.Version import Utils.Logging.Trace import qualified Pact.Core.Names as PCore +import qualified Pact.Core.Errors as PCore import qualified Pact.Core.Persistence as PCore import qualified Pact.Core.Gas as PCore import qualified Pact.Core.Builtin as PCore import qualified Pact.Core.Info as PCore data Transactions r = Transactions - { _transactionPairs :: !(Vector (ChainwebTransaction, r)) + { _transactionPairs :: !(Vector (Pact4Transaction, r)) , _transactionCoinbase :: !(CommandResult [TxLogJson]) } deriving (Functor, Foldable, Traversable, Eq, Show, Generic, NFData) makeLenses 'Transactions @@ -355,7 +357,7 @@ data TransactionEnv logger db = TransactionEnv , _txGasLimit :: !Gas , _txExecutionConfig :: !ExecutionConfig , _txQuirkGasFee :: !(Maybe Gas) - , _txUsePactTng :: !Bool + , _txusePact5 :: !Bool } makeLenses ''TransactionEnv @@ -519,13 +521,22 @@ newtype TxTimeout = TxTimeout TransactionHash deriving Show instance Exception TxTimeout -data TxFailureLog = TxFailureLog !RequestKey !PactError !Text +data Pact4TxFailureLog = Pact4TxFailureLog !RequestKey !PactError !Text deriving stock (Generic) deriving anyclass (NFData, Typeable) -instance LogMessage TxFailureLog where - logText (TxFailureLog rk err msg) = +instance LogMessage Pact4TxFailureLog where + logText (Pact4TxFailureLog rk err msg) = msg <> ": " <> sshow rk <> ": " <> sshow err -instance Show TxFailureLog where +instance Show Pact4TxFailureLog where + show m = unpack (logText m) + +data Pact5TxFailureLog = Pact5TxFailureLog !RequestKey !(PCore.PactError PCore.SpanInfo) !Text + deriving stock (Generic) + deriving anyclass (NFData, Typeable) +instance LogMessage Pact5TxFailureLog where + logText (Pact5TxFailureLog rk err msg) = + msg <> ": " <> sshow rk <> ": " <> sshow err +instance Show Pact5TxFailureLog where show m = unpack (logText m) defaultOnFatalError :: forall a. (LogLevel -> Text -> IO ()) -> PactException -> Text -> IO a diff --git a/src/Chainweb/Rosetta/RestAPI/Server.hs b/src/Chainweb/Rosetta/RestAPI/Server.hs index 44a19f9fbe..8a439c6a62 100644 --- a/src/Chainweb/Rosetta/RestAPI/Server.hs +++ b/src/Chainweb/Rosetta/RestAPI/Server.hs @@ -57,7 +57,7 @@ import Chainweb.RestAPI.Utils import Chainweb.Rosetta.Internal import Chainweb.Rosetta.RestAPI import Chainweb.Rosetta.Utils -import Chainweb.Transaction (ChainwebTransaction) +import Chainweb.Transaction (Pact4Transaction) import Chainweb.Utils import Chainweb.Utils.Paging import Chainweb.Version @@ -74,7 +74,7 @@ rosettaServer . CanReadablePayloadCas tbl => ChainwebVersion -> [(ChainId, PayloadDb tbl)] - -> [(ChainId, MempoolBackend ChainwebTransaction)] + -> [(ChainId, MempoolBackend Pact4Transaction)] -> PeerDb -> CutDb tbl -> [(ChainId, PactExecutionService)] @@ -106,7 +106,7 @@ someRosettaServer :: CanReadablePayloadCas tbl => ChainwebVersion -> [(ChainId, PayloadDb tbl)] - -> [(ChainId, MempoolBackend ChainwebTransaction)] + -> [(ChainId, MempoolBackend Pact4Transaction)] -> PeerDb -> [(ChainId, PactExecutionService)] -> CutDb tbl @@ -411,7 +411,7 @@ constructionHashH (ConstructionHashReq _ signedTx) = -- Note (linda): This code simulates the logic of `sendHandler` closely. constructionSubmitH :: ChainwebVersion - -> [(ChainId, MempoolBackend ChainwebTransaction)] + -> [(ChainId, MempoolBackend Pact4Transaction)] -> ConstructionSubmitReq -> Handler TransactionIdResp constructionSubmitH v ms (ConstructionSubmitReq net tx) = diff --git a/src/Chainweb/Transaction.hs b/src/Chainweb/Transaction.hs index a84e350c44..39acb5a2a1 100644 --- a/src/Chainweb/Transaction.hs +++ b/src/Chainweb/Transaction.hs @@ -8,12 +8,14 @@ {-# LANGUAGE TemplateHaskell #-} module Chainweb.Transaction - ( ChainwebTransaction + ( Pact4Transaction + , Pact5Transaction , HashableTrans(..) , PayloadWithText , PactParserVersion(..) , IsWebAuthnPrefixLegal(..) - , chainwebPayloadCodec + , pact4PayloadCodec + , pact5PayloadCodec , encodePayload , decodePayload , cmdGasLimit @@ -40,6 +42,8 @@ import Data.Text.Encoding (decodeUtf8, encodeUtf8) import GHC.Generics (Generic) +import qualified Pact.Core.Command as Pact5 + import qualified Pact.Parse as P (parsePact, legacyParsePact) import Pact.Types.ChainMeta import Pact.Types.Command @@ -79,7 +83,8 @@ mkPayloadWithTextOld p = PayloadWithText , _payloadObj = p } -type ChainwebTransaction = Command PayloadWithText +type Pact4Transaction = Command PayloadWithText +type Pact5Transaction = Pact5.Command PayloadWithText data PactParserVersion = PactParserGenesis @@ -91,7 +96,7 @@ data IsWebAuthnPrefixLegal | WebAuthnPrefixLegal deriving (Eq, Ord, Bounded, Show, Enum) --- | Hashable newtype of ChainwebTransaction +-- | Hashable newtype of Pact4Transaction newtype HashableTrans a = HashableTrans { unHashable :: Command a } deriving (Eq, Functor, Ord) @@ -103,12 +108,24 @@ instance Hashable (HashableTrans PayloadWithText) where !hashCode = either error id $ decHC (B.take 8 $ SB.fromShort hc) {-# INLINE hashWithSalt #-} --- | A codec for (Command PayloadWithText) transactions. +-- | A codec for Pact4's (Command PayloadWithText) transactions. -- -chainwebPayloadCodec +pact4PayloadCodec :: PactParserVersion -> Codec (Command PayloadWithText) -chainwebPayloadCodec ppv = Codec enc dec +pact4PayloadCodec ppv = Codec enc dec + where + enc c = J.encodeStrict $ fmap (decodeUtf8 . encodePayload) c + dec bs = case Aeson.decodeStrict' bs of + Just cmd -> traverse (decodePayload ppv . encodeUtf8) cmd + Nothing -> Left "decode PayloadWithText failed" + +-- | A codec for Pact5's (Command PayloadWithText) transactions. +-- +pact5PayloadCodec + :: PactParserVersion + -> Codec (Pact5.Command PayloadWithText) +pact5PayloadCodec ppv = Codec enc dec where enc c = J.encodeStrict $ fmap (decodeUtf8 . encodePayload) c dec bs = case Aeson.decodeStrict' bs of diff --git a/src/Chainweb/Version.hs b/src/Chainweb/Version.hs index 7527962bee..c5e6f51767 100644 --- a/src/Chainweb/Version.hs +++ b/src/Chainweb/Version.hs @@ -320,7 +320,7 @@ instance MerkleHashAlgorithm a => IsMerkleLogEntry a ChainwebHashTag ChainwebVer -- heights during coinbase. -- data Upgrade = Upgrade - { _upgradeTransactions :: [ChainwebTransaction] + { _upgradeTransactions :: [Pact4Transaction] , _legacyUpgradeIsPrecocious :: Bool -- ^ when set to `True`, the upgrade transactions are executed using the -- forks of the next block, rather than the block the upgrade @@ -333,7 +333,7 @@ data Upgrade = Upgrade instance Show Upgrade where show _ = "" -upgrade :: [ChainwebTransaction] -> Upgrade +upgrade :: [Pact4Transaction] -> Upgrade upgrade txs = Upgrade txs False -- The type of quirks, i.e. special validation behaviors that are in some diff --git a/src/Chainweb/Version/Guards.hs b/src/Chainweb/Version/Guards.hs index 6744a91454..f933ec5d7b 100644 --- a/src/Chainweb/Version/Guards.hs +++ b/src/Chainweb/Version/Guards.hs @@ -31,6 +31,7 @@ module Chainweb.Version.Guards , enableSPVBridge , pact4Coin3 , pact42 + , pact5 , enforceKeysetFormats , doCheckTxHash , chainweb213Pact @@ -218,6 +219,9 @@ pact4Coin3 = checkFork after Pact4Coin3 pact42 :: ChainwebVersion -> ChainId -> BlockHeight -> Bool pact42 = checkFork atOrAfter Pact42 +pact5 :: ChainwebVersion -> ChainId -> BlockHeight -> Bool +pact5 = checkFork atOrAfter Pact5 + chainweb213Pact :: ChainwebVersion -> ChainId -> BlockHeight -> Bool chainweb213Pact = checkFork atOrAfter Chainweb213Pact diff --git a/src/Chainweb/WebPactExecutionService.hs b/src/Chainweb/WebPactExecutionService.hs index 4fb9c32c51..fa407c03e6 100644 --- a/src/Chainweb/WebPactExecutionService.hs +++ b/src/Chainweb/WebPactExecutionService.hs @@ -64,7 +64,7 @@ data PactExecutionService = PactExecutionService Maybe LocalPreflightSimulation -> Maybe LocalSignatureVerification -> Maybe RewindDepth -> - ChainwebTransaction -> + Pact4Transaction -> IO LocalResult) -- ^ Directly execute a single transaction in "local" mode (all DB interactions rolled back). -- Corresponds to `local` HTTP endpoint. @@ -85,7 +85,7 @@ data PactExecutionService = PactExecutionService -- ^ Lookup pact hashes as of a block header to detect duplicates , _pactPreInsertCheck :: !( ChainId - -> Vector ChainwebTransaction + -> Vector Pact4Transaction -> IO (Vector (Either InsertError ()))) -- ^ Run speculative checks to find bad transactions (ie gas buy failures, etc) , _pactBlockTxHistory :: !( diff --git a/test/Chainweb/Test/Pact/Checkpointer.hs b/test/Chainweb/Test/Pact/Checkpointer.hs index b1cd61c5a2..43be6790d0 100644 --- a/test/Chainweb/Test/Pact/Checkpointer.hs +++ b/test/Chainweb/Test/Pact/Checkpointer.hs @@ -667,10 +667,10 @@ runExec cp (pactdbenv, coredb) eData eCode = do applyExec' 0 defaultInterpreter execMsg [] [] h' permissiveNamespacePolicy where h' = H.toUntypedHash (H.hash "" :: H.PactHash) - usePactTng = False + usePact5 = False cmdenv :: TransactionEnv logger (BlockEnv logger) cmdenv = TransactionEnv Transactional pactdbenv coredb (_cpLogger $ _cpReadCp cp) Nothing def - noSPVSupport Nothing 0.0 (RequestKey h') 0 def Nothing usePactTng + noSPVSupport Nothing 0.0 (RequestKey h') 0 def Nothing usePact5 cmdst = TransactionState mempty mempty mempty 0 Nothing (_geGasModel freeGasEnv) PCore.freeGasModel mempty runCont :: Logger logger => Checkpointer logger -> (ChainwebPactDbEnv logger, CoreDb) -> PactId -> Int -> IO EvalResult @@ -681,9 +681,9 @@ runCont cp (pactdbenv, coredb) pactId step = do contMsg = ContMsg pactId step False (toLegacyJson Null) Nothing h' = H.toUntypedHash (H.hash "" :: H.PactHash) - usePactTng = False + usePact5 = False cmdenv = TransactionEnv Transactional pactdbenv coredb (_cpLogger $ _cpReadCp cp) Nothing def - noSPVSupport Nothing 0.0 (RequestKey h') 0 def Nothing usePactTng + noSPVSupport Nothing 0.0 (RequestKey h') 0 def Nothing usePact5 cmdst = TransactionState mempty mempty mempty 0 Nothing (_geGasModel freeGasEnv) PCore.freeGasModel mempty -- -------------------------------------------------------------------------- -- diff --git a/test/Chainweb/Test/Pact/PactExec.hs b/test/Chainweb/Test/Pact/PactExec.hs index 88e0e646c5..b60c7737cf 100644 --- a/test/Chainweb/Test/Pact/PactExec.hs +++ b/test/Chainweb/Test/Pact/PactExec.hs @@ -154,7 +154,7 @@ data TestResponse a = TestResponse } deriving (Generic, Show) -type TxsTest = (IO (V.Vector ChainwebTransaction), Either String (TestResponse String) -> Assertion) +type TxsTest = (IO (V.Vector Pact4Transaction), Either String (TestResponse String) -> Assertion) -- -------------------------------------------------------------------------- -- -- sample data @@ -546,7 +546,7 @@ execTxsTest v runPact name (trans',check) = testCase name (go >>= check) (toHashCommandResult $ _transactionCoinbase results) Left e -> return $ Left $ show e -type LocalTest = (IO ChainwebTransaction,Either String (CommandResult Hash) -> Assertion) +type LocalTest = (IO Pact4Transaction,Either String (CommandResult Hash) -> Assertion) execLocalTest :: (Logger logger, CanReadablePayloadCas tbl) diff --git a/test/Chainweb/Test/Pact/PactSingleChainTest.hs b/test/Chainweb/Test/Pact/PactSingleChainTest.hs index d242dfcd38..f5fb7a05c5 100644 --- a/test/Chainweb/Test/Pact/PactSingleChainTest.hs +++ b/test/Chainweb/Test/Pact/PactSingleChainTest.hs @@ -87,7 +87,7 @@ import Chainweb.Test.Pact.Utils qualified as Utils import Chainweb.Test.Utils import Chainweb.Test.TestVersions import Chainweb.Time -import Chainweb.Transaction (ChainwebTransaction) +import Chainweb.Transaction (Pact4Transaction) import Chainweb.Utils import Chainweb.Version import Chainweb.Version.Utils @@ -315,7 +315,7 @@ pactStateSamePreAndPostCompaction rdb = let numBlocks :: Num a => a numBlocks = 100 - let makeTx :: Word -> BlockHeader -> IO ChainwebTransaction + let makeTx :: Word -> BlockHeader -> IO Pact4Transaction makeTx nth bh = buildCwCmd (sshow (nth, bh)) testVersion $ set cbSigners [mkEd25519Signer' sender00 [mkGasCap, mkTransferCap "sender00" "sender01" 1.0]] $ setFromHeader bh @@ -370,7 +370,7 @@ compactionIsIdempotent rdb = let numBlocks :: Num a => a numBlocks = 100 - let makeTx :: Word -> BlockHeader -> IO ChainwebTransaction + let makeTx :: Word -> BlockHeader -> IO Pact4Transaction makeTx nth bh = buildCwCmd (sshow (nth, bh)) testVersion $ set cbSigners [mkEd25519Signer' sender00 [mkGasCap, mkTransferCap "sender00" "sender01" 1.0]] $ setFromHeader bh @@ -426,7 +426,7 @@ compactionDoesNotDisruptDuplicateDetection :: () -> TestTree compactionDoesNotDisruptDuplicateDetection rdb = do compactionSetup "compactionDoesNotDisruptDuplicateDetection" rdb testPactServiceConfig $ \cr -> do - let makeTx :: IO ChainwebTransaction + let makeTx :: IO Pact4Transaction makeTx = buildCwCmd (sshow @Word 0) testVersion $ set cbSigners [mkEd25519Signer' sender00 [mkGasCap, mkTransferCap "sender00" "sender01" 1.0]] $ set cbRPC (mkExec' "(coin.transfer \"sender00\" \"sender01\" 1.0)") @@ -464,7 +464,7 @@ compactionUserTablesDropped rdb = let halfwayPoint :: Integral a => a halfwayPoint = numBlocks `div` 2 - let createTable :: Word -> Text -> IO ChainwebTransaction + let createTable :: Word -> Text -> IO Pact4Transaction createTable n tblName = do let tx = T.unlines [ "(namespace 'free)" @@ -540,7 +540,7 @@ compactionGrandHashUnchanged rdb = let numBlocks :: Num a => a numBlocks = 100 - let makeTx :: Word -> BlockHeader -> IO ChainwebTransaction + let makeTx :: Word -> BlockHeader -> IO Pact4Transaction makeTx nth bh = buildCwCmd (sshow nth) testVersion $ set cbSigners [mkEd25519Signer' sender00 [mkGasCap, mkTransferCap "sender00" "sender01" 1.0]] $ setFromHeader bh @@ -1000,7 +1000,7 @@ runTxInBlock :: () => IO (IORef MemPoolAccess) -- ^ mempoolRef -> PactQueue -> TestBlockDb - -> (Word -> BlockHeight -> BlockHash -> BlockHeader -> IO ChainwebTransaction) + -> (Word -> BlockHeight -> BlockHash -> BlockHeader -> IO Pact4Transaction) -> IO (Either PactException PayloadWithOutputs) runTxInBlock mempoolRef pactQueue blockDb makeTx = do madeTx <- newIORef @Bool False @@ -1025,7 +1025,7 @@ runTxInBlock_ :: () => IO (IORef MemPoolAccess) -- ^ mempoolRef -> PactQueue -> TestBlockDb - -> (Word -> BlockHeight -> BlockHash -> BlockHeader -> IO ChainwebTransaction) + -> (Word -> BlockHeight -> BlockHash -> BlockHeader -> IO Pact4Transaction) -> IO PayloadWithOutputs runTxInBlock_ mempoolRef pactQueue blockDb makeTx = do runTxInBlock mempoolRef pactQueue blockDb makeTx >>= \case diff --git a/test/Chainweb/Test/Pact/SPV.hs b/test/Chainweb/Test/Pact/SPV.hs index 2ff99533f2..888386ccc6 100644 --- a/test/Chainweb/Test/Pact/SPV.hs +++ b/test/Chainweb/Test/Pact/SPV.hs @@ -343,7 +343,7 @@ type TransactionGenerator -> BlockHeight -> BlockHash -> BlockHeader - -> IO (Vector ChainwebTransaction) + -> IO (Vector Pact4Transaction) type BurnGenerator = ChainwebVersion -> Time Micros -> MVar PactId -> Chainweb.ChainId -> Chainweb.ChainId -> IO TransactionGenerator @@ -449,7 +449,7 @@ createCont -> MVar PactId -> Maybe ContProof -> Time Micros - -> IO (Vector ChainwebTransaction) + -> IO (Vector Pact4Transaction) createCont v cid pidv proof time = do pid <- readMVar pidv fmap Vector.singleton $ diff --git a/test/Chainweb/Test/Pact/TransactionTests.hs b/test/Chainweb/Test/Pact/TransactionTests.hs index 75a4a99510..a907905240 100644 --- a/test/Chainweb/Test/Pact/TransactionTests.hs +++ b/test/Chainweb/Test/Pact/TransactionTests.hs @@ -266,9 +266,9 @@ testCoinbase797DateFix = testCaseSteps "testCoinbase791Fix" $ \step -> do (EnforceCoinbaseFailure True) (CoinbaseUsePrecompiled precompile) mc let h = H.toUntypedHash (H.hash "" :: H.PactHash) - usePactTng = False + usePact5 = False tenv = TransactionEnv Transactional pdb coreDb logger Nothing def - noSPVSupport Nothing 0.0 (RequestKey h) 0 def Nothing usePactTng + noSPVSupport Nothing 0.0 (RequestKey h) 0 def Nothing usePact5 txst = TransactionState mempty mempty mempty 0 Nothing (_geGasModel freeGasEnv) (PCore.freeGasModel) mempty CommandResult _ _ (PactResult pr) _ _ _ _ _ <- evalTransactionM tenv txst $! diff --git a/test/Chainweb/Test/Pact/Utils.hs b/test/Chainweb/Test/Pact/Utils.hs index 6477cb779d..5e3f20bb3d 100644 --- a/test/Chainweb/Test/Pact/Utils.hs +++ b/test/Chainweb/Test/Pact/Utils.hs @@ -572,7 +572,7 @@ defaultCmd = CmdBuilder -- | Build parsed + verified Pact command -- -- TODO: Use the new `assertCommand` function. -buildCwCmd :: (MonadThrow m, MonadIO m) => Text -> ChainwebVersion -> CmdBuilder -> m ChainwebTransaction +buildCwCmd :: (MonadThrow m, MonadIO m) => Text -> ChainwebVersion -> CmdBuilder -> m Pact4Transaction buildCwCmd nonce v cmd = buildRawCmd nonce v cmd >>= \(c :: Command ByteString) -> case validateCommand v (_cbChainId cmd) (T.decodeUtf8 <$> c) of Left err -> throwM $ userError $ "buildCmd failed: " ++ err diff --git a/test/Chainweb/Test/TestVersions.hs b/test/Chainweb/Test/TestVersions.hs index 2fc20ca842..e3a7ec4355 100644 --- a/test/Chainweb/Test/TestVersions.hs +++ b/test/Chainweb/Test/TestVersions.hs @@ -339,8 +339,8 @@ instantCpmTestVersion g = buildTestVersion $ \v -> v } & versionUpgrades .~ AllChains mempty --- pact5EarlyTestVersion :: ChainGraph -> ChainwebVersion --- pact5EarlyTestVersion g = buildTestVersion $ \v -> v --- & cpmTestVersion g --- & versionName .~ ChainwebVersionName ("pact5-early-" <> toText g) --- & versionForks .~ (fastForks & at Pact5 ?~ (fastForks ^?! Chainweb222Pact)) +pact5EarlyTestVersion :: ChainGraph -> ChainwebVersion +pact5EarlyTestVersion g = buildTestVersion $ \v -> v + & cpmTestVersion g + & versionName .~ ChainwebVersionName ("pact5-early-" <> toText g) + & versionForks .~ (fastForks & at Pact5 .~ Just (AllChains $ ForkAtBlockHeight 115)) diff --git a/tools/cwtool/TxSimulator.hs b/tools/cwtool/TxSimulator.hs index a6072dc6c2..36391e29cc 100644 --- a/tools/cwtool/TxSimulator.hs +++ b/tools/cwtool/TxSimulator.hs @@ -243,7 +243,7 @@ spvSim sc bh pwo = do go mv cp = modifyMVar mv $ searchOuts cp searchOuts _ [] = return ([],Left "spv: proof not found") searchOuts cp@(ContProof pf) ((Transaction ti,TransactionOutput _o):txs) = - case codecDecode (chainwebPayloadCodec (pactParserVersion (scVersion sc) (_chainId bh) (_blockHeight bh))) ti of + case codecDecode (pact4PayloadCodec (pactParserVersion (scVersion sc) (_chainId bh) (_blockHeight bh))) ti of Left {} -> internalError "input decode failed" Right cmd -> case _pPayload $ payloadObj $ _cmdPayload cmd of Continuation cm | _cmProof cm == Just cp -> do diff --git a/tools/ea/Ea.hs b/tools/ea/Ea.hs index bce1bef14c..a49c89a1e8 100644 --- a/tools/ea/Ea.hs +++ b/tools/ea/Ea.hs @@ -62,7 +62,7 @@ import Chainweb.Payload.PayloadStore.InMemory import Chainweb.Storage.Table.RocksDB import Chainweb.Time import Chainweb.Transaction - (ChainwebTransaction, chainwebPayloadCodec, mkPayloadWithTextOld) + (Pact4Transaction, pact4PayloadCodec, mkPayloadWithTextOld) import Chainweb.Utils import Chainweb.Version @@ -171,7 +171,7 @@ genCoinV6Payloads = genTxModule "CoinV6" -- Payload Generation --------------------- -genPayloadModule :: ChainwebVersion -> Text -> ChainId -> [ChainwebTransaction] -> IO Text +genPayloadModule :: ChainwebVersion -> Text -> ChainId -> [Pact4Transaction] -> IO Text genPayloadModule v tag cid cwTxs = withTempRocksDb "chainweb-ea" $ \rocks -> withBlockHeaderDb rocks v cid $ \bhdb -> do @@ -183,10 +183,10 @@ genPayloadModule v tag cid cwTxs = execNewGenesisBlock noMiner (V.fromList cwTxs) return $ TL.toStrict $ TB.toLazyText $ payloadModuleCode tag payloadWO -mkChainwebTxs :: [FilePath] -> IO [ChainwebTransaction] +mkChainwebTxs :: [FilePath] -> IO [Pact4Transaction] mkChainwebTxs txFiles = mkChainwebTxs' =<< traverse mkTx txFiles -mkChainwebTxs' :: [Command Text] -> IO [ChainwebTransaction] +mkChainwebTxs' :: [Command Text] -> IO [Pact4Transaction] mkChainwebTxs' rawTxs = forM rawTxs $ \cmd -> do let cmdBS = fmap TE.encodeUtf8 cmd @@ -306,7 +306,7 @@ genTxModule tag txFiles = do let encTxs = map quoteTx cwTxs quoteTx tx = " \"" <> encTx tx <> "\"" - encTx = encodeB64UrlNoPaddingText . codecEncode (chainwebPayloadCodec maxBound) + encTx = encodeB64UrlNoPaddingText . codecEncode (pact4PayloadCodec maxBound) modl = T.unlines $ startTxModule tag <> [T.intercalate "\n ,\n" encTxs] <> endTxModule fileName = "src/Chainweb/Pact/Transactions/" <> tag <> "Transactions.hs" @@ -326,10 +326,10 @@ startTxModule tag = , "import Chainweb.Transaction" , "import Chainweb.Utils" , "" - , "transactions :: [ChainwebTransaction]" + , "transactions :: [Pact4Transaction]" , "transactions =" , " let decodeTx t =" - , " fromEitherM . (first (userError . show)) . codecDecode (chainwebPayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t" + , " fromEitherM . (first (userError . show)) . codecDecode (pact4PayloadCodec maxBound) =<< decodeB64UrlNoPaddingText t" , " in unsafePerformIO $ mapM decodeTx [" ]