Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Bump hackage-nix & cabal index #269

Merged
merged 4 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Bump this if you need newer packages.
index-state: 2021-10-20T00:00:00Z
index-state: 2022-01-22T00:00:00Z

packages: doc
freer-extras
Expand Down Expand Up @@ -29,11 +29,6 @@ test-show-details: streaming
allow-newer:
size-based:template-haskell

constraints:
-- Newer Hashable have instances for Set, which breaks beam-migrate
-- which declares its own instances of Hashable Set
hashable < 1.3.4.0

-- These packages appear in our dependency tree and are very slow to build.
-- Empirically, turning off optimization shaves off ~50% build time.
-- It also mildly improves recompilation avoidance.
Expand Down
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.

2 changes: 1 addition & 1 deletion nix/pkgs/haskell/cabal-install.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0azmy2l927cyb95v72s4h3s30k7nvzh14ygcnr9nj0rccahnsgin
0wkdiwlw4z3jjcdvv3f1l0ivv4ir2nh1ckkx96z7djvjwhlplyh6
2 changes: 1 addition & 1 deletion nix/pkgs/haskell/cardano-repo-tool.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
07g6335x8a7lsxmzfin11qx5pfg9ws8m2jyw68virhplkvjhh51i
0n1g83z73fv3f43cxzdqm6xk0gnxm8xyg38q3h1js1mqx3z1zark
2 changes: 1 addition & 1 deletion nix/pkgs/haskell/hls-darwin.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0jjn7a2infis7mfjda7zpz2jwhgc7y8qwn54a2wqn08dk76v9kzm
1jcjq5nxyi1japy1afpjk7fdpx72wsk8dqadq741r0wripzhc5n2
2 changes: 1 addition & 1 deletion nix/pkgs/haskell/hls-linux.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
08g0pbrqzw55l8cam8qq4v0q0gyrqv84z5y1zgzynkg9i709ypwy
1jcmlgvhmfk9pq7n74lb9hv4pr470lakgys115s2w5ymh2995mlm
194 changes: 100 additions & 94 deletions nix/pkgs/haskell/materialized-darwin/default.nix

Large diffs are not rendered by default.

194 changes: 100 additions & 94 deletions nix/pkgs/haskell/materialized-linux/default.nix

Large diffs are not rendered by default.

192 changes: 99 additions & 93 deletions nix/pkgs/haskell/materialized-windows/default.nix

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions playground-common/src/Auth.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ mkGithubEndpoints = do
-- | Config supplied at runtime.
data Config =
Config
{ _configJWTSignature :: !JWT.Signer
{ _configJWTSignature :: !JWT.EncodeSigner
, _configFrontendUrl :: !Text
, _configGithubCbPath :: !Text
, _configGithubClientId :: !OAuthClientId
Expand Down Expand Up @@ -214,7 +214,7 @@ authStatus cookieHeader = do
pure authStatusResult

extractGithubToken ::
JWT.Signer -> POSIXTime -> Maybe Text -> Either Text (Token 'Github)
JWT.EncodeSigner -> POSIXTime -> Maybe Text -> Either Text (Token 'Github)
extractGithubToken signer now cookieHeader =
runTrace "Reading cookies." $ do
cookies <- parseCookies . encodeUtf8 <$> withTrace cookieHeader
Expand All @@ -223,7 +223,7 @@ extractGithubToken signer now cookieHeader =
attempt $ "Reading JWT Cookie: " <> decodeUtf8 githubAuth
unverifiedJwt <- withTrace . JWT.decode . decodeUtf8 $ githubAuth
attempt "Verifying JWT Cookie."
verifiedJwt <- withTrace $ JWT.verify signer unverifiedJwt
verifiedJwt <- withTrace $ JWT.verify (JWT.toVerify signer) unverifiedJwt
let claims = JWT.claims verifiedJwt
attempt "Checking expiry date is set."
expiry <- withTrace $ JWT.exp claims
Expand Down Expand Up @@ -305,7 +305,7 @@ makeTokenRequest GithubEndpoints {..} Config {..} code =
-> Maybe ByteString
param = Just . encodeUtf8 . unpack

createSessionCookie :: JWT.Signer -> OAuthToken 'Github -> UTCTime -> SetCookie
createSessionCookie :: JWT.EncodeSigner -> OAuthToken 'Github -> UTCTime -> SetCookie
createSessionCookie signer token now =
defaultSetCookie
{ setCookieName = encodeUtf8 hSessionIdCookie
Expand Down
17 changes: 4 additions & 13 deletions plutus-contract/src/Plutus/Trace/Emulator/System.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ import Control.Monad.Freer.Coroutine
import Data.Default (def)
import Data.Foldable (traverse_)
import Data.Maybe (maybeToList)
import Data.Text qualified as Text
import Data.Text.Encoding qualified as Text
import Wallet.Emulator.Chain (ChainControlEffect, modifySlot, processBlock)
import Wallet.Emulator.MultiAgent (MultiAgentControlEffect, MultiAgentEffect, walletAction, walletControlAction)

import Data.Hashable (hash)
import Data.String (IsString (..))
import Ledger (Block, Slot, TxId (..), eitherTx, txId)
import Plutus.ChainIndex (BlockId (..), ChainIndexControlEffect, ChainSyncBlock (Block), Tip (Tip, TipAtGenesis),
appendBlock, fromOnChainTx, getTip)
import Ledger (Block, Slot)
import Plutus.ChainIndex (ChainIndexControlEffect, ChainSyncBlock (Block), Tip (Tip, TipAtGenesis), appendBlock,
blockId, fromOnChainTx, getTip)
import Plutus.Trace.Emulator.Types (EmulatorMessage (..))
import Plutus.Trace.Scheduler (EmSystemCall, MessageCall (..), Priority (..), Tag, fork, mkSysCall, sleep)
import Wallet.Emulator.NodeClient (ChainClientNotification (..), clientNotify)
Expand Down Expand Up @@ -142,11 +139,5 @@ appendNewTipBlock ::
appendNewTipBlock lastTip block newSlot = do
let nextBlockNo = case lastTip of TipAtGenesis -> 0
Tip _ _ n -> n + 1

-- To calculate the hast of a block, we concat the tx ids, and
-- apply 'hash' to the resulting string.
let blockId = BlockId
$ (Text.encodeUtf8 . Text.pack . show . hash)
$ foldMap (getTxId . eitherTx txId txId) block
let newTip = Tip newSlot blockId nextBlockNo
newTip = Tip newSlot (blockId block) nextBlockNo
appendBlock (Block newTip (fmap (\tx -> (fromOnChainTx tx, def)) block))
Loading