Forge a block once every 20 seconds, no matter what
That way, we try to get closer to an actual block production pattern.
That way, we try to get closer to an actual block production pattern.
blockTime = 20 -- seconds
simulateTicks queue = forever $ do
threadDelay blockTime
transactions <- flushQueue queue []
let block = mkBlock transactions
allHandlers <- fmap chainHandler <$> readTVarIO nodes
forM_ allHandlers (`onRollForward` block)
flushQueue queue transactions = do
hasTx <- atomically $ tryReadTQueue queue
case hasTx of
Just tx -> do
let block = mkBlock tx
allHandlers <- fmap chainHandler <$> readTVarIO nodes
forM_ allHandlers (`onRollForward` block)
Nothing -> pure ()
flushQueue queue (tx:transactions)
Nothing -> pure transactions
-- | Find Cardano vkey corresponding to our Hydra vkey using signing keys lookup.
-- This is a bit cumbersome and a tribute to the fact the `HydraNode` itself has no
csk <- getVerificationKey . signingKey . snd <$> find ((== me) . deriveParty . fst) seedKeys
pure (csk, filter (/= csk) $ map (getVerificationKey . signingKey . snd) seedKeys)
mkBlock :: Ledger.ValidatedTx LedgerEra -> Util.Block
mkBlock ledgerTx =
mkBlock :: [Ledger.ValidatedTx LedgerEra] -> Util.Block
mkBlock transactions =
let header = (arbitrary :: Gen (Praos.Header StandardCrypto)) `generateWith` 42
body = TxSeq . StrictSeq.fromList $ [ledgerTx]
body = TxSeq . StrictSeq.fromList $ transactions
in BlockBabbage $ mkShelleyBlock $ Ledger.Block header body
-- TODO: unify with BehaviorSpec's ?
Bumps [bech32](https://github.com/rust-bitcoin/rust-bech32) from 0.8.1 to 0.9.1. - [Changelog](https://github.com/rust-bitcoin/rust-bech32/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-bitcoin/rust-bech32/compare/v0.8.1...v0.9.1) --- updated-dependencies: - dependency-name: bech32 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [log](https://github.com/rust-lang/log) from 0.4.17 to 0.4.18. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.17...0.4.18) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.28.1 to 1.28.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.1...tokio-1.28.2) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PLT-5901 Implemented checks for valid network addresses.
fix: tuple clause must preserve previous clause properties state
fix: rearrange clauses and fill in gaps now handles nested patterns in a uniform way fix: discards in records was being sorted incorrectly leading to type issues chore: remove some filter maps in cases where None is impossible anyway chore: some refactoring on a couple functions to clean up
fix: tuple clause must preserve previous clause properties state