<commit_before># Testing update system

## Prepare CSL binaries, cluster

* Launch cluster using `devnet_shortep_full` config, on:
   * 4 core nodes (full connectivity)
   * 1 relay (connected to all core nodes)
* Generate *before* installer, use `devnet_shortep_wallet`
   * set appropriate `system-start`, `ipdhtmappings` for daedalus
* Generate *after* installer, use `devnet_shortep_updated_wallet`
   * set appropriate `system-start`, `ipdhtmappings` for daedalus
* Build cardano-sl with `devnet_shortep_full` (`./scripts/build/cardano-sl.sh --dn`)

## Test base version

1. Download *before* installers
2. Install & launch daedalus
3. Check:
    * blocks are retrieved
    * transactions are sent

## Propose update & vote for it

### Prepare node keys

1. Take genesis folder corresponding to `devnet_shortep_full`
Should have name like `genesis-dn-2017-08-31_15-28.tgz`
2.

```
cp -R <genesis_directory>/nodes nodes2
cd nodes2
for i in {0..4}; do stack exec -- cardano-keygen rearrange --mask key$i.sk; done
```

### Cardano-wallet

Launch `cardano-wallet` with CLI:

```
stack exec -- cardano-wallet --system-start 0 --log-config log-config-prod.yaml --logs-prefix "logs/abc4" --db-path db-abc4 --peer {relayHost}:3000 repl
```

(!) Replace:

`{relayHost}` with address of actual relay node

Then you will appear in `repl` mode and would need to perform few actions:

#### Import keys

```
add-key nodes2/key1.sk
add-key nodes2/key2.sk
add-key nodes2/key3.sk
add-key nodes2/key4.sk
```

Then if you execute

```
listaddr
```

You should see something like:

```
> listaddr<commit_msg>Update test-update-system.md<commit_after># Testing update system

## Prepare CSL binaries, cluster

* Launch cluster using `devnet_shortep_full` config, on:
   * 4 core nodes (full connectivity)
   * 1 relay (connected to all core nodes)
* Generate *before* installer, use `devnet_shortep_wallet`
   * set appropriate `system-start`, `ipdhtmappings` for daedalus
* Generate *after* installer, use `devnet_shortep_updated_wallet`
   * set appropriate `system-start`, `ipdhtmappings` for daedalus
* Build cardano-sl with `devnet_shortep_full` (`./scripts/build/cardano-sl.sh --dn`)

## Test base version

1. Download *before* installers
2. Install & launch daedalus
3. Check:
    * blocks are retrieved
    * transactions are sent

## Propose update & vote for it

### Prepare node keys

1. Take genesis folder corresponding to `devnet_shortep_full`
Should have name like `genesis-dn-2017-08-31_15-28.tgz`
2.

```
cp -R <genesis_directory>/keys-testnet/rich nodes2
cd nodes2
for i in {0..4}; do stack exec -- cardano-keygen rearrange --mask testnet$i.key; done
```

### Cardano-wallet

Launch `cardano-wallet` with CLI:

```
stack exec -- cardano-wallet --system-start 0 --log-config log-config-prod.yaml --logs-prefix "logs/abc4" --db-path db-abc4 --peer {relayHost}:3000 repl
```

(!) Replace:

`{relayHost}` with address of actual relay node

Then you will appear in `repl` mode and would need to perform few actions:

#### Import keys

```
add-key nodes2/testnet1.key
add-key nodes2/testnet2.key
add-key nodes2/testnet3.key
add-key nodes2/testnet4.key
```

Then if you execute

```
listaddr
```

You should see something like:

```
> listaddr
{'fraction_non_alphanumeric': 0.12322421247683756, 'fraction_numerical': 0.02347127856701668, 'mean_word_length': 4.133122028526149, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5265594', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1081, 'n_words': 348}