Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit c6a50c2

Browse files
authored
Merge pull request #4033 from input-output-hk/jc/merge/release-2.0.1-master
Jc/merge/release 2.0.1 master
2 parents d35bfbf + c11c2ac commit c6a50c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+374
-770
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

3+
## Cardano SL 2.0.1
4+
5+
### Fixes
6+
7+
- Relocate fee sanity check and make it relative to each transaction (rather than absolute) ([CO-446](https://iohk.myjetbrains.com/youtrack/issue/CO-446) [#3993](https://github.com/input-output-hk/cardano-sl/pull/3993)
8+
- Correction to block retrieval concurrency and exception handling, so that it will recover in case of certain network failure conditions. ([CDEC-658](https://iohk.myjetbrains.com/youtrack/issue/CDEC-658) [#3998](https://github.com/input-output-hk/cardano-sl/pull/3998))
9+
10+
311
## Cardano SL 2.0.0
412

513

auxx/cardano-sl-auxx.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-auxx
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - Auxx
44
description: Cardano SL - Auxx
55
license: MIT

binary/cardano-sl-binary.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-binary
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - binary serialization
44
description: This package defines a type class for binary serialization,
55
helpers and instances.

binary/test/cardano-sl-binary-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-binary-test
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - binary serializarion (tests)
44
description: This package contains test helpers for cardano-sl-binary.
55
license: MIT

chain/cardano-sl-chain.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-chain
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - transaction processing
44
description: Cardano SL - transaction processing
55
license: MIT

chain/test/cardano-sl-chain-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-chain-test
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - arbitrary instances for cardano-sl-chain
44
description: Cardano SL - arbitrary instances for cardano-sl-chain
55
license: MIT

client/cardano-sl-client.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-client
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL client modules
44
description: Cardano SL client modules
55
license: MIT

cluster/cardano-sl-cluster.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-cluster
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Utilities to generate and run cluster of nodes
44
description: See README
55
homepage: https://github.com/input-output-hk/cardano-sl/cluster/README.md

core/cardano-sl-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-core
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - core
44
description: Cardano SL - core
55
license: MIT

core/test/cardano-sl-core-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-core-test
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - core functionality (tests)
44
description: QuickCheck Arbitrary instances for the Cardano SL core
55
functionality.

crypto/cardano-sl-crypto.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-crypto
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - cryptography primitives
44
description: This package contains cryptography primitives used in Cardano SL.
55
license: MIT

crypto/test/cardano-sl-crypto-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-crypto-test
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - arbitrary instances for cardano-sl-crypto
44
description: This package contains arbitrary instances for the cryptography primitives used in Cardano SL.
55
license: MIT

db/cardano-sl-db.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-db
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - basic DB interfaces
44
description: Cardano SL - basic DB interfaces
55
license: MIT

db/test/cardano-sl-db-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-db-test
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - arbitrary instances for cardano-sl-db
44
description: Cardano SL - arbitrary instances for cardano-sl-db
55
license: MIT

explorer/cardano-sl-explorer.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-explorer
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano explorer
44
description: Please see README.md
55
license: MIT

faucet/cardano-sl-faucet.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-faucet
2-
version: 2.0.0
2+
version: 2.0.1
33
description: Cardano SL - faucet
44
license: MIT
55
author: Ben Ford

generator/cardano-sl-generator.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-generator
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - arbitrary data generation
44
description: Cardano SL - arbitrary data generation
55
license: MIT

infra/cardano-sl-infra.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-infra
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - infrastructural
44
description: Cardano SL - infrastructural
55
license: MIT

infra/src/Pos/Infra/Diffusion/Types.hs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module Pos.Infra.Diffusion.Types
77
, Diffusion (..)
88
, hoistDiffusion
99
, dummyDiffusionLayer
10+
, StreamBlocks (..)
11+
, hoistStreamBlocks
1012
, DiffusionHealth (..)
1113
) where
1214

@@ -29,6 +31,24 @@ import Pos.Infra.Diffusion.Subscription.Status (SubscriptionStates,
2931
emptySubscriptionStates)
3032
import Pos.Infra.Reporting.Health.Types (HealthStatus (..))
3133

34+
-- | How to handle a stream of blocks.
35+
data StreamBlocks block m t = StreamBlocks
36+
{ streamBlocksMore :: NonEmpty block -> m (StreamBlocks block m t)
37+
-- ^ The server gives a batch of blocks.
38+
, streamBlocksDone :: m t
39+
-- ^ The server has no more blocks.
40+
}
41+
42+
hoistStreamBlocks
43+
:: ( Functor n )
44+
=> (forall x . m x -> n x)
45+
-> StreamBlocks block m t
46+
-> StreamBlocks block n t
47+
hoistStreamBlocks nat streamBlocks = streamBlocks
48+
{ streamBlocksMore = \blks ->
49+
fmap (hoistStreamBlocks nat) (nat (streamBlocksMore streamBlocks blks))
50+
, streamBlocksDone = nat (streamBlocksDone streamBlocks)
51+
}
3252

3353
data DiffusionHealth = DiffusionHealth {
3454
dhStreamWriteQueue :: !Gauge -- Number of blocks stored in the block stream write queue
@@ -49,7 +69,7 @@ data Diffusion m = Diffusion
4969
NodeId
5070
-> HeaderHash
5171
-> [HeaderHash]
52-
-> ([Block] -> m t)
72+
-> StreamBlocks Block m t
5373
-> m (Maybe t)
5474
-- | This is needed because there's a security worker which will request
5575
-- tip-of-chain from the network if it determines it's very far behind.
@@ -108,7 +128,7 @@ hoistDiffusion
108128
-> Diffusion n
109129
hoistDiffusion nat rnat orig = Diffusion
110130
{ getBlocks = \nid bh hs -> nat $ getBlocks orig nid bh hs
111-
, streamBlocks = \nid hh hhs k -> nat $ streamBlocks orig nid hh hhs (rnat . k)
131+
, streamBlocks = \nid hh hhs k -> nat $ streamBlocks orig nid hh hhs (hoistStreamBlocks rnat k)
112132
, requestTip = nat $ (fmap . fmap) nat (requestTip orig)
113133
, announceBlockHeader = nat . announceBlockHeader orig
114134
, sendTx = nat . sendTx orig

infra/test/cardano-sl-infra-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl-infra-test
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL - generators for cardano-sl-infra
44
description: This package contains generators for the infrastructural data types used in Cardano SL.
55
license: MIT

lib/bench/Bench/Pos/Diffusion/BlockDownload.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ import Pos.Diffusion.Full (FullDiffusionConfiguration (..),
4444
FullDiffusionInternals (..),
4545
RunFullDiffusionInternals (..),
4646
diffusionLayerFullExposeInternals)
47-
import Pos.Infra.Diffusion.Types as Diffusion (Diffusion (..))
47+
import Pos.Infra.Diffusion.Types as Diffusion (Diffusion (..),
48+
StreamBlocks (..))
4849
import qualified Pos.Infra.Network.Policy as Policy
4950
import Pos.Infra.Network.Types (Bucket (..))
5051
import Pos.Infra.Reporting.Health.Types (HealthStatus (..))
@@ -226,7 +227,10 @@ blockDownloadStream serverAddress setStreamIORef client ~(blockHeader, checkpoin
226227
where
227228
numBlocks = batches * 2200
228229

229-
writeCallback !_ = return ()
230+
writeCallback = StreamBlocks
231+
{ streamBlocksMore = \(!_) -> pure writeCallback
232+
, streamBlocksDone = pure ()
233+
}
230234

231235
blockDownloadBenchmarks :: NodeId -> (Int -> IO ()) -> Diffusion IO -> [Criterion.Benchmark]
232236
blockDownloadBenchmarks serverAddress setStreamIORef client =

lib/cardano-sl.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cardano-sl
2-
version: 2.0.0
2+
version: 2.0.1
33
synopsis: Cardano SL main implementation
44
description: Please see README.md
55
license: MIT

lib/configuration.yaml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14839,7 +14839,7 @@ mainnet_wallet_win64: &mainnet_wallet_win64
1483914839
<<: *mainnet_full
1484014840
update:
1484114841
applicationName: csl-daedalus
14842-
applicationVersion: 11
14842+
applicationVersion: 12
1484314843
lastKnownBlockVersion:
1484414844
bvMajor: 0
1484514845
bvMinor: 1
@@ -14849,7 +14849,7 @@ mainnet_wallet_macos64: &mainnet_wallet_macos64
1484914849
<<: *mainnet_full
1485014850
update:
1485114851
applicationName: csl-daedalus
14852-
applicationVersion: 11
14852+
applicationVersion: 12
1485314853
lastKnownBlockVersion:
1485414854
bvMajor: 0
1485514855
bvMinor: 1
@@ -14859,7 +14859,7 @@ mainnet_wallet_linux64: &mainnet_wallet_linux64
1485914859
<<: *mainnet_full
1486014860
update:
1486114861
applicationName: csl-daedalus
14862-
applicationVersion: 11
14862+
applicationVersion: 12
1486314863
lastKnownBlockVersion:
1486414864
bvMajor: 0
1486514865
bvMinor: 1
@@ -14929,29 +14929,20 @@ testnet_wallet: &testnet_wallet
1492914929
<<: *testnet_full
1493014930
update: &testnet_wallet_update
1493114931
applicationName: csl-daedalus
14932-
applicationVersion: 4
14932+
applicationVersion: 6
1493314933
lastKnownBlockVersion:
1493414934
bvMajor: 0
1493514935
bvMinor: 0
1493614936
bvAlt: 0
1493714937

1493814938
testnet_wallet_win64: &testnet_wallet_win64
1493914939
<<: *testnet_wallet
14940-
update:
14941-
<<: *testnet_wallet_update
14942-
systemTag: win64
1494314940

1494414941
testnet_wallet_macos64: &testnet_wallet_macos64
1494514942
<<: *testnet_wallet
14946-
update:
14947-
<<: *testnet_wallet_update
14948-
systemTag: macos64
1494914943

1495014944
testnet_wallet_linux64: &testnet_wallet_linux64
1495114945
<<: *testnet_wallet
14952-
update:
14953-
<<: *testnet_wallet_update
14954-
systemTag: linux
1495514946

1495614947
##############################################################################
1495714948
## ##
@@ -14973,7 +14964,7 @@ mainnet_dryrun_wallet_win64: &mainnet_dryrun_wallet_win64
1497314964
<<: *mainnet_dryrun_full
1497414965
update:
1497514966
applicationName: csl-daedalus
14976-
applicationVersion: 18
14967+
applicationVersion: 21
1497714968
lastKnownBlockVersion:
1497814969
bvMajor: 0
1497914970
bvMinor: 2
@@ -14983,7 +14974,7 @@ mainnet_dryrun_wallet_macos64: &mainnet_dryrun_wallet_macos64
1498314974
<<: *mainnet_dryrun_full
1498414975
update:
1498514976
applicationName: csl-daedalus
14986-
applicationVersion: 18
14977+
applicationVersion: 21
1498714978
lastKnownBlockVersion:
1498814979
bvMajor: 0
1498914980
bvMinor: 2
@@ -14993,7 +14984,7 @@ mainnet_dryrun_wallet_linux64: &mainnet_dryrun_wallet_linux64
1499314984
<<: *mainnet_dryrun_full
1499414985
update:
1499514986
applicationName: csl-daedalus
14996-
applicationVersion: 18
14987+
applicationVersion: 21
1499714988
lastKnownBlockVersion:
1499814989
bvMajor: 0
1499914990
bvMinor: 2

lib/src/Pos/Diffusion/Full.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ import Pos.Infra.Diffusion.Subscription.Status (SubscriptionStates,
6868
emptySubscriptionStates)
6969
import Pos.Infra.Diffusion.Transport.TCP (bracketTransportTCP)
7070
import Pos.Infra.Diffusion.Types (Diffusion (..),
71-
DiffusionHealth (..), DiffusionLayer (..))
71+
DiffusionHealth (..), DiffusionLayer (..),
72+
StreamBlocks (..))
7273
import Pos.Infra.Network.Types (Bucket (..), NetworkConfig (..),
7374
NodeType, SubscriptionWorker (..), initQueue,
7475
topologyHealthStatus, topologyRunKademlia,
@@ -358,7 +359,7 @@ diffusionLayerFullExposeInternals fdconf
358359
NodeId
359360
-> HeaderHash
360361
-> [HeaderHash]
361-
-> ([Block] -> IO t)
362+
-> StreamBlocks Block IO t
362363
-> IO (Maybe t)
363364
streamBlocks = Diffusion.Block.streamBlocks logTrace diffusionHealth logic streamWindow enqueue
364365

0 commit comments

Comments
 (0)