Skip to content

Commit

Permalink
feat(images): add support for bitcoind v0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaljsr committed Jun 24, 2020
1 parent be3a135 commit a538ca0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Supported Network Node Versions:
- LND v0.10.2, v0.10.1, v0.10.0, v0.9.1, v0.9.0, v0.8.2, v0.8.0 & v0.7.1
- c-lightning v0.8.2, v0.8.1 & v0.8.0
- Eclair v0.3.3
- Bitcoin Core v0.19.1, v0.19.0.1 & v0.18.1
- Bitcoin Core v0.20.0, v0.19.1, v0.19.0.1 & v0.18.1

## Dependencies

Expand Down
1 change: 1 addition & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ _Warning: These images are not hardened and shouldn't be used to store real bitc

### Tags

- `0.20.0` ([bitcoind/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/bitcoind/Dockerfile))
- `0.19.1` ([bitcoind/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/bitcoind/Dockerfile))
- `0.19.0.1` ([bitcoind/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/bitcoind/Dockerfile))
- `0.18.1` ([bitcoind/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/bitcoind/Dockerfile))
Expand Down
8 changes: 4 additions & 4 deletions docker/nodes.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 8,
"version": 9,
"images": {
"LND": {
"latest": "0.10.2-beta.rc2",
Expand All @@ -14,7 +14,7 @@
"0.7.1-beta"
],
"compatibility": {
"0.10.2-beta.rc2": "0.19.1",
"0.10.2-beta.rc2": "0.20.0",
"0.10.1-beta": "0.19.1",
"0.10.0-beta": "0.19.1",
"0.9.1-beta": "0.19.1",
Expand All @@ -33,8 +33,8 @@
"versions": []
},
"bitcoind": {
"latest": "0.19.1",
"versions": ["0.19.1", "0.19.0.1", "0.18.1"]
"latest": "0.20.0",
"versions": ["0.20.0", "0.19.1", "0.19.0.1", "0.18.1"]
},
"btcd": {
"latest": "",
Expand Down
9 changes: 5 additions & 4 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export const dockerConfigs: Record<NodeImplementation, DockerConfig> = {
'-rpcport=18443',
'-listen=1',
'-listenonion=0',
'-fallbackfee=0.0002',
].join('\n '),
// if vars are modified, also update composeFile.ts & the i18n strings for cmps.nodes.CommandVariables
variables: ['rpcUser', 'rpcAuth'],
Expand Down Expand Up @@ -211,7 +212,7 @@ export const REPO_STATE_URL =
* are pushed to Docker Hub, this list should be updated along with the /docker/nodes.json file.
*/
export const defaultRepoState: DockerRepoState = {
version: 8,
version: 9,
images: {
LND: {
latest: '0.10.2-beta.rc2',
Expand All @@ -228,7 +229,7 @@ export const defaultRepoState: DockerRepoState = {
// not all LND versions are compatible with all bitcoind versions.
// this mapping specifies the highest compatible bitcoind for each LND version
compatibility: {
'0.10.2-beta.rc2': '0.19.1',
'0.10.2-beta.rc2': '0.20.0',
'0.10.1-beta': '0.19.1',
'0.10.0-beta': '0.19.1',
'0.9.1-beta': '0.19.1',
Expand All @@ -247,8 +248,8 @@ export const defaultRepoState: DockerRepoState = {
versions: ['0.3.3'],
},
bitcoind: {
latest: '0.19.1',
versions: ['0.19.1', '0.19.0.1', '0.18.1'],
latest: '0.20.0',
versions: ['0.20.0', '0.19.1', '0.19.0.1', '0.18.1'],
},
btcd: {
latest: '',
Expand Down
8 changes: 6 additions & 2 deletions src/utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,13 @@ export const createNetwork = (config: {
});
});

// add managed bitcoin noes
// add managed bitcoin nodes
range(bitcoindNodes).forEach(() => {
const version = repoState.images.bitcoind.latest;
let version = repoState.images.bitcoind.latest;
if (lndNodes > 0) {
const compat = repoState.images.LND.compatibility as Record<string, string>;
version = compat[repoState.images.LND.latest];
}
const cmd = getImageCommand(managedImages, 'bitcoind', version);
bitcoin.push(createBitcoindNetworkNode(network, version, dockerWrap(cmd), status));
});
Expand Down

0 comments on commit a538ca0

Please sign in to comment.