Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit d35bfbf

Browse files
committed
Merge branch 'release/2.0.0-master-pr-resolve-conflicts' into master-release-merge
* release/2.0.0-master-pr-resolve-conflicts: (1333 commits) [DEVOPS-1112] Bump staging applicationVersion 17 → 18 Add entry for CBR-495 & CBR-496 to 2.0.0 CHANGELOG [CBR-495] Make UndisputableLookupFailed lenient, since we may end up with no Txs-Accounts relations in SQlite Add missing entries for RCD-44 to RCD-47 [CBR-496] Fix --rebuild-db not rebuilding sqlite [DEVOPS-1112] Add more ChangeLog entries Clean up transaction metadata after deleting an account or wallet bump last known block version for staging [DEVOPS-1112] configuration.yaml: staging applicationVersion 16 -> 17 Revert "applicationVersion | staging: 17 <- 16" Revert "configuration | staging: factor a little" [DEVOPS-1172] Regenerate pkgs/default.nix and stylish haskell [DEVOPS-1172] faucet: Use OptimizeForHighThroughput grouping policy RCD-43: Clear failure on win update applicationVersion | testnet: 4 <- 3 applicationVersion | staging: 17 <- 16 configuration | staging: factor a little cleanup tmp on every buildkite windows build [RCD-52] launcher: -Wno-type-defaults locally [RCD-52] launcher | windows: fix CPP ...
2 parents 0d4617b + 6a13344 commit d35bfbf

File tree

2,001 files changed

+144471
-69089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,001 files changed

+144471
-69089
lines changed

.buildkite/hooks/pre-command

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set -x
2+
3+
NIX_PATH="nixpkgs=$(nix-build ./nix/fetch-nixpkgs.nix -o nixpkgs)"
4+
export NIX_PATH

.buildkite/nightly.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
steps:
2+
- label: 'Acceptance Tests - mainnet - full'
3+
command:
4+
- nix-build -A acceptanceTests.mainnet.full -o acceptance-tests-mainnet-full.sh
5+
- echo "+++ Syncing mainnet blockchain"
6+
- ./acceptance-tests-mainnet-full.sh
7+
timeout_in_minutes: 120
8+
9+
- label: 'Acceptance Tests - testnet - full'
10+
command:
11+
- nix-build -A acceptanceTests.testnet.full -o acceptance-tests-testnet-full.sh
12+
- echo "+++ Syncing testnet blockchain"
13+
- ./acceptance-tests-testnet-full.sh
14+
timeout_in_minutes: 60

.buildkite/pipeline.yml

+7-17
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
steps:
2-
- label: 'hlint'
3-
command: 'scripts/ci/nix-shell.sh -p hlint moreutils --run scripts/haskell/lint.sh'
4-
agents:
5-
system: x86_64-linux
6-
72
- label: 'Windows'
83
command: 'PowerShell.exe -executionpolicy remotesigned -File .\.buildkite\windows.ps1'
94
agents:
105
system: x86_64-win2016
116

127
- label: 'stack2nix'
13-
command: 'scripts/ci/nix-shell.sh -p cabal2nix stack cabal-install ghc moreutils expect -Q -j 4 --run scripts/check-stack2nix.sh'
8+
command: 'nix-shell -Q -j 4 --run scripts/check-stack2nix.sh'
149
agents:
1510
system: x86_64-linux
1611

17-
- label: 'cardano-x86_64-linux'
18-
command: 'scripts/ci/nix-shell.sh --run scripts/ci/ci.sh'
12+
- label: 'release.nix'
13+
command: 'nix-shell --run scripts/ci/check-hydra.sh'
1914
agents:
2015
system: x86_64-linux
2116

22-
- label: 'cardano-x86_64-darwin'
23-
command: 'scripts/ci/nix-shell.sh --run scripts/ci/ci.sh'
24-
agents:
25-
system: x86_64-darwin
26-
27-
- label: 'release.nix'
28-
command: 'scripts/ci/nix-shell.sh --run scripts/ci/check-hydra.sh'
17+
- label: 'explorer frontend: checking generated dependencies'
18+
command: "cd explorer/frontend && ./nix/generate-frontend-deps.hs --test"
2919
agents:
3020
system: x86_64-linux
3121

32-
- label: 'explorer frontend: checking generated dependencies'
33-
command: 'scripts/ci/nix-shell.sh --run "cd explorer/frontend && ./nix/generate-frontend-deps.hs --test"'
22+
- label: 'triggerShutdown test'
23+
command: "rm -rf test-state ; nix-shell node-ipc/shell.nix --run 'node node-ipc/server.js'"
3424
agents:
3525
system: x86_64-linux

.buildkite/windows.ps1

+98-35
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,141 @@
1-
Set-PSDebug -Trace 1
1+
############################################################################
2+
# Windows build script for Buildkite
3+
#
4+
# Requires the devops buildkite-windows AMI
5+
############################################################################
6+
7+
#Set-PSDebug -Trace 1
8+
9+
Write-Output "--- Prepare work directory"
210

311
# Avoid long paths on Windows
4-
$env:STACK_ROOT="D:\s"
12+
$env:STACK_ROOT="Z:\s"
513
$env:STACK_WORK=".w"
6-
$env:WORK_DIR="D:\w"
14+
$env:WORK_DIR="Z:\w"
715
# Override the temp directory to avoid sed escaping issues
816
# See https://github.com/haskell/cabal/issues/5386
9-
$env:TMP="D:\\tmp"
17+
$env:TMP="Z:\\tmp"
1018

1119
# Store the original checkout directory
1220
$env:CHECKOUT_PATH=(Get-Item -Path ".\").FullName
1321

1422
# Temp directory needs to exist
23+
rd -r -fo $env:TMP
1524
New-Item -ItemType Directory -Force -Path $env:TMP
1625

17-
# Setup stuff (commented out)
18-
#mkdir d:\ghc
19-
#
20-
#Invoke-WebRequest "https://s3.eu-central-1.amazonaws.com/ci-static/ghc-8.2.2-x86_64-unknown-mingw32.tar.xz" -OutFile "D:\ghc\ghc.tar.xz" -UserAgent "Curl"
21-
#
22-
#7z x D:\ghc\ghc.tar.xz -oD:\ghc
26+
New-Item -ItemType Directory -Force -Path z:\ghc
27+
28+
New-Item -ItemType Directory -Force -Path z:\Downloads
29+
New-Item -ItemType Directory -Force -Path $env:STACK_ROOT
30+
31+
$StackConfig = @"
32+
templates:
33+
params: null
34+
system-ghc: true
35+
local-programs-path: "z:\\s\\programs"
36+
local-bin-path: "z:\\s\\bin"
37+
"@
38+
39+
$StackConfig | Out-File -FilePath $env:STACK_ROOT\config.yaml -Encoding ASCII
40+
2341
#
24-
#7z x D:\ghc\ghc.tar -oD:\ghc
42+
if (!([System.IO.File]::Exists("Z:\ghc\ghc-8.2.2.tar.xz"))) {
43+
echo "Downloading and extracting GHC"
44+
curl.exe https://s3.eu-central-1.amazonaws.com/ci-static/ghc-8.2.2-x86_64-unknown-mingw32.tar.xz -o Z:\ghc\ghc-8.2.2.tar.xz -L
45+
7z x Z:\ghc\ghc-8.2.2.tar.xz -oZ:\ghc
46+
7z x Z:\ghc\ghc-8.2.2.tar -oZ:\ghc
47+
}
2548

2649
# OpenSSL
2750
#
2851
#$env:USERPROFILE
29-
#(New-Object Net.WebClient).DownloadFile('https://slproweb.com/download/Win64OpenSSL-1_0_2p.exe', "D:\Downloads\Win64OpenSSL.exe")
30-
#cmd /c start /wait "D:\Downloads\Win64OpenSSL.exe" /silent /verysilent /sp- /suppressmsgboxes /DIR=D:\OpenSSL-Win64-v102
52+
if (!([System.IO.File]::Exists("Z:\Downloads\Win64OpenSSL-1_0_2q.exe"))) {
53+
echo "Downloading and installing OpenSSL"
54+
rd -r -fo z:\OpenSSL-Win64-v102
55+
curl.exe https://s3.eu-central-1.amazonaws.com/ci-static/Win64OpenSSL-1_0_2q.exe -o Z:\Downloads\Win64OpenSSL-1_0_2q.exe -L
56+
cmd /c start /wait "Z:\Downloads\Win64OpenSSL-1_0_2q.exe" /silent /verysilent /sp- /suppressmsgboxes /DIR=Z:\OpenSSL-Win64-v102
57+
}
3158
## Install stack
32-
#Start-FileDownload http://www.stackage.org/stack/windows-x86_64 -FileName D:\Downloads\stack.zip
33-
#curl.exe http://www.stackage.org/stack/windows-x86_64 -o d:\Downloads\stack.zip -L
34-
#7z -oD:\stack x D:\Downloads\stack.zip
59+
if (!([System.IO.File]::Exists("Z:\Downloads\stack-1.9.1-windows-x86_64.zip"))) {
60+
echo "Downloading and extracting stack"
61+
rd -r -fo z:\stack
62+
curl.exe https://s3.eu-central-1.amazonaws.com/ci-static/stack-1.9.1-windows-x86_64.zip -o z:\Downloads\stack-1.9.1-windows-x86_64.zip -L
63+
7z -oZ:\stack x Z:\Downloads\stack-1.9.1-windows-x86_64.zip
64+
}
3565

36-
$env:PATH="$env:PATH;D:\ghc\ghc-8.2.2\bin;D:\stack;$Env:Programfiles\7-Zip;D:\w"
66+
$env:PATH="$env:PATH;Z:\ghc\ghc-8.2.2\bin;Z:\stack;Z:\w"
3767

3868
# Install liblzma/xz
39-
#curl -L https://tukaani.org/xz/xz-5.2.3-windows.zip -o xz-5.2.3-windows.zip
40-
#7z -oD:\xz_extracted x xz-5.2.3-windows.zip
41-
69+
if (!([System.IO.File]::Exists("Z:\Downloads\xz-5.2.3-windows.zip"))) {
70+
echo "Downloading and extracting xz"
71+
rd -r -fo z:\xz_extracted
72+
curl.exe -L https://s3.eu-central-1.amazonaws.com/ci-static/xz-5.2.3-windows.zip -o Z:\Downloads\xz-5.2.3-windows.zip
73+
7z -oZ:\xz_extracted x Z:\Downloads\xz-5.2.3-windows.zip
74+
}
75+
76+
# Clear out work directory, copy source tree there, then cd into it.
4277
rd -r -fo $env:WORK_DIR
4378
mkdir $env:WORK_DIR
4479
copy-item $env:CHECKOUT_PATH\* $env:WORK_DIR -force -recurse
4580
cd $env:WORK_DIR
4681

82+
# Install pre-built patched version of rocksdb. The git repo provides
83+
# headers and the zip provides rocksdb.dll. This is needed to build
84+
# rocksdb-haskell.
4785
git.exe clone https://github.com/facebook/rocksdb.git --branch v4.13.5
48-
# curl.exe -L 'https://s3.eu-central-1.amazonaws.com/ci-static/serokell-rocksdb-haskell-325427fc709183c8fdf777ad5ea09f8d92bf8585.zip' -o D:\Downloads\rocksdb.zip
49-
7z x D:\Downloads\rocksdb.zip
86+
if (!([System.IO.File]::Exists("Z:\Downloads\rocksdb-325427fc709183c8fdf777ad5ea09f8d92bf8585.zip"))) {
87+
echo "Downloading rocksdb"
88+
curl.exe -L 'https://s3.eu-central-1.amazonaws.com/ci-static/serokell-rocksdb-haskell-325427fc709183c8fdf777ad5ea09f8d92bf8585.zip' -o Z:\Downloads\rocksdb-325427fc709183c8fdf777ad5ea09f8d92bf8585.zip
89+
}
90+
7z x Z:\Downloads\rocksdb-325427fc709183c8fdf777ad5ea09f8d92bf8585.zip
5091

5192
# CSL-1509: After moving the 'cardano-sl' project itself into a separate folder ('lib/'), the 'cardano-text.exe' executable fails on AppVeyor CI.
5293
# After some investigation, it was discovered that this was because 'rocksdb.dll' has to be located in this folder as well, or else the test executable doesn't work.
5394
copy rocksdb.dll node
5495
copy rocksdb.dll lib
5596
copy rocksdb.dll wallet-new
5697

57-
# Start doing stuff
98+
# Terminate on all errors
99+
$ErrorActionPreference = "Stop"
100+
101+
############################################################################
102+
# Prepare stack and build tools
103+
#
104+
105+
Write-Output "--- Stack setup and install tools"
58106

107+
# Make stack use a pached system-ghc. This will allow us to work around the command
108+
# line argument limit on windows by having GHC copy all libraries into a common folder
109+
# prior to linking; and thus reduces the number library search patch flags passed on the
110+
# command line.
111+
#
112+
# WARNING: if you bump the LTS, make sure you have the right (patched) GHC version in path!
59113
stack.exe config --system-ghc set system-ghc --global true
60-
# stack.exe config --system-ghc set programs c:\s\programs --global true
114+
61115
stack.exe path
62116
stack.exe exec -- ghc-pkg recache
63117
stack.exe --verbosity warn setup --no-reinstall
118+
64119
# Install happy separately: https://github.com/commercialhaskell/stack/issues/3151#issuecomment-310642487. Also install cpphs because it's a build-tool and Stack can't figure out by itself that it should be installed
65-
stack.exe --verbosity warn install happy cpphs -j 2 --no-terminal --local-bin-path $env:SYSTEMROOT\system32 --extra-include-dirs="D:\OpenSSL-Win64-v102\include" --extra-lib-dirs="D:\OpenSSL-Win64-v102" --extra-include-dirs="D:\xz_extracted\include" --extra-lib-dirs="D:\xz_extracted\bin_x86-64" --extra-include-dirs="$env:WORK_DIR\rocksdb\include" --extra-lib-dirs="$env:WORK_DIR"
66-
# TODO: CSL-1133. To be reenabled.
67-
# stack.exe test --coverage
68-
# stack.exe hpc report cardano-sl cardano-sl-txp cardano-sl-core cardano-sl-db cardano-sl-update cardano-sl-infra cardano-sl-lrc cardano-sl-ssc
120+
stack.exe --verbosity warn install happy cpphs -j 2 --no-terminal --local-bin-path $env:SYSTEMROOT\system32 --extra-include-dirs="Z:\OpenSSL-Win64-v102\include" --extra-lib-dirs="Z:\OpenSSL-Win64-v102" --extra-include-dirs="Z:\xz_extracted\include" --extra-lib-dirs="Z:\xz_extracted\bin_x86-64" --extra-include-dirs="$env:WORK_DIR\rocksdb\include" --extra-lib-dirs="$env:WORK_DIR"
121+
122+
############################################################################
123+
# Build and test.
124+
#
125+
# We intentionally don't build auxx here, because this build is for installer.
126+
#
69127

70-
#We intentionally don't build auxx here, because this build is for installer.
71-
stack.exe --dump-logs install cardano-sl cardano-sl-tools cardano-sl-wallet-new -j 3 --no-terminal --local-bin-path $env:WORK_DIR --no-haddock-deps --flag cardano-sl-core:-asserts --flag cardano-sl-tools:for-installer --extra-include-dirs="D:\OpenSSL-Win64-v102\include" --extra-lib-dirs="D:\OpenSSL-Win64-v102" --extra-include-dirs="D:\xz_extracted\include" --extra-lib-dirs="D:\xz_extracted\bin_x86-64" --extra-include-dirs="$env:WORK_DIR\rocksdb\include" --extra-lib-dirs="$env:WORK_DIR"
128+
Write-Output "+++ Stack build and test"
72129

73-
# from here onwards, errors terminate the script
74-
$ErrorActionPreference = "Stop"
130+
stack.exe --dump-logs install cardano-sl cardano-sl-tools cardano-sl-wallet-new -j 3 --no-terminal --local-bin-path $env:WORK_DIR --no-haddock-deps --flag cardano-sl-core:-asserts --flag cardano-sl-tools:for-installer --extra-include-dirs="Z:\OpenSSL-Win64-v102\include" --extra-lib-dirs="Z:\OpenSSL-Win64-v102" --extra-include-dirs="Z:\xz_extracted\include" --extra-lib-dirs="Z:\xz_extracted\bin_x86-64" --extra-include-dirs="$env:WORK_DIR\rocksdb\include" --extra-lib-dirs="$env:WORK_DIR"
131+
132+
############################################################################
133+
# Assemble artifact zip file for use by the Daedalus installers build
134+
#
135+
136+
Write-Output "--- Create zip file"
75137

76-
#Cardano pieces, modulo the frontend
138+
# Cardano pieces, modulo the frontend
77139
mkdir daedalus
78140
## log config is called `log-config-prod.yaml` just in case, it's the old name
79141
copy log-configs\daedalus.yaml daedalus\log-config-prod.yaml
@@ -83,8 +145,9 @@ copy cardano-launcher.exe daedalus\
83145
copy cardano-node.exe daedalus\
84146
copy cardano-x509-certificates.exe daedalus\
85147
cd daedalus
86-
$env:BUILDKITE_BUILD_NUMBER | Out-File build-id
87-
$env:BUILDKITE_COMMIT | Out-File commit-id
148+
$env:BUILDKITE_BUILD_NUMBER | Out-File -Encoding ASCII build-id
149+
$env:BUILDKITE_COMMIT | Out-File -Encoding ASCII commit-id
150+
$env:BUILDKITE_BUILD_URL | Out-File -Encoding ASCII ci-url
88151
cd ..
89152

90153
$daedaluszip = "$env:BUILDKITE_COMMIT.zip"

.gitignore

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Cabal & Stack
22
.stack-work/
3+
.stack-work-profile/
34
*/dist
5+
dist-newstyle/
6+
.ghc.environment.*
7+
cabal.project.local
48

59
# From daedalus-bridge
610
node_modules/*
711

12+
# tags
13+
*.tags
14+
tags
15+
816
# Config files
917
.ghci
1018

@@ -17,7 +25,8 @@ b
1725
# Various DBs
1826
node-db*
1927
wallet-db/
20-
wallet-new-db/
28+
wallet-db-acid/
29+
wallet-db-sqlite.sqlite3
2130
db-*/
2231
wdb-*/
2332

@@ -64,11 +73,11 @@ scripts/haskell/dependencies.hi
6473
scripts/haskell/dependencies.o
6574
scripts/haskell/dependencies
6675

67-
# 'pkgs/stack2nix' is a symlink into the nix store, it can safely be ignored
68-
pkgs/stack2nix
76+
# Cache for pkgs/generate.sh
77+
/pkgs/.cabal/
78+
/pkgs/.stack/
6979
# in case generate.sh clones nixpkgs in here
7080
nixpkgs
71-
pkgs/result
7281

7382
# explorer
7483
explorer-node.log.*
@@ -207,6 +216,14 @@ venv.bak/
207216
.mypy_cache/
208217

209218
# End of https://www.gitignore.io/api/python
219+
*.aux
220+
/docs/on-the-wire/binary.toc
221+
/docs/on-the-wire/binary.synctex.gz
222+
/docs/on-the-wire/binary.pdf
223+
/docs/on-the-wire/binary.log
224+
/docs/on-the-wire/binary.fls
225+
/docs/on-the-wire/binary.fdb_latexmk
226+
/docs/on-the-wire/binary.dvi
210227

211228
# Don't include config files with sensitive data or tls certs
212229
/faucet/test-config.json

.nonsense

-3
This file was deleted.

.stylish-haskell.yaml

+4-6
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ steps:
6363
# > (concat, foldl, foldr, head, init, last, length)
6464
#
6565
# Default: after_alias
66-
list_align: after_alias
66+
list_align: with_module_name
6767

6868
# Right-pad the module names to align imports in a group:
6969
#
@@ -194,11 +194,7 @@ steps:
194194

195195
# A common setting is the number of columns (parts of) code will be wrapped
196196
# to. Different steps take this into account. Default: 80.
197-
#
198-
# Note: we tend to write code which fits into 80 characters, in some cases
199-
# 100 is acceptable. For imports we always permit 100 characters because it
200-
# decreases verbosity of diffs and makes merging easier.
201-
columns: 100
197+
columns: 80
202198

203199
# By default, line endings are converted according to the OS. You can override
204200
# preferred format here.
@@ -226,6 +222,7 @@ language_extensions:
226222
- DefaultSignatures
227223
- DeriveDataTypeable
228224
- DeriveGeneric
225+
- ExistentialQuantification
229226
- FlexibleContexts
230227
- FlexibleInstances
231228
- FunctionalDependencies
@@ -245,3 +242,4 @@ language_extensions:
245242
- TypeApplications
246243
- TypeFamilies
247244
- ViewPatterns
245+
- ExplicitNamespaces

0 commit comments

Comments
 (0)