Skip to content

Commit

Permalink
Release 2.25 Finalization
Browse files Browse the repository at this point in the history
- Update Pact to version 4.13
- Update cabal freeze file
- Update hackage flake input
- Update hashes and ethereum libraries
- Add upper bound to hashable to avoid change in how bytestrings are hashed
- CHANGELOG: correct date, mention Pact update in it
- CI: log gas in replays by default

Change-Id: I78a3ff7cdab08f8ab277cbabd8de33d43a8d95b9
  • Loading branch information
chessai committed Aug 9, 2024
1 parent 928894b commit 7b2fb3b
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 60 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ jobs:
databaseDirectory: "db"
chainweb:
onlySyncPact: true
logGas: true
chainwebVersion: ${{ needs.config.outputs.chainweb-network-version }}
validateHashesOnReplay: true
p2p:
Expand Down Expand Up @@ -634,7 +635,7 @@ jobs:
OS: ${{ matrix.os }}
ARTIFACTS_NAME: chainweb-applications.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}
ARTIFACTS_ARCHIVE: chainweb.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}.${{ needs.config.outputs.git-sha-short }}${{ needs.config.outputs.tag-suffix }}.tar.gz

steps:
- name: Get build artifacts
uses: actions/download-artifact@v4
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## 2.25 (2024-08-21)
This is a major version update. This release replaces all previous versions.

Any prior version will stop working on **2022-08-21T00:00:00Z**. Node administrators must
Any prior version will stop working on **2024-08-21T00:00:00Z**. Node administrators must
upgrade to this version before that date. The 2.25 feature upgrade will
occur at block height 5060924 which is estimated to be mined at **2022-08-21T00:00:00Z**.
occur at block height 5060924 which is estimated to be mined at **2024-08-21T00:00:00Z**.

### Changes
- Updated to Pact 4.13: https://github.com/kadena-io/pact/releases/tag/v4.13.0
- Database compaction: Significant performance improvements [`da410fc7`](https://github.com/kadena-io/chainweb-node/commit/da410fc7db2df261d8ef808380d402876ccf79f5)
- Verifier Plugin support for Hyperlane merkle proofs. This brings Chainweb into compliance with the latest version of the Hyperlane protocol. [`bc87c68b`](https://github.com/kadena-io/chainweb-node/commit/bc87c68bf0fc4ba427ff2cbf2858933b7470543a)
- Log current cut periodically, instead of when it changes, for more consistency and less space use. [`f5a0cf15`](https://github.com/kadena-io/chainweb-node/commit/f5a0cf157139497c902e12caa65e68bdf716a8c7)
Expand Down
15 changes: 9 additions & 6 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ package yet-another-logger
source-repository-package
type: git
location: https://github.com/kadena-io/pact.git
tag: 4c0acc5fb322014b120c4a5942db8505968ab046
--sha256: 0kyh6xwm06npbw73dil5xpngfr7h6ppsn5jz7hjkirq9hj33aqqv
tag: f5980d1594122a65872980bf92d7295c32997116
--sha256: 1vwv8qrg2fpxalk3mdnj2zwzjynldvdsdmz2jzq5jyrcykfqafy2

source-repository-package
type: git
Expand All @@ -103,10 +103,10 @@ source-repository-package
--sha256: 19pjy06xrx2siggzybcmly0qaq4ds3yzxcsvqwgs4qh9kkzh0kqh

source-repository-package
type: git
location: https://github.com/kadena-io/kadena-ethereum-bridge.git
tag: a32d901e4a79be62af9c27c01152c9a4c3912a62
--sha256: sha256-xdawv/tdjh61MbJKcBqm9Fje36+gVljuZsAxOTX1gP0=
type: git
location: https://github.com/kadena-io/kadena-ethereum-bridge.git
tag: 3837c4c81f1beaffc1d52375e61576366d49170a
--sha256: 1knhscph2g3saz0pjd1d5a32mr281msapccfrillgd2qk4pj7xjc

source-repository-package
type: git
Expand Down Expand Up @@ -202,3 +202,6 @@ allow-newer: base-compat-batteries:*
allow-newer: webauthn:these
allow-newer: webauthn:time
allow-newer: webauthn:aeson

-- Hashable 1.4.5 changes the hashing of bytestring, which causes some issues.
constraints: hashable < 1.4.5
73 changes: 34 additions & 39 deletions cabal.project.freeze
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
active-repositories: hackage.haskell.org:merge
constraints: any.Boolean ==0.2.4,
any.Cabal ==3.10.3.0,
constraints: any.Cabal ==3.10.3.0,
any.Cabal-syntax ==3.10.3.0,
any.Decimal ==0.5.2,
any.Glob ==0.10.2,
any.HUnit ==1.6.2.0,
any.MemoTrie ==0.6.11,
any.NumInstances ==1.4,
any.OneTuple ==0.4.2,
any.Only ==0.1,
any.QuickCheck ==2.14.3,
any.QuickCheck ==2.15.0.1,
any.RSA ==2.4.1,
any.SHA ==1.6.4.4,
any.StateVar ==1.2.2,
Expand All @@ -26,10 +23,10 @@ constraints: any.Boolean ==0.2.4,
any.asn1-types ==0.3.4,
any.assoc ==1.1.1,
any.async ==2.2.5,
any.atomic-primops ==0.8.7,
any.atomic-primops ==0.8.8,
any.attoparsec ==0.14.4,
any.authenticate-oauth ==1.7,
any.auto-update ==0.2.0,
any.auto-update ==0.2.1,
any.base ==4.18.2.1,
any.base-compat ==0.14.0,
any.base-compat-batteries ==0.14.0,
Expand Down Expand Up @@ -59,7 +56,7 @@ constraints: any.Boolean ==0.2.4,
any.cache ==0.1.3.0,
any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0,
any.cassava ==0.5.3.1,
any.cassava ==0.5.3.2,
any.cborg ==0.2.10.0,
any.cereal ==0.5.8.3,
chainweb -debug -ed25519 -ghc-flags,
Expand All @@ -77,7 +74,7 @@ constraints: any.Boolean ==0.2.4,
any.containers ==0.6.7,
any.contiguous ==0.6.4.2,
any.contravariant ==1.5.5,
any.cookie ==0.4.6,
any.cookie ==0.5.0,
any.criterion ==1.6.3.0,
any.criterion-measurement ==0.2.2.0,
any.crypto-api ==0.13.3,
Expand All @@ -100,7 +97,7 @@ constraints: any.Boolean ==0.2.4,
any.data-default-instances-dlist ==0.0.1,
any.data-default-instances-old-locale ==0.0.1,
any.data-dword ==0.3.2.1,
any.data-fix ==0.3.3,
any.data-fix ==0.3.4,
any.data-ordlist ==0.4.7.0,
any.dec ==0.0.6,
any.deepseq ==1.4.8.1,
Expand All @@ -115,14 +112,14 @@ constraints: any.Boolean ==0.2.4,
any.enclosed-exceptions ==1.0.3,
any.entropy ==0.4.1.10,
any.errors ==2.3.0,
any.ethereum ==0.1.0.1,
any.ethereum ==0.1.0.2,
ethereum -ethhash -openssl-use-pkg-config,
any.exceptions ==0.10.7,
any.fast-logger ==3.2.3,
any.file-embed ==0.0.16.0,
any.filepath ==1.4.300.1,
any.fingertree ==0.1.5.0,
any.finite-typelits ==0.2.0.0,
any.finite-typelits ==0.2.1.0,
any.free ==5.2,
any.generic-data ==1.1.0.0,
any.generically ==0.1.1,
Expand All @@ -135,34 +132,34 @@ constraints: any.Boolean ==0.2.4,
any.growable-vector ==0.1,
any.half ==0.3.1,
any.hashable ==1.4.4.0,
any.hashes ==0.2.3,
any.hashes ==0.3.0,
any.haskell-lexer ==1.1.1,
any.haskell-src-exts ==1.23.1,
any.haskell-src-meta ==0.8.14,
any.heaps ==0.4,
any.hourglass ==0.2.12,
any.http-api-data ==0.6,
any.http-api-data ==0.6.1,
any.http-client ==0.7.17,
any.http-client-tls ==0.3.6.3,
any.http-date ==0.0.11,
any.http-media ==0.8.1.1,
any.http-semantics ==0.0.1,
any.http-semantics ==0.2.0,
any.http-types ==0.12.4,
any.http2 ==5.2.2,
any.http2 ==5.3.1,
any.indexed-list-literals ==0.2.1.3,
any.indexed-traversable ==0.1.4,
any.indexed-traversable-instances ==0.1.2,
any.integer-conversion ==0.1.1,
any.integer-gmp ==1.1,
any.integer-logarithms ==1.0.3.1,
any.invariant ==0.6.3,
any.iproute ==1.7.12,
any.iproute ==1.7.14,
any.ixset-typed ==0.5,
any.js-chart ==2.9.4.1,
any.kan-extensions ==5.2.6,
any.lens ==5.3.2,
any.lens-aeson ==1.2.3,
any.libBF ==0.6.7,
any.libBF ==0.6.8,
any.libyaml ==0.1.4,
any.libyaml-clib ==0.2.5,
any.lifted-base ==0.2.3.12,
Expand All @@ -183,23 +180,22 @@ constraints: any.Boolean ==0.2.4,
any.mtl ==2.3.1,
any.mtl-compat ==0.2.2,
any.mwc-probability ==2.3.1,
any.mwc-random ==0.15.0.2,
any.mwc-random ==0.15.1.0,
any.natural-arithmetic ==0.2.1.0,
any.network ==3.1.4.0,
any.network-byte-order ==0.1.7,
any.network-control ==0.1.0,
any.network-control ==0.1.3,
any.network-info ==0.2.1,
any.network-uri ==2.6.4.2,
any.newtype-generics ==0.6.2,
any.nothunks ==0.2.1.0,
any.nothunks ==0.2.1.1,
any.old-locale ==1.0.0.7,
any.old-time ==1.1.0.4,
any.optparse-applicative ==0.18.1.0,
any.os-string ==2.0.3,
any.pact ==4.12,
any.os-string ==2.0.6,
any.pact ==4.13,
pact -build-tool +cryptonite-ed25519 -tests-in-lib,
any.pact-json ==0.1.0.0,
any.pact-time ==0.2.0.2,
any.pact-time ==0.3.0.1,
any.parallel ==3.2.2.0,
any.parsec ==3.1.16.1,
any.parser-combinators ==1.3.0,
Expand All @@ -219,7 +215,7 @@ constraints: any.Boolean ==0.2.4,
any.profunctors ==5.6.2,
any.psqueues ==0.2.8.0,
any.pvar ==1.0.0.0,
any.quickcheck-instances ==0.3.30,
any.quickcheck-instances ==0.3.31,
any.random ==1.2.1.2,
any.recv ==0.1.0,
any.reducers ==3.12.4,
Expand Down Expand Up @@ -249,10 +245,10 @@ constraints: any.Boolean ==0.2.4,
any.servant-client ==0.20,
any.servant-client-core ==0.20,
any.servant-server ==0.20,
any.sha-validation ==0.1.0.0,
any.sha-validation ==0.1.0.1,
any.show-combinators ==0.2.0.0,
any.simple-sendfile ==0.2.32,
any.singleton-bool ==0.1.7,
any.singleton-bool ==0.1.8,
any.socks ==0.6.1,
any.some ==1.0.6,
any.sop-core ==0.5.0.2,
Expand All @@ -272,9 +268,9 @@ constraints: any.Boolean ==0.2.4,
any.tagged ==0.8.8,
any.tasty ==1.5,
any.tasty-golden ==2.3.5,
any.tasty-hunit ==0.10.1,
any.tasty-hunit ==0.10.2,
any.tasty-json ==0.1.0.0,
any.tasty-quickcheck ==0.10.3,
any.tasty-quickcheck ==0.11,
any.template-haskell ==2.20.0.0,
any.temporary ==1.3,
any.text ==2.0.2,
Expand All @@ -292,7 +288,7 @@ constraints: any.Boolean ==0.2.4,
any.time-locale-compat ==0.1.1.5,
any.time-manager ==0.1.0,
any.tls ==2.0.6,
any.tls-session-manager ==0.0.5,
any.tls-session-manager ==0.0.6,
any.token-bucket ==0.1.0.1,
any.torsor ==0.1.0.1,
any.transformers ==0.6.1.0,
Expand All @@ -303,34 +299,33 @@ constraints: any.Boolean ==0.2.4,
any.typed-process ==0.2.11.1,
any.uniplate ==1.6.13,
any.unix ==2.8.4.0,
any.unix-compat ==0.7.1,
any.unix-time ==0.4.14,
any.unix-compat ==0.7.2,
any.unix-time ==0.4.15,
any.unlifted ==0.2.2.0,
any.unliftio ==0.2.25.0,
any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.20,
any.utf8-string ==1.0.2,
any.uuid ==1.3.15,
any.uuid-types ==1.0.5.1,
any.uuid ==1.3.16,
any.uuid-types ==1.0.6,
any.validation ==1.1.3,
any.vault ==0.3.1.5,
any.vector ==0.13.1.0,
any.vector-algorithms ==0.9.0.2,
any.vector-binary-instances ==0.2.5.2,
any.vector-sized ==1.6.1,
any.vector-space ==0.16,
any.vector-stream ==0.1.0.1,
any.vector-th-unbox ==0.2.2,
any.void ==0.7.3,
any.wai ==3.2.4,
any.wai-app-static ==3.1.9,
any.wai-cors ==0.2.7,
any.wai-extra ==3.1.15,
any.wai-logger ==2.4.0,
any.wai-logger ==2.4.1,
any.wai-middleware-throttle ==0.3.0.1,
any.wai-middleware-validation ==0.1.0.2,
any.warp ==3.4.1,
any.warp-tls ==3.4.5,
any.warp-tls ==3.4.6,
any.wherefrom-compat ==0.1.1.1,
any.wide-word ==0.1.6.0,
any.witherable ==0.5,
Expand All @@ -340,4 +335,4 @@ constraints: any.Boolean ==0.2.4,
any.yet-another-logger ==0.4.2,
any.zigzag ==0.1.0.0,
any.zlib ==0.7.1.0
index-state: hackage.haskell.org 2024-07-29T14:54:26Z
index-state: hackage.haskell.org 2024-08-07T17:50:14Z
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions test/Chainweb/Test/Pact/SQLite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import qualified Data.ByteString as B
import qualified Data.ByteString.Short as BS
import Data.Coerce
import qualified Data.Hash.SHA3 as SHA3
import Data.Hash.SHA3 (Sha3_224(..), Sha3_256(..), Sha3_384(..), Sha3_512(..))
import qualified Data.List as L
import Data.String

Expand Down Expand Up @@ -266,17 +267,20 @@ testAgg n dbVarIO tblIO = do
[[x]] -> error $ "unexpected return value: " <> show x
[a] -> error $ "unexpected number of result fields: " <> show (length a)
a -> error $ "unexpected number of result rows: " <> show (length a)
hBytes <- hash n (mconcat input)

h @?= hash n (mconcat input)
h @?= hBytes
where
hash 0 = hashToByteString . SHA3.hashByteString @SHA3.Sha3_256
hash 224 = hashToByteString . SHA3.hashByteString @SHA3.Sha3_224
hash 256 = hashToByteString . SHA3.hashByteString @SHA3.Sha3_256
hash 384 = hashToByteString . SHA3.hashByteString @SHA3.Sha3_384
hash 512 = hashToByteString . SHA3.hashByteString @SHA3.Sha3_512
hash x = error $ "unsupported SHA3 digest size: " <> show x

hashToByteString :: SHA3.Hash a => Coercible a BS.ShortByteString => a -> B.ByteString
hash :: Int -> B.ByteString -> IO B.ByteString
hash d b = case d of
0 -> hashToByteString <$> SHA3.hashByteString @SHA3.Sha3_256 b
224 -> hashToByteString <$> SHA3.hashByteString @SHA3.Sha3_224 b
256 -> hashToByteString <$> SHA3.hashByteString @SHA3.Sha3_256 b
384 -> hashToByteString <$> SHA3.hashByteString @SHA3.Sha3_384 b
512 -> hashToByteString <$> SHA3.hashByteString @SHA3.Sha3_512 b
_ -> error $ "unsupported SHA3 digest size: " <> show d

hashToByteString :: (SHA3.Hash a, Coercible a BS.ShortByteString) => a -> B.ByteString
hashToByteString = BS.fromShort . coerce

-- -------------------------------------------------------------------------- --
Expand Down

0 comments on commit 7b2fb3b

Please sign in to comment.