Skip to content

Commit

Permalink
Merge #2100 #2115
Browse files Browse the repository at this point in the history
2100: cardano-node: 1.19.0 -> 1.19.1 r=rvl a=rvl

### Issue Number

None

### Overview

- Updates cardano-node to [1.19.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.19.1)
- Back to a URL snapshot - hopefully prevents stack snapshot caching issues.
- Completely disable RDRAND in cryptonite using a cabal flag.

### Comments

- Needs input-output-hk/cardano-haskell#26 merged first.


2115: stack.yaml: Completely disable RDRAND support in cryptonite r=rvl a=rvl

### Issue Number

Relates to ADP-428.

### Overview

Ensures that RDRAND can never be the sole source of RNG entropy.

To generate mnemonics it goes through cryptonite `Crypto.Random.Entropy.getEntropy`. Disabling the RDRAND backend will leave just the WinCryptoAPI (windows) and DevRandom, DevURandom backends (not windows).


Co-authored-by: Rodney Lorrimar <[email protected]>
  • Loading branch information
iohk-bors[bot] and rvl authored Sep 8, 2020
3 parents d7dc954 + 262f567 + dc160c6 commit 54cb7f5
Show file tree
Hide file tree
Showing 53 changed files with 137 additions and 431 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ See **Installation Instructions** for each available [release](https://github.co
>
> | cardano-wallet | jörmungandr (compatible versions) | cardano-node (compatible versions)
> | --- | --- | ---
> | `master` branch | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.19.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.19.0)
> | `master` branch | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.19.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.19.1)
> | [v2020-08-03](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-08-03) | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.18.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.18.0)
> | [v2020-07-28](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-07-28) | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.18.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.18.0)
> | [v2020-07-06](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-07-06) | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.14.2](https://github.com/input-output-hk/cardano-node/releases/tag/1.14.2)
Expand Down
145 changes: 0 additions & 145 deletions cardano-1.19.dev1.yaml

This file was deleted.

9 changes: 8 additions & 1 deletion lib/shelley/src/Cardano/Wallet/Shelley/Compatibility.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ module Cardano.Wallet.Shelley.Compatibility

-- * Utilities
, invertUnitInterval
, interval0
, interval1
) where

import Prelude
Expand Down Expand Up @@ -159,6 +161,8 @@ import Data.Proxy
( Proxy )
import Data.Quantity
( Percentage, Quantity (..), mkPercentage )
import Data.Ratio
( (%) )
import Data.Text
( Text )
import Data.Text.Class
Expand Down Expand Up @@ -206,7 +210,7 @@ import Ouroboros.Network.NodeToClient
import Ouroboros.Network.Point
( WithOrigin (..) )
import Shelley.Spec.Ledger.BaseTypes
( strictMaybeToMaybe, urlToText )
( interval0, strictMaybeToMaybe, urlToText )
import Type.Reflection
( Typeable, typeRep )

Expand Down Expand Up @@ -1093,3 +1097,6 @@ instance Buildable LocalAddress where
--
invertUnitInterval :: SL.UnitInterval -> SL.UnitInterval
invertUnitInterval = SL.truncateUnitInterval . (1 - ) . SL.intervalValue

interval1 :: SL.UnitInterval
interval1 = SL.truncateUnitInterval (1 % 1)
2 changes: 1 addition & 1 deletion lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ moveInstantaneousRewardsTo tr dir targets = do
stakeCert <- issueStakeCert tr dir pub stakeVK
void $ cli tr
[ "shelley", "governance", "create-mir-certificate"
, "--treasury"
, "--reserves"
, "--reward", show reward
, "--stake-verification-key-file", stakeVK
, "--out-file", mirCert
Expand Down
18 changes: 10 additions & 8 deletions lib/shelley/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ import Cardano.Wallet.Shelley.Compatibility
, TPraosStandardCrypto
, decentralizationLevelFromPParams
, fromTip
, interval0
, interval1
, invertUnitInterval
, toCardanoHash
, toPoint
Expand Down Expand Up @@ -198,10 +200,10 @@ spec = do
checkCoverage $ property $ \i ->
let half = SL.truncateUnitInterval (1 % 2) in
cover 10 (i == half) "i = 0.5" $
cover 10 (i == SL.interval0) "i = 0" $
cover 10 (i == SL.interval1) "i = 1" $
cover 10 (i > SL.interval0 && i < half) "0 < i < 0.5" $
cover 10 (half < i && i < SL.interval1) "0.5 < i < 1"
cover 10 (i == interval0) "i = 0" $
cover 10 (i == interval1) "i = 1" $
cover 10 (i > interval0 && i < half) "0 < i < 0.5" $
cover 10 (half < i && i < interval1) "0.5 < i < 1"
True

it "invertUnitInterval . invertUnitInterval == id" $
Expand All @@ -214,10 +216,10 @@ spec = do
`shouldBe` 1

it "invertUnitInterval interval0 == interval1" $
invertUnitInterval SL.interval0 `shouldBe` SL.interval1
invertUnitInterval interval0 `shouldBe` interval1

it "invertUnitInterval interval1 == interval0" $
invertUnitInterval SL.interval1 `shouldBe` SL.interval0
invertUnitInterval interval1 `shouldBe` interval0

it "invertUnitInterval half == half" $
let half = SL.truncateUnitInterval (1 % 2) in
Expand Down Expand Up @@ -251,8 +253,8 @@ epochLength = EpochLength 10

instance Arbitrary SL.UnitInterval where
arbitrary = oneof
[ pure SL.interval0
, pure SL.interval1
[ pure interval0
, pure interval1
, pure $ SL.truncateUnitInterval (1 % 2)
, SL.truncateUnitInterval . (% 1000) <$> choose (0, 1000)
]
Expand Down
4 changes: 2 additions & 2 deletions nix/.stack.nix/Win32-network.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/byron-spec-chain.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/byron-spec-ledger.nix

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

6 changes: 3 additions & 3 deletions nix/.stack.nix/cardano-api.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-binary-test.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-binary.nix

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

6 changes: 3 additions & 3 deletions nix/.stack.nix/cardano-cli.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-config.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-crypto-class.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-crypto-praos.nix

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

4 changes: 2 additions & 2 deletions nix/.stack.nix/cardano-crypto-test.nix

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

Loading

0 comments on commit 54cb7f5

Please sign in to comment.