You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Now schedule the upgrade on all the required validators using the output from line 7 (the `ConfigUpgradeSetKey`) and an agreed upon time in the future
6. Update https://github.com/stellar-expert/staged-soroban-upgrades so https://stellar.expert/explorer/pubnet/protocol-history will show the proposed upgrade.
49
50
51
+
### Helper script
52
+
A script to help with crafting the transactions above is available [here](../../scripts/settings-helper.sh) with usage details in [README.md](../../scripts/README.md), but it's important to be aware of how the underlying process works in case the script has some issues.
53
+
54
+
### Debugging
55
+
If any of the transactions above fail during transaction submission, you should get a `TransactionResult` as a response with the reason.
56
+
57
+
Once the three transactions are run, you should see the proposed upgrade when running the `dumpproposedsettings` command [(step 4)](#propose-a-settings-upgrade). If you don't, then either one or more of the transactions above failed during application, or the upgrade is invalid.
58
+
59
+
If any of the transactions above fail during transaction application, the failure will most likely be due to one of the following, and you should confirm this by looking at the `TransactionResult` of the failed transaction using the Stellar Laboratory or an explorer -
60
+
1. Resources are too low. You'll need to increase the hardcoded resources in [SettingsUpgradeUtils.cpp](../../src/main/SettingsUpgradeUtils.cpp).
61
+
2. Fee or refundable fee is too low. You'll need to increase them in [SettingsUpgradeUtils.cpp](../../src/main/SettingsUpgradeUtils.cpp).
62
+
3. Wasm has expired. You'll need to restore the Wasm.
63
+
64
+
If the transactions succeeded but the `dumpproposedsettings` command still returns an error, then the upgrade is invalid. The error reporting here needs to be improved, but the validity checks happen [here](../../src/herder/Upgrades.cpp).
Copy file name to clipboardexpand all lines: scripts/README.md
+10
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ This folder is for storing any scripts that may be helpful for using stellar-cor
4
4
## List of scripts
5
5
-[Overlay survey](#overlay-survey)
6
6
-[Diff Tracy CSV](#diff-tracy-csv)
7
+
-[Parse Backtrace Dump](#parse-backtrace-dump)
7
8
8
9
### Overlay survey
9
10
- Name - `OverlaySurvey.py`
@@ -54,5 +55,14 @@ This folder is for storing any scripts that may be helpful for using stellar-cor
54
55
./src/stellar-core(+0x34f0c1) [0x55c7cd1000c1]"
55
56
```
56
57
58
+
### Soroban Settings Helper
59
+
- Name - `settings-helper.sh`
60
+
- Prequisites - `stellar-xdr` and `stellar-core`
61
+
- Description - This is a script to help with the [Soroban Settings Upgrade](../docs/software/soroban-settings.md). It's important to be aware of how the underlying process works
62
+
in case the script has some issues, so please read through that doc before attempting to use this script. This script should be run from the directory that contains your stellar-core binary. This script also queries the SDF Horizon for the sequence number of the account, so if the SDF Horizon instance is unavailable, then you'll need to provide the account's sequence number manually.
63
+
- Usage - Ex. `sh ../scripts/settings-helper.sh SCSQHJIUGUGTH2P4K6AOFTEW4HUMI2BRTUBBDDXMQ4FLHXCX25W3PGBJ 'Test SDF Network ; September 2015' ../soroban-settings/testnet_settings_phase2.json`. The first argument is the secret key of the source account that will be used for the transactions to set up the upgrade, the second argument is the the network passphrase, and the third is
64
+
the path to the JSON file with the proposed settings.
65
+
66
+
57
67
## Style guide
58
68
We follow [PEP-0008](https://www.python.org/dev/peps/pep-0008/).
TESTNET_PASSPHRASE="Test SDF Network ; September 2015"
13
+
14
+
HORIZON=""
15
+
16
+
#choose which horizon to hit for the SEQ_NUM. If Horizon is down, remove this code and manually set SEQ_NUM below
17
+
if [ "$2"=="$PUBNET_PASSPHRASE" ]
18
+
then
19
+
HORIZON=$PUBNET_HORIZON
20
+
elif [ "$2"=="$TESTNET_PASSPHRASE" ]
21
+
then
22
+
HORIZON=$TESTNET_HORIZON
23
+
else
24
+
echo"invalid passphrase"
25
+
fi
26
+
27
+
# get seq num
28
+
SEQ_NUM="$(curl -s "$HORIZON/$PUBLIC_KEY"| grep "\"sequence\":"| sed 's/[^0-9]//g')"
29
+
re='^[0-9]+$'
30
+
if! [[ $SEQ_NUM=~$re ]] ;then
31
+
echo"Error: SEQ_NUM not retrieved. Your account might not be funded, or Horizon might be down. Hardcode the SEQ_NUM below and remove the horizon code.">&2;exit 1
0 commit comments