Fix parameter naming inconsistencies between .h and .cpp files
[bitcoinplatinum.git] / doc / release-process.md
blob91ef9e2280d39d757208aa1aabba3b900c5b7861
1 Release Process
2 ====================
4 Before every release candidate:
6 * Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#synchronising-translations).
8 * Update manpages, see [gen-manpages.sh](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/README.md#gen-manpagessh).
10 Before every minor and major release:
12 * Update [bips.md](bips.md) to account for changes since the last release.
13 * Update version in sources (see below)
14 * Write release notes (see below)
15 * Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc.
16 * Update `src/chainparams.cpp` defaultAssumeValid  with information from the getblockhash rpc.
17   - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip.
18   - Testnet should be set some tens of thousands back from the tip due to reorgs there.
19   - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect
20      that causes rejection of blocks in the past history.
22 Before every major release:
24 * Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
25 * Update [`BLOCK_CHAIN_SIZE`](/src/qt/intro.cpp) to the current size plus some overhead.
27 ### First time / New builders
29 If you're using the automated script (found in [contrib/gitian-build.sh](/contrib/gitian-build.sh)), then at this point you should run it with the "--setup" command. Otherwise ignore this.
31 Check out the source code in the following directory hierarchy.
33     cd /path/to/your/toplevel/build
34     git clone https://github.com/bitcoin-core/gitian.sigs.git
35     git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
36     git clone https://github.com/devrandom/gitian-builder.git
37     git clone https://github.com/bitcoin/bitcoin.git
39 ### Bitcoin maintainers/release engineers, update version in sources
41 Update the following:
43 - `configure.ac`:
44     - `_CLIENT_VERSION_MAJOR`
45     - `_CLIENT_VERSION_MINOR`
46     - `_CLIENT_VERSION_REVISION`
47     - Don't forget to set `_CLIENT_VERSION_IS_RELEASE` to `true`
48 - `src/clientversion.h`: (this mirrors `configure.ac` - see issue #3539)
49     - `CLIENT_VERSION_MAJOR`
50     - `CLIENT_VERSION_MINOR`
51     - `CLIENT_VERSION_REVISION`
52     - Don't forget to set `CLIENT_VERSION_IS_RELEASE` to `true`
53 - `doc/README.md` and `doc/README_windows.txt`
54 - `doc/Doxyfile`: `PROJECT_NUMBER` contains the full version
55 - `contrib/gitian-descriptors/*.yml`: usually one'd want to do this on master after branching off the release - but be sure to at least do it before a new major release
57 Write release notes. git shortlog helps a lot, for example:
59     git shortlog --no-merges v(current version, e.g. 0.7.2)..v(new version, e.g. 0.8.0)
61 (or ping @wumpus on IRC, he has specific tooling to generate the list of merged pulls
62 and sort them into categories based on labels)
64 Generate list of authors:
66     git log --format='%aN' "$*" | sort -ui | sed -e 's/^/- /'
68 Tag version (or release candidate) in git
70     git tag -s v(new version, e.g. 0.8.0)
72 ### Setup and perform Gitian builds
74 If you're using the automated script (found in [contrib/gitian-build.sh](/contrib/gitian-build.sh)), then at this point you should run it with the "--build" command. Otherwise ignore this.
76 Setup Gitian descriptors:
78     pushd ./bitcoin
79     export SIGNER=(your Gitian key, ie bluematt, sipa, etc)
80     export VERSION=(new version, e.g. 0.8.0)
81     git fetch
82     git checkout v${VERSION}
83     popd
85 Ensure your gitian.sigs are up-to-date if you wish to gverify your builds against other Gitian signatures.
87     pushd ./gitian.sigs
88     git pull
89     popd
91 Ensure gitian-builder is up-to-date:
93     pushd ./gitian-builder
94     git pull
95     popd
97 ### Fetch and create inputs: (first time, or when dependency versions change)
99     pushd ./gitian-builder
100     mkdir -p inputs
101     wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
102     wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
103     popd
105 Create the OS X SDK tarball, see the [OS X readme](README_osx.md) for details, and copy it into the inputs directory.
107 ### Optional: Seed the Gitian sources cache and offline git repositories
109 By default, Gitian will fetch source files as needed. To cache them ahead of time:
111     pushd ./gitian-builder
112     make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
113     popd
115 Only missing files will be fetched, so this is safe to re-run for each build.
117 NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from local URLs. For example:
119     pushd ./gitian-builder
120     ./bin/gbuild --url bitcoin=/path/to/bitcoin,signature=/path/to/sigs {rest of arguments}
121     popd
123 The gbuild invocations below <b>DO NOT DO THIS</b> by default.
125 ### Build and sign Bitcoin Core for Linux, Windows, and OS X:
127     pushd ./gitian-builder
128     ./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
129     ./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
130     mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../
132     ./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
133     ./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
134     mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
135     mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
137     ./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
138     ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
139     mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
140     mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
141     popd
143 Build output expected:
145   1. source tarball (`bitcoin-${VERSION}.tar.gz`)
146   2. linux 32-bit and 64-bit dist tarballs (`bitcoin-${VERSION}-linux[32|64].tar.gz`)
147   3. windows 32-bit and 64-bit unsigned installers and dist zips (`bitcoin-${VERSION}-win[32|64]-setup-unsigned.exe`, `bitcoin-${VERSION}-win[32|64].zip`)
148   4. OS X unsigned installer and dist tarball (`bitcoin-${VERSION}-osx-unsigned.dmg`, `bitcoin-${VERSION}-osx64.tar.gz`)
149   5. Gitian signatures (in `gitian.sigs/${VERSION}-<linux|{win,osx}-unsigned>/(your Gitian key)/`)
151 ### Verify other gitian builders signatures to your own. (Optional)
153 Add other gitian builders keys to your gpg keyring, and/or refresh keys.
155     gpg --import bitcoin/contrib/gitian-keys/*.pgp
156     gpg --refresh-keys
158 Verify the signatures
160     pushd ./gitian-builder
161     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
162     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
163     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
164     popd
166 ### Next steps:
168 Commit your signature to gitian.sigs:
170     pushd gitian.sigs
171     git add ${VERSION}-linux/${SIGNER}
172     git add ${VERSION}-win-unsigned/${SIGNER}
173     git add ${VERSION}-osx-unsigned/${SIGNER}
174     git commit -a
175     git push  # Assuming you can push to the gitian.sigs tree
176     popd
178 Codesigner only: Create Windows/OS X detached signatures:
179 - Only one person handles codesigning. Everyone else should skip to the next step.
180 - Only once the Windows/OS X builds each have 3 matching signatures may they be signed with their respective release keys.
182 Codesigner only: Sign the osx binary:
184     transfer bitcoin-osx-unsigned.tar.gz to osx for signing
185     tar xf bitcoin-osx-unsigned.tar.gz
186     ./detached-sig-create.sh -s "Key ID"
187     Enter the keychain password and authorize the signature
188     Move signature-osx.tar.gz back to the gitian host
190 Codesigner only: Sign the windows binaries:
192     tar xf bitcoin-win-unsigned.tar.gz
193     ./detached-sig-create.sh -key /path/to/codesign.key
194     Enter the passphrase for the key when prompted
195     signature-win.tar.gz will be created
197 Codesigner only: Commit the detached codesign payloads:
199     cd ~/bitcoin-detached-sigs
200     checkout the appropriate branch for this release series
201     rm -rf *
202     tar xf signature-osx.tar.gz
203     tar xf signature-win.tar.gz
204     git add -a
205     git commit -m "point to ${VERSION}"
206     git tag -s v${VERSION} HEAD
207     git push the current branch and new tag
209 Non-codesigners: wait for Windows/OS X detached signatures:
211 - Once the Windows/OS X builds each have 3 matching signatures, they will be signed with their respective release keys.
212 - Detached signatures will then be committed to the [bitcoin-detached-sigs](https://github.com/bitcoin-core/bitcoin-detached-sigs) repository, which can be combined with the unsigned apps to create signed binaries.
214 Create (and optionally verify) the signed OS X binary:
216     pushd ./gitian-builder
217     ./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
218     ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
219     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
220     mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg
221     popd
223 Create (and optionally verify) the signed Windows binaries:
225     pushd ./gitian-builder
226     ./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
227     ./bin/gsign --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
228     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-signed ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
229     mv build/out/bitcoin-*win64-setup.exe ../bitcoin-${VERSION}-win64-setup.exe
230     mv build/out/bitcoin-*win32-setup.exe ../bitcoin-${VERSION}-win32-setup.exe
231     popd
233 Commit your signature for the signed OS X/Windows binaries:
235     pushd gitian.sigs
236     git add ${VERSION}-osx-signed/${SIGNER}
237     git add ${VERSION}-win-signed/${SIGNER}
238     git commit -a
239     git push  # Assuming you can push to the gitian.sigs tree
240     popd
242 ### After 3 or more people have gitian-built and their results match:
244 - Create `SHA256SUMS.asc` for the builds, and GPG-sign it:
246 ```bash
247 sha256sum * > SHA256SUMS
250 The list of files should be:
252 bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz
253 bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz
254 bitcoin-${VERSION}-i686-pc-linux-gnu.tar.gz
255 bitcoin-${VERSION}-x86_64-linux-gnu.tar.gz
256 bitcoin-${VERSION}-osx64.tar.gz
257 bitcoin-${VERSION}-osx.dmg
258 bitcoin-${VERSION}.tar.gz
259 bitcoin-${VERSION}-win32-setup.exe
260 bitcoin-${VERSION}-win32.zip
261 bitcoin-${VERSION}-win64-setup.exe
262 bitcoin-${VERSION}-win64.zip
264 The `*-debug*` files generated by the gitian build contain debug symbols
265 for troubleshooting by developers. It is assumed that anyone that is interested
266 in debugging can run gitian to generate the files for themselves. To avoid
267 end-user confusion about which file to pick, as well as save storage
268 space *do not upload these to the bitcoin.org server, nor put them in the torrent*.
270 - GPG-sign it, delete the unsigned file:
272 gpg --digest-algo sha256 --clearsign SHA256SUMS # outputs SHA256SUMS.asc
273 rm SHA256SUMS
275 (the digest algorithm is forced to sha256 to avoid confusion of the `Hash:` header that GPG adds with the SHA256 used for the files)
276 Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spurious/nonsensical entry.
278 - Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server
279   into `/var/www/bin/bitcoin-core-${VERSION}`
281 - A `.torrent` will appear in the directory after a few minutes. Optionally help seed this torrent. To get the `magnet:` URI use:
282 ```bash
283 transmission-show -m <torrent file>
285 Insert the magnet URI into the announcement sent to mailing lists. This permits
286 people without access to `bitcoin.org` to download the binary distribution.
287 Also put it into the `optional_magnetlink:` slot in the YAML file for
288 bitcoin.org (see below for bitcoin.org update instructions).
290 - Update bitcoin.org version
292   - First, check to see if the Bitcoin.org maintainers have prepared a
293     release: https://github.com/bitcoin-dot-org/bitcoin.org/labels/Releases
295       - If they have, it will have previously failed their Travis CI
296         checks because the final release files weren't uploaded.
297         Trigger a Travis CI rebuild---if it passes, merge.
299   - If they have not prepared a release, follow the Bitcoin.org release
300     instructions: https://github.com/bitcoin-dot-org/bitcoin.org#release-notes
302   - After the pull request is merged, the website will automatically show the newest version within 15 minutes, as well
303     as update the OS download links. Ping @saivann/@harding (saivann/harding on Freenode) in case anything goes wrong
305 - Announce the release:
307   - bitcoin-dev and bitcoin-core-dev mailing list
309   - Bitcoin Core announcements list https://bitcoincore.org/en/list/announcements/join/
311   - bitcoincore.org blog post
313   - Update title of #bitcoin on Freenode IRC
315   - Optionally twitter, reddit /r/Bitcoin, ... but this will usually sort out itself
317   - Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin)
319   - Archive release notes for the new version to `doc/release-notes/` (branch `master` and branch of the release)
321   - Create a [new GitHub release](https://github.com/bitcoin/bitcoin/releases/new) with a link to the archived release notes.
323   - Celebrate