Skip to content

Commit

Permalink
Merge #3437 #3444
Browse files Browse the repository at this point in the history
3437: Bump version numbers for release of v2022-08-16 r=HeinrichApfelmus a=HeinrichApfelmus

- [x] Bump dependencies to match `cardano-node` 1.35.3
- [x] Bump dependency on `cardano-addresses`.
- [x] Bump `cardano-wallet` version number to `2022.8.16`.

### Comments

In preparation for a release, this pull request bumps dependencies and the package  version number.

### Issue Number

ADP-1999

3444: Improve cluster setup reliability r=Anviking a=Anviking

- [x] Ensure only a single pool has started when we submit txs containing important cluster setup
    - Avoids setup being rolled back, later causing integration test failures
- [x] See that it works 

### Comments

<!-- Additional comments, links, or screenshots to attach, if any. -->

### Issue Number

<!-- Reference the Jira/GitHub issue that this PR relates to, and which requirements it tackles.
  Note: Jira issues of the form ADP- will be auto-linked. -->

ADP-2140


Co-authored-by: Heinrich Apfelmus <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
  • Loading branch information
3 people authored Aug 17, 2022
3 parents 6bbeb01 + c725987 + 7afb71a commit 14ec772
Show file tree
Hide file tree
Showing 24 changed files with 164 additions and 108 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ See **Installation Instructions** for each available [release](https://github.co
> | cardano-wallet | cardano-node (compatible versions) | SMASH (compatible versions)
> | --- | --- | ---
> | `master` branch | [1.35.3](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.3) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
> | [v2022-08-16](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-08-16) | [1.35.3](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.3) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
> | [v2022-07-01](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-07-01) | [1.35.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.0) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
> | [v2022-05-27](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-05-27) | [1.34.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.34.1) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
> | [v2022-04-27](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-04-27) | [1.34.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.34.1) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
## How to build from sources

Expand Down
11 changes: 5 additions & 6 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@ source-repository-package
-- work with aeson-2, library dependencies will need to be updated to no longer use
-- this compatibility shim and have bounds to indicate they work with aeson-2 only.
-- After this, the dependency to hw-aeson can be dropped.
-- Using a fork until our patches can be merged upstream: https://github.com/haskell-works/hw-aeson/pull/64
source-repository-package
type: git
location: https://github.com/sevanspowell/hw-aeson
tag: b5ef03a7d7443fcd6217ed88c335f0c411a05408
--sha256: 1dwx90wqavdl4d0npbzbxyh2pzi9zs1qz7nvsrb3n1cm2xbv4i5z
location: https://github.com/haskell-works/hw-aeson
tag: ba7c1e41c6e54d6bf9fd1cd013489ac713fc3153
--sha256: 1czyn0whgv7czzgwn5y1zgwlkb9p9sn9z9sc9gixrjprcyc0p15p

-- Using a fork until our patches can be merged upstream

Expand Down Expand Up @@ -119,8 +118,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-addresses
tag: b7273a5d3c21f1a003595ebf1e1f79c28cd72513
--sha256: 129r5kyiw10n2021bkdvnr270aiiwyq58h472d151ph0r7wpslgp
tag: 2d1904ad93c6b6fbc5bd20f3e7d074ace3ecfd35
--sha256: 1y4qzgcni8ifm2fz19bpykiah1m99xy6sj0w469nnwq0dc37zfkj
subdir: command-line
core

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.5"

services:
cardano-node:
image: inputoutput/cardano-node:1.35.0
image: inputoutput/cardano-node:1.35.3
environment:
NETWORK:
volumes:
Expand All @@ -17,7 +17,7 @@ services:
max-size: "50m"

cardano-wallet:
image: inputoutput/cardano-wallet:2022.7.1
image: inputoutput/cardano-wallet:2022.8.16
volumes:
- wallet-${NETWORK}-db:/wallet-db
- node-ipc:/ipc
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/cardano-wallet-cli.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-cli
version: 2022.7.1
version: 2022.8.16
synopsis: Utilities for a building Command-Line Interfaces
homepage: https://github.com/input-output-hk/cardano-wallet
author: IOHK Engineering Team
Expand Down
2 changes: 1 addition & 1 deletion lib/core-integration/cardano-wallet-core-integration.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-core-integration
version: 2022.7.1
version: 2022.8.16
synopsis: Core integration test library.
description: Shared core functionality for our integration test suites.
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
2 changes: 1 addition & 1 deletion lib/core/cardano-wallet-core.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-core
version: 2022.7.1
version: 2022.8.16
synopsis: The Wallet Backend for a Cardano node.
description: Please see README.md
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
2 changes: 1 addition & 1 deletion lib/launcher/cardano-wallet-launcher.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-launcher
version: 2022.7.1
version: 2022.8.16
synopsis: Utilities for a building commands launcher
homepage: https://github.com/input-output-hk/cardano-wallet
author: IOHK Engineering Team
Expand Down
37 changes: 19 additions & 18 deletions lib/shelley/bench/latency-bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import Cardano.Wallet.Api.Types
, ApiUtxoStatistics
, ApiWallet
, ApiWalletMigrationPlan (..)
, EncodeAddress (..)
, WalletStyle (..)
)
import Cardano.Wallet.LatencyBenchShared
Expand Down Expand Up @@ -68,18 +67,16 @@ import Cardano.Wallet.Shelley.Faucet
import Cardano.Wallet.Shelley.Launch
( withSystemTempDir )
import Cardano.Wallet.Shelley.Launch.Cluster
( LocalClusterConfig (..)
( FaucetFunds (..)
, LocalClusterConfig (..)
, LogFileConfig (..)
, RunningNode (..)
, defaultPoolConfigs
, sendFaucetAssetsTo
, walletListenFromEnv
, withCluster
)
import Cardano.Wallet.Unsafe
( unsafeFromText )
import Control.Arrow
( first )
import Control.Monad
( replicateM, replicateM_ )
import Control.Monad.IO.Class
Expand Down Expand Up @@ -146,7 +143,6 @@ import UnliftIO.STM
( TVar )

import qualified Cardano.Wallet.Api.Link as Link
import qualified Data.Text as T
import qualified Network.HTTP.Types.Status as HTTP

main :: forall n. (n ~ 'Mainnet) => IO ()
Expand Down Expand Up @@ -467,18 +463,23 @@ withShelleyServer tracers action = do
[head defaultPoolConfigs]
maxBound
logCfg
let initialFunds =
shelleyIntegrationTestFunds
<> byronIntegrationTestFunds
withCluster nullTracer dir clusterCfg initialFunds $
onClusterStart act db dir

onClusterStart act db dir (RunningNode conn block0 (np, vData) _) = do

let encodeAddr = T.unpack . encodeAddress @'Mainnet
let addressesMA = map (first encodeAddr) (maryIntegrationTestAssets (Coin 10_000_000))
sendFaucetAssetsTo nullTracer conn dir 20 addressesMA

withCluster
nullTracer
dir
clusterCfg
faucetFunds
(onClusterStart act db)

faucetFunds = FaucetFunds
{ pureAdaFunds =
shelleyIntegrationTestFunds
<> byronIntegrationTestFunds
, maFunds =
maryIntegrationTestAssets (Coin 10_000_000)
, mirFunds = [] -- not needed
}

onClusterStart act db (RunningNode conn block0 (np, vData) _) = do
listen <- walletListenFromEnv
serveWallet
(NodeSource conn vData (SyncTolerance 10))
Expand Down
2 changes: 1 addition & 1 deletion lib/shelley/cardano-wallet.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet
version: 2022.7.1
version: 2022.8.16
synopsis: Wallet backend protocol-specific bits implemented using Shelley nodes
description: Please see README.md
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
30 changes: 12 additions & 18 deletions lib/shelley/exe/local-cluster.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Cardano.CLI
import Cardano.Startup
( installSignalHandlers, setDefaultFilePermissions, withUtf8Encoding )
import Cardano.Wallet.Api.Types
( EncodeAddress (..), decodeAddress )
( decodeAddress )
import Cardano.Wallet.Logging
( stdoutTextTracer, trMessageText )
import Cardano.Wallet.Primitive.AddressDerivation
Expand All @@ -50,11 +50,10 @@ import Cardano.Wallet.Shelley.Launch
import Cardano.Wallet.Shelley.Launch.Cluster
( ClusterLog (..)
, Credential (..)
, FaucetFunds (..)
, RunningNode (..)
, localClusterConfigFromEnv
, moveInstantaneousRewardsTo
, oneMillionAda
, sendFaucetAssetsTo
, testMinSeverityFromEnv
, tokenMetadataServerFromEnv
, walletListenFromEnv
Expand Down Expand Up @@ -218,26 +217,21 @@ main = withLocalClusterSetup $ \dir clusterLogs walletLogs ->
where
unsafeDecodeAddr = either (error . show) id . decodeAddress @'Mainnet

faucetFunds =
faucetFunds = FaucetFunds
{ pureAdaFunds =
shelleyIntegrationTestFunds
<> byronIntegrationTestFunds
<> map (first unsafeDecodeAddr) hwWalletFunds
, maFunds =
maryIntegrationTestAssets (Coin 10_000_000)
, mirFunds =
first KeyCredential
. (,Coin $ fromIntegral oneMillionAda)
<$> concatMap genRewardAccounts mirMnemonics
}

setupFaucet dir trCluster (RunningNode socketPath _ _ _) = do
traceWith trCluster MsgSettingUpFaucet
let trCluster' = contramap MsgCluster trCluster
let encodeAddresses = map (first (T.unpack . encodeAddress @'Mainnet))
let accts = KeyCredential <$> concatMap genRewardAccounts mirMnemonics
let rewards' = (, Coin $ fromIntegral oneMillionAda) <$> accts

sendFaucetAssetsTo trCluster' socketPath dir 20 $ encodeAddresses $
maryIntegrationTestAssets (Coin 1_000_000_000)
moveInstantaneousRewardsTo trCluster' socketPath dir rewards'

whenReady dir trCluster logs node@(RunningNode socketPath block0 (gp, vData) _) =
whenReady dir trCluster logs (RunningNode socketPath block0 (gp, vData) _) =
withLoggingNamed "cardano-wallet" logs $ \(sb, (cfg, tr)) -> do
setupFaucet dir trCluster node

ekgEnabled >>= flip when (EKG.plugin cfg tr sb >>= loadPlugin sb)

let tracers = setupTracers (tracerSeverities (Just Debug)) tr
Expand Down
Loading

0 comments on commit 14ec772

Please sign in to comment.