Skip to content

Commit de94ac2

Browse files
Add config migration from 1.26.1.1 to 1.28.0.0 and update version pins (#6)
* fixed soroban error on install and updated fulcrum requirements * Fix soroban-announce config default value and bundling issues * Add default value 'disabled' for soroban-announce config to prevent Start9 errors * Add migration for soroban-announce config with proper default * Additional config options to migrate --------- Co-authored-by: linkinparkrulz <[email protected]>
1 parent ad2e895 commit de94ac2

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

config.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ export EXPLORER_INSTALL=on
7272
# Soroban configuration
7373
export SOROBAN_INSTALL=on
7474

75-
SOROBAN_ANNOUNCE_CONFIG=$(yq e '.soroban-announce.enabled' /root/start9/config.yaml)
75+
SOROBAN_ANNOUNCE_CONFIG=$(yq e '.soroban-announce.enabled // "disabled"' /root/start9/config.yaml)
7676
if [ "$SOROBAN_ANNOUNCE_CONFIG" = "enabled" ]; then
7777
export SOROBAN_ANNOUNCE=on
7878
else
7979
export SOROBAN_ANNOUNCE=off
8080
fi
8181

8282
# PandoTx Process is only available when Soroban announce is enabled
83-
S9_PANDOTX_PROCESS=$(yq e '.soroban-announce.pandotx-process' /root/start9/config.yaml)
83+
S9_PANDOTX_PROCESS=$(yq e '.soroban-announce.pandotx-process // false' /root/start9/config.yaml)
8484
if [ "$SOROBAN_ANNOUNCE_CONFIG" = "enabled" ] && [ "$S9_PANDOTX_PROCESS" = "true" ]; then
8585
export NODE_PANDOTX_PROCESS=on
8686
else
@@ -120,4 +120,4 @@ export SOROBAN_ONION_FILE=/var/lib/tor/hsv3soroban/hostname
120120
export NODE_PANDOTX_FALLBACK_MODE=$(yq e '.pandotx-fallback-mode' /root/start9/config.yaml)
121121

122122
# Max number of retries in case of a failed push
123-
export NODE_PANDOTX_NB_RETRIES=$(yq e '.pandotx-retries' /root/start9/config.yaml)
123+
export NODE_PANDOTX_NB_RETRIES=$(yq e '.pandotx-retries' /root/start9/config.yaml)

manifest.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ interfaces:
105105
- http
106106
dependencies:
107107
bitcoind:
108-
version: '>=0.21.1.2 <31.0.0'
108+
version: '>=0.21.1.2'
109109
requirement:
110110
type: 'opt-out'
111111
how: Use the Bitcoin Core (default)
@@ -117,7 +117,7 @@ dependencies:
117117
type: script
118118
requires-runtime-config: true
119119
bitcoind-testnet:
120-
version: '>=0.21.1.2 <31.0.0'
120+
version: '>=0.21.1.2'
121121
requirement:
122122
type: 'opt-in'
123123
how: Use the Bitcoin Core Testnet4
@@ -129,7 +129,7 @@ dependencies:
129129
type: script
130130
requires-runtime-config: true
131131
fulcrum:
132-
version: '>=1.11.0'
132+
version: '>=2.0.0'
133133
requirement:
134134
type: 'opt-in'
135135
how: Set Indexer to Fulcrum in the config

scripts/procedures/migrations.ts

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
1-
import { compat, types as T } from "../deps.ts";
1+
import { compat, types as T } from '../deps.ts'
22

3-
export const migration: T.ExpectedExports.migration = compat.migrations
4-
.fromMapping({}, "1.27.0.0" );
3+
export const migration: T.ExpectedExports.migration = compat.migrations.fromMapping(
4+
{
5+
'1.28.0.0': {
6+
up: compat.migrations.updateConfig(
7+
(config: any) => {
8+
// Add default soroban and pandotx config for users upgrading from versions before 1.28.0
9+
config['soroban-announce'] = {
10+
'enabled': 'disabled'
11+
}
12+
config['pandotx-push'] = true
13+
config['pandotx-retries'] = 2
14+
config['pandotx-fallback-mode'] = 'convenient'
15+
return config
16+
},
17+
true,
18+
{ version: '1.28.0.0', type: 'up' },
19+
),
20+
down: compat.migrations.updateConfig(
21+
(config: any) => {
22+
delete config['soroban-announce']
23+
delete config['pandotx-push']
24+
delete config['pandotx-retries']
25+
delete config['pandotx-fallback-mode']
26+
return config
27+
},
28+
true,
29+
{ version: '1.28.0.0', type: 'down' },
30+
),
31+
},
32+
},
33+
'1.28.0.0',
34+
)

0 commit comments

Comments
 (0)