Skip to content

Commit

Permalink
update pact pin to latest pact version (#1129)
Browse files Browse the repository at this point in the history
* update pact pin

* compile bench component with -Wall

* update sbv and pact pin stack.yaml

* update nix kpkgs pin

* remove unused definition

Co-authored-by: Doug Beardsley <[email protected]>
  • Loading branch information
larskuhtz and mightybyte authored Jul 31, 2020
1 parent ac5aaa7 commit 18d45f6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 24 deletions.
3 changes: 0 additions & 3 deletions bench/Chainweb/Pact/Backend/Bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ import Chainweb.Version
v :: ChainwebVersion
v = FastTimedCPM petersonChainGraph

cid = unsafeChainId 0

bench :: C.Benchmark
bench = C.bgroup "pact-backend" $
play [ pactSqliteWithBench False . benchUserTable
Expand Down Expand Up @@ -103,7 +101,6 @@ cpWithBench torun =
C.envWithCleanup setup teardown $ \ ~(NoopNFData (_,e,_)) ->
C.bgroup name (benches e)
where

name = "batchedCheckpointer"
cid = unsafeChainId 0

Expand Down
9 changes: 0 additions & 9 deletions bench/Chainweb/Pact/Backend/ForkingBench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import qualified Criterion.Main as C

import Data.Aeson hiding (Error)
import Data.Bool
import Data.Bytes.Put
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Short as BS
Expand Down Expand Up @@ -80,15 +79,12 @@ import Pact.Types.Util hiding (unwrap)
-- chainweb imports

import Chainweb.BlockCreationTime
import Chainweb.BlockHash
import Chainweb.BlockHeader
import Chainweb.BlockHeader.Genesis
import Chainweb.BlockHeaderDB
import Chainweb.BlockHeaderDB.Internal
import Chainweb.BlockHeight
import Chainweb.Cut.Create
import Chainweb.ChainId
import Chainweb.Difficulty
import Chainweb.Graph
import Chainweb.Logger
import Chainweb.Miner.Core
Expand All @@ -113,9 +109,6 @@ import Chainweb.Version.Utils
import Data.CAS.HashMap hiding (toList)
import Data.CAS.RocksDB

import Numeric.Additive
import Numeric.AffineSpace

_run :: [String] -> IO ()
_run args = withArgs args $ C.defaultMain [bench]

Expand Down Expand Up @@ -251,8 +244,6 @@ mineBlock parent nonce pdb bhdb r = do
nonce
creationTime
parent
hbytes = HeaderBytes . runPutS $ encodeBlockHeaderWithoutHash bh
tbytes = TargetBytes . runPutS . encodeHashTarget $ _blockTarget bh
work = WorkHeader
{ _workHeaderBytes = BS.toShort $ runPut $ encodeBlockHeaderWithoutHash bh
, _workHeaderChainId = _chainId bh
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ debug-info: True
source-repository-package
type: git
location: https://github.com/kadena-io/pact.git
tag: 2ca4cae3eb8a0ef2783aa9457388c31b44a0dfbc
tag: 94cfeb57e2f90c299fc27cc3e72f6b6aa9109c06

source-repository-package
type: git
Expand Down
1 change: 1 addition & 0 deletions chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ executable cwtool


benchmark bench
import: warning-flags, debugging-flags
default-language: Haskell2010
ghc-options:
-threaded
Expand Down
8 changes: 1 addition & 7 deletions dep/kpkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
in import (fetch (builtins.fromJSON (builtins.readFile ./github.json)))
import (import ./thunk.nix)
4 changes: 2 additions & 2 deletions dep/kpkgs/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"repo": "kpkgs",
"branch": "master",
"private": false,
"rev": "8c15564d689258ff87539bc7609e1fcfee51a2bf",
"sha256": "0whz8xas9drzl4bd65qzlw2k89pp07ixcahr78fj3vkryn7bq85r"
"rev": "1d9aaba04ec2f7cdeaafe9687fc4822998a411af",
"sha256": "0rn4kjlxbfj3336rwrwcvfavf7y7a9hmgsm5hd1mdqw86haxjhga"
}
9 changes: 9 additions & 0 deletions dep/kpkgs/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ extra-deps:
- direct-sqlite-2.3.26
- ed25519-donna-0.1.1
- prettyprinter-1.6.0
- sbv-8.6
- sbv-8.7
- github: kadena-io/thyme
commit: 6ee9fcb026ebdb49b810802a981d166680d867c9

# --- Custom Pins --- #
- github: kadena-io/pact
commit: 2ca4cae3eb8a0ef2783aa9457388c31b44a0dfbc
commit: 94cfeb57e2f90c299fc27cc3e72f6b6aa9109c06
- github: kadena-io/chainweb-storage
commit: 07e7eb7596c7105aee42dbdb6edd10e3f23c0d7e
- github: kadena-io/rosetta
Expand Down

0 comments on commit 18d45f6

Please sign in to comment.