# SilentDragonLite Release Process

## High-Level Philosophy

Beware of making high-risk changes too close to a new release, because they will not get as much testing as they should. Don't merge large branches which haven't undergone lots of testing just before a release.

It is best to keep doc/relnotes/README.md up to date as changes and bug fixes are made. It's more work to summarize all changes and bugfixes just before the release.

## Check for changes on master that should be on dev

See https://git.hush.is/hush/hush3/src/branch/master/doc/release-process.md#check-for-changes-on-master-that-should-be-on-dev , there is no sense repeating the exact same thing here.

SD+SDL very often has merge conflicts in generated translation files, because QT embeds line numbers in XML.
Read how to deal with them efficiently here: https://git.hush.is/hush/SilentDragon/src/branch/dev/doc/release-process.md#dealing-with-merge-conflicts

## Git Issues

Look for Git issues that should be fixed in the next release: https://git.hush.is/hush/SilentDragonLite/issues Especially low-risk and simple things and like documentation changes and improvements to error messages. Take note that changing strings in the source code, such as adding a new string or changing an existing one, will affect translations.

## Translations

...

```
# update generated translation data
./build.sh linguist
git commit -am "update translations"
git push
```

## Adding Checkpoints

Adding checkpoints make SDL sync much faster, especially for brand new wallets. If there are no recent checkpoints,
when a user makes a new wallet, it will sync from a block far in the past, which wastes time, bandwidth and CPU resources. To add a checkpoint , they are added to the file `lib/src/lightclient/checkpoints.rs` in the silentdragonlite-cli repo, and then the dependency on silentdragonlite-cli is updated in this SDL repo. Here is an example commit that updates checkpoints:

https://git.hush.is/hush/silentdragonlite-cli/commit/ef477f152e1a8bb8a5f7883a99e2a74a6f9eeb0b

To actually generate the checkpoint data, use the `sdl_checkpoints.pl` script in the hush3 repo: https://git.hush.is/hush/hush3/src/branch/master/contrib/sdl_checkpoints.pl . It uses the `getblockmerkletree` RPC to get the merkle tree data for a block height. It prints the data out in the format that checkpoints.rs wants it in, you simply need to copy and paste the output into the checkpoints.rs file. Once the data is updated in silentdragonlite-cli checkpoints.rs file, the file `lib/Cargo.toml` must be updated in this repo, and point to the commit id of the updated data. Once you update the manually-edited `Cargo.toml` you must run `cargo update` to update the generated `Cargo.lock` file. See https://doc.rust-lang.org/cargo/commands/cargo-update.html for more info. Once both files are updates, commit and push.

---

To fix `error: failed to select a version for the requirement 'aes = "^0.3"'` add the following to `.cargo/config.toml`:

```
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
```

To update the file run `cargo vendor` as was mentioned in https://git.hush.is/hush/SilentDragonLite/issues/91.

---

## Release process

  * Write release notes
  * Choose a release name
  * Make Gitea release from master branch
    * You can either manually make a git tag or let Gitea do it, which is easier
  * Make binaries
    * Windows exe 
    * Windows msi
    * Linux
    * Mac
    * Debian package
