Skip to content

Commit

Permalink
Merge pull request #2066 from kadena-io/push-wssqswntyzwr
Browse files Browse the repository at this point in the history
pact5 review phase 1
  • Loading branch information
edmundnoble authored Dec 13, 2024
2 parents c6d6b8a + 0f5ec09 commit 14a4d03
Show file tree
Hide file tree
Showing 25 changed files with 623 additions and 610 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ The following packages must be installed on the host system:

* ubuntu-20.04:
```bash
apt-get install ca-certificates libgmp10 libssl1.1 libsnappy1v5 zlib1g liblz4-1 libbz2-1.0 libgflags2.2 zstd
apt-get install ca-certificates libmpfr6 libgmp10 libssl1.1 libsnappy1v5 zlib1g liblz4-1 libbz2-1.0 libgflags2.2 zstd
```

* ubuntu-22.04:
```bash
apt-get install ca-certificates libgmp10 libssl1.1 libsnappy1v5 zlib1g liblz4-1 libbz2-1.0 libgflags2.2 zstd
apt-get install ca-certificates libmpfr6 libgmp10 libssl1.1 libsnappy1v5 zlib1g liblz4-1 libbz2-1.0 libgflags2.2 zstd
```

Chainweb-node binaries for ubuntu-20.04 and ubuntu-22.04 can be found
Expand Down Expand Up @@ -130,7 +130,7 @@ You need to install the development versions of the following libraries:
On apt based distribution these can be installed as follows:

```
apt-get install ca-certificates libssl-dev libgmp-dev libsnappy-dev zlib1g-dev liblz4-dev libbz2-dev libgflags-dev libzstd-dev
apt-get install ca-certificates libssl-dev libmpfr-dev libgmp-dev libsnappy-dev zlib1g-dev liblz4-dev libbz2-dev libgflags-dev libzstd-dev
```

To build a `chainweb-node` binary:
Expand Down
10 changes: 2 additions & 8 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/kadena-io/pact-5.git
tag: c2f5fb7b19b2bc3e4153d1dd14711195c8fe774a
--sha256: 1nn719nsbwmry7fvyn4xv1zi2mm7a5q3s07whghw5gf17zqnjbda
tag: 4738d8e101069ee8add62a6fb7ada2f4079af89a
--sha256: 1sll6rb8w4i18gi0xzbk8c0yp26mv4knrq0cjl8rnn7c0dnmyf4l

source-repository-package
type: git
Expand Down Expand Up @@ -162,12 +162,6 @@ source-repository-package
tag: 2f67d546ea6608fc6ebe5f2f6976503cbf340442
--sha256: 0x137akvbh4kr3qagksw74xdj2xz5vjnx1fbr41bb54a0lkcb8mm

source-repository-package
type: git
location: https://github.com/andrewthad/chronos
tag: b199bf6df1453af95832c2d2f9f0ef48c3622caa
--sha256: 056awkmdmkqdd5g3m8a1ibg2vp02kbppmidkfh4aildb1brq970a

source-repository-package
type: git
location: https://gitlab.com/edmundnoble/predicate-transformers
Expand Down
1 change: 0 additions & 1 deletion chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ test-suite chainweb-tests
Chainweb.Test.BlockHeaderDB
Chainweb.Test.BlockHeaderDB.PruneForks
Chainweb.Test.Chainweb.Utils.Paging
Chainweb.Test.Chainweb.Utils.Paging
Chainweb.Test.CutDB
Chainweb.Test.Difficulty
Chainweb.Test.Mempool
Expand Down
2 changes: 2 additions & 0 deletions src/Chainweb/Block.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- | A type for "blocks" including their header and payload and outputs.
-- This is only for REST APIs; we do not use the outputs otherwise.
module Chainweb.Block
(Block(..))
where
Expand Down
2 changes: 0 additions & 2 deletions src/Chainweb/BlockHeader.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ module Chainweb.BlockHeader
, I.adjacentChainIds
, I.absBlockHeightDiff

, I.guardBlockHeader

-- * IsBlockHeader
, I.IsBlockHeader(..)

Expand Down
5 changes: 0 additions & 5 deletions src/Chainweb/BlockHeader/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ module Chainweb.BlockHeader.Internal
, genesisBlockHeaders
, genesisBlockHeadersAtHeight
, genesisHeight
, guardBlockHeader
, headerSizes
, headerSizeBytes
, workSizeBytes
Expand Down Expand Up @@ -1161,7 +1160,3 @@ workSizeBytes
-> BlockHeight
-> Natural
workSizeBytes v h = headerSizeBytes v (unsafeChainId 0) h - 32

-- | TODO document
guardBlockHeader :: (ChainwebVersion -> ChainId -> BlockHeight -> a) -> BlockHeader -> a
guardBlockHeader k bh = k (_chainwebVersion bh) (_chainId bh) (_blockHeight bh)
2 changes: 0 additions & 2 deletions src/Chainweb/Chainweb.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ module Chainweb.Chainweb
, NowServing(..)

-- ** Mempool integration
-- , Pact4.Transaction
-- , Pact5.Transaction
, Mempool.pact4TransactionConfig
, validatingMempoolConfig

Expand Down
1 change: 0 additions & 1 deletion src/Chainweb/Mempool/InMem.hs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,6 @@ getBlockInMem logg cfg lock (BlockFill gasLimit txHashes _) txValidate bheight p
| ((txHash, (bytes, t)), r) <- V.toList (V.zip q oks)
]
logFunctionText logg Debug $ "validateBatch badlisting: " <> sshow (map fst bad1)
-- V.partition snd $! V.zip q oks

-- remove considered txs -- successful ones will be re-added at the end
let !psq' = V.foldl' del psq0 q
Expand Down
6 changes: 3 additions & 3 deletions src/Chainweb/Pact/Backend/Compaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -540,21 +540,21 @@ createCheckpointerIndexes db logger = do

log "Creating BlockHistory index"
inTx db $ Pact.exec_ db
"CREATE UNIQUE INDEX IF NOT EXISTS BlockHistory_blockHeight_unique_ix ON BlockHistory (blockheight)"
"CREATE UNIQUE INDEX IF NOT EXISTS BlockHistory_blockheight_unique_ix ON BlockHistory (blockheight)"

log "Creating VersionedTableCreation index"
inTx db $ Pact.exec_ db
"CREATE UNIQUE INDEX IF NOT EXISTS VersionedTableCreation_createBlockheight_tablename_unique_ix ON VersionedTableCreation (createBlockheight, tablename)"

log "Creating VersionedTableMutation index"
inTx db $ Pact.exec_ db
"CREATE UNIQUE INDEX IF NOT EXISTS VersionedTableMutation_blockHeight_tablename_unique_ix ON VersionedTableMutation (blockheight, tablename)"
"CREATE UNIQUE INDEX IF NOT EXISTS VersionedTableMutation_blockheight_tablename_unique_ix ON VersionedTableMutation (blockheight, tablename)"

log "Creating TransactionIndex indexes"
inTx db $ Pact.exec_ db
"CREATE UNIQUE INDEX IF NOT EXISTS TransactionIndex_txhash_unique_ix ON TransactionIndex (txhash)"
inTx db $ Pact.exec_ db
"CREATE INDEX IF NOT EXISTS TransactionIndex_blockHeight_ix ON TransactionIndex (blockheight)"
"CREATE INDEX IF NOT EXISTS TransactionIndex_blockheight_ix ON TransactionIndex (blockheight)"

-- | Create a single user table
createUserTable :: Database -> Utf8 -> IO ()
Expand Down
Loading

0 comments on commit 14a4d03

Please sign in to comment.