Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets #2178

Merged
merged 7 commits into from
Oct 6, 2020

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Sep 24, 2020

Issue Number

#2175

Overview

  • 9722d82
    📍 expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets

  • 6eefd47
    📍 Let the shelley-test-cluster nix build be run from any directory

  • 4c4d01e
    📍 Allow setting different LoggerName when configuring trace with 'withLogging'

  • 571e67d
    📍 Add TestLog to shelley-test-cluster

  • e99d875
    📍 Regenerate nix

Comments

@Anviking there's probably some clashes with what you're also doing with the logging, so happy to get the logging revision merged first and adjust that one.

@KtorZ KtorZ added the ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG label Sep 24, 2020
@KtorZ KtorZ requested a review from Anviking September 24, 2020 09:43
@KtorZ KtorZ self-assigned this Sep 24, 2020
@KtorZ KtorZ force-pushed the KtorZ/2175/integration-test-cluster-exposition branch from 6239764 to 3c3efd7 Compare September 24, 2020 09:56
--
-- - (Shelley) Contains only small coins (but greater than the minUTxOValue)
--
-- [ "either" , "flip" , "maple" , "shift" , "dismiss"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice docs, but feels like it might get out of date very easily? Also is a doc comment actually the right place for this information?

Maybe we could add a new shelley-test-cluster mnemonics, and change shelleyIntegrationTestFunds to also include a String description for each wallet?

The output of such a command would be huge. We could add some logic to protect against it, or maybe just something like grep:

E.g.

$ shelley-test-cluster query-mnemonic "small coins"
shelley/special/seq/Contains only small coins (but greater than the minUTxOValue) 1
    either flip maple shift dismiss bridge sweet reveal green tornado need patient wall stamp pass

shelley/special/seq/Contains only small coins (but greater than the minUTxOValue) 2
    reveal sweet green tornado need patient wall stamp pass either flip maple shift dismiss bridge

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice docs, but feels like it might get out of date very easily? Also is a doc comment actually the right place for this information?

I wondered the same and actually considered the same idea you're proposing here. Although arguably:

  • we haven't changed those mnemonics in several months and have no reason to change them in the upcoming future.
  • that is for now, mostly an internal tool, so if this end up outdated, we'll most likely notice it quite quickly.

So, the size of the problem seems not large enough to spend effort on making this better 😅 ... arguably.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, the same argument applies for the pools configurations and even the cluster setup (what if we add a new node tomorrow? the doc becomes outdated). All this doc describes implementation details, so by its very nature, it's fragile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember having to re-regenerate and update faucet mnemonics several for Shelley, which was not fun at all. With the HFC integration we finally got it much more automated.

I think just adding a command to output all mnemonics with a description, requiring manual | grep "" piping, would have been really simple.

But sure, it's perhaps unlikely they'll change now. And perhaps still best to keep it comment, for now.

Btw, I wonder if this could be used for ADP-381 eventually.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps ultimately, we can clean-up our integration tests setup to use that executable. Spawn it in a process and go ahead with the rest of the tests. Right now the integration setup is very complicated with contexts and mvars a bit everywhere waiting for stuff.

@Anviking
Copy link
Member

I can skim over again when rebased.

But trying now I get:

  cardano-cli: pokeSockAddr: path is too long
  CallStack (from HasCallStack):
    error, called at Network/Socket/Types.hsc:1077:40 in network-3.1.1.1-Izwsyk64OoDBVuRysfRa9D:Network.Socket.Types
λ> length "/private/var/folders/h_/mlzym27d5lz_fx3ph2d547700000gn/T/shelley-test-cluster-ff9e0fd9e9507b24/bft/node.socket"
110

seems 6 characters too long on macOS. Using withSystemTempDir trCluster "shelleycluster" instead of "shelley-test-cluster" seems to fix it.

@KtorZ KtorZ force-pushed the KtorZ/2175/integration-test-cluster-exposition branch from a5f269a to 99d5ecd Compare October 1, 2020 15:16
@KtorZ KtorZ force-pushed the KtorZ/2175/integration-test-cluster-exposition branch from 99d5ecd to 0d2fcc7 Compare October 1, 2020 15:32
@KtorZ
Copy link
Member Author

KtorZ commented Oct 1, 2020

bors merge

iohk-bors bot added a commit that referenced this pull request Oct 1, 2020
2178: expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets r=KtorZ a=KtorZ



# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have exposed our integration test setup in an executable.

# Comments

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

@Anviking there's probably some clashes with what you're also doing with the logging, so happy to get the logging revision merged first and adjust that one.

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: IOHK <[email protected]>
@@ -1648,6 +1715,8 @@ instance ToText ClusterLog where
MsgGenOperatorKeyPair dir ->
"Generating stake pool operator key pair in " <> T.pack dir
MsgCLI args -> T.pack $ unwords ("cardano-cli":args)
MsgListenAddress addr ->
"Wallet backend server listening on " <> T.pack (show addr)
Copy link
Member

@Anviking Anviking Oct 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be added.

For cardano-wallet:integration there is a separation between TestsLog and ClusterLog, where MsgListenAddress would make sense in TestsLog, but not ClusterLog.

We could add a similar TestsLog for this executable in a follow-up PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. Possibly. Although this one should really be in the application logs of the wallet.

Copy link
Member

@Anviking Anviking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless someone wants needs this urgently, can we address at least #2178 (comment) first?

@Anviking
Copy link
Member

Anviking commented Oct 1, 2020

bors r-

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 1, 2020

Canceled.

@Anviking
Copy link
Member

Anviking commented Oct 1, 2020

anviking/2175/integration-test-cluster-exposition

Suggestion of direction:

commit 339fe2bf19689613e663da2bbdaec1ea67804a1f (HEAD -> anviking/2175/integration-test-cluster-exposition, origin/anviking/2175/integration-test-cluster-exposition)
Author: Johannes Lund <[email protected]>
Date:   Thu Oct 1 18:40:48 2020 +0200

    Add TestLog to shelley-test-cluster

@KtorZ KtorZ force-pushed the KtorZ/2175/integration-test-cluster-exposition branch from f3d65b8 to e99d875 Compare October 5, 2020 08:14
Copy link
Member

@Anviking Anviking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Anviking
Copy link
Member

Anviking commented Oct 5, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 5, 2020
2178: expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets r=Anviking a=KtorZ


# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#2175 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- 9722d82
  📍 **expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets**
  
- 6eefd47
  📍 **Let the shelley-test-cluster nix build be run from any directory**
  
- 4c4d01e
  📍 **Allow setting different LoggerName when configuring trace with 'withLogging'**
  
- 571e67d
  📍 **Add TestLog to shelley-test-cluster**
  
- e99d875
  📍 **Regenerate nix**


# Comments

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

~~@Anviking there's probably some clashes with what you're also doing with the logging, so happy to get the logging revision merged first and adjust that one.~~

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: IOHK <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 5, 2020

Canceled.

@Anviking Anviking force-pushed the KtorZ/2175/integration-test-cluster-exposition branch from 8da9ccc to 2342b8d Compare October 5, 2020 09:05
@KtorZ
Copy link
Member Author

KtorZ commented Oct 5, 2020

bors retry

@KtorZ
Copy link
Member Author

KtorZ commented Oct 5, 2020

bors r-

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 5, 2020

Canceled.

@KtorZ KtorZ force-pushed the KtorZ/2175/integration-test-cluster-exposition branch from 2342b8d to a7b441e Compare October 6, 2020 07:37
@KtorZ
Copy link
Member Author

KtorZ commented Oct 6, 2020

bors merge

iohk-bors bot added a commit that referenced this pull request Oct 6, 2020
2178: expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets r=KtorZ a=KtorZ


# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#2175 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- 9722d82
  📍 **expose an executable 'shelley-test-cluster' which starts an integration test cluster with faucets**
  
- 6eefd47
  📍 **Let the shelley-test-cluster nix build be run from any directory**
  
- 4c4d01e
  📍 **Allow setting different LoggerName when configuring trace with 'withLogging'**
  
- 571e67d
  📍 **Add TestLog to shelley-test-cluster**
  
- e99d875
  📍 **Regenerate nix**


# Comments

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

~~@Anviking there's probably some clashes with what you're also doing with the logging, so happy to get the logging revision merged first and adjust that one.~~

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: IOHK <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 6, 2020

Canceled.

@Anviking
Copy link
Member

Anviking commented Oct 6, 2020

Manually tweaked .nix file

@Anviking
Copy link
Member

Anviking commented Oct 6, 2020

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 6, 2020

Build succeeded:

@iohk-bors iohk-bors bot merged commit 4ad068a into master Oct 6, 2020
@iohk-bors iohk-bors bot deleted the KtorZ/2175/integration-test-cluster-exposition branch October 6, 2020 09:39
iohk-bors bot added a commit that referenced this pull request Oct 13, 2020
2235: Fix extra-source-files not containing files used by TH r=hasufell a=hasufell



2239: WIP: Bump version from 2020.9.30 to 2020.10.13 r=KtorZ a=jonathanknowles

<!-- Short optional summary -->

Compatible with [`[email protected]`](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) and [`[email protected]`](https://github.com/input-output-hk/cardano-node/releases/tag/1.21.1).

## New Features

- Adds the ability for users to select their own SMASH servers for stakepool listings. (#2214)
- Adds transaction expiry slots for pending transactions. (#1879)

## Improvements

- Adds a 100-wallet scenario to the latency benchmark. (#2223)
- Adds an executable `shelley-test-cluster` which starts an integration test cluster that includes faucets. (#2178)
- Extends `isOurs` to return the derivation path of an address. (#2219)

## Resolved Issues

- Make pool garbage collection handle an unknown current epoch. (#2203)
- Fixes incorrect mainnet network parameters returned from API. (#2226)

## Known Issues

**_This section is a work in progress._**

- Wallet restoration status reported incorrectly on mainnet. ([ADP-483](https://jira.iohk.io/browse/ADP-483))

## Documentation

<!-- A snapshot of the documentation at the time of releasing. -->

Cardano (cardano-node)                                                                                             | ITN (Jörmungandr)
---                                                                                                                | ---
[API Documentation](https://input-output-hk.github.io/cardano-wallet/api/v2020-10-13)                              | [API Documentation](https://input-output-hk.github.io/cardano-wallet/api/v2020-10-13)
[CLI Manual](https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface/f71ecb7ece3deaec5bf60f4a4beea1d3950e0d46) | [CLI Manual](https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface-jormungandr/f71ecb7ece3deaec5bf60f4a4beea1d3950e0d46)
[Docker Manual](https://github.com/input-output-hk/cardano-wallet/wiki/Docker/f71ecb7ece3deaec5bf60f4a4beea1d3950e0d46)                     | [Docker Manual](https://github.com/input-output-hk/cardano-wallet/wiki/Docker-jormungandr/f71ecb7ece3deaec5bf60f4a4beea1d3950e0d46)

## Installation Instructions

### Cardano (cardano-node)

1. Install [`[email protected]`](https://github.com/input-output-hk/cardano-node/releases/tag/1.21.1).

2. Download the provided `cardano-wallet` for your platform, and uncompress it in a directory that is on your `$PATH`, e.g. `/usr/local/bin`. Or `%PATH%` on Windows.

4. Start `cardano-wallet --help` and see available parameters.

#### Docker

Pull from DockerHub and verify the version matches 2020.10.13.

```
$ docker pull inputoutput/cardano-wallet:2020.10.13
$ docker run --rm inputoutput/cardano-wallet:2020.10.13 version
```

### ITN (jormungandr)

1. Install [`[email protected]`](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0).

2. Download the provided `cardano-wallet-jormungandr` for your platform, and uncompress it in a directory that is on your `$PATH`, e.g. `/usr/local/bin`. Or `%PATH%` on Windows.

3. (optional) Install the bash/zsh auto-completion script according to the [jormungandr cli manual](https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface/{{JORM_CLI_WIKI_COMMIT}})

4. Start `cardano-wallet --help` and see available parameters.

#### Docker

Pull from DockerHub and verify the version matches 2020.10.13

```
$ docker pull inputoutput/cardano-wallet:2020.10.13-jormungandr
$ docker run --rm inputoutput/cardano-wallet:2020.10.13-jormungandr version
```

## Signatures

<!-- Signatures of people responsible for the release -->

Name                           | Role                | Approval
---                            | ---                 | ---:
Matthias Benkort @KtorZ        | Technical Team Lead | ⌛
Piotr Stachyra @piotr-iohk     | QA Engineer         | ⌛
Tatyana Valkevych @tatyanavych | Release Manager     | ⌛

Co-authored-by: Julian Ospald <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Jonathan Knowles <[email protected]>
Co-authored-by: IOHK <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants