-
Notifications
You must be signed in to change notification settings - Fork 3.3k
implement release channels #9847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
da14ab3
to
8eff7e1
Compare
633b270
to
5260b32
Compare
}, sort_keys=True, separators=(',', ':')))" "$ANDROID_VERSIONCODE_NULLARCH" "$VERSION_ALPHA" "$VERSION_BETA") | ||
|
||
# signing the hash of extradata instead of passing extradata directly, | ||
# so it doesn't get parsed as dict when passing it into signmessage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started looking into this but it is turning into quite a rabbit hole...
The root cause is here:
Lines 247 to 249 in 9b24316
# decode json arguments | |
if cmdname not in ('setconfig',): | |
args = list(map(json_decode, args)) |
I would say it's a bug that e.g. $ ./run_electrum -v --testnet -w ~/.electrum/testnet/wallets/9dk -o signmessage tb1qq2tmmcngng78nllq2pvrkchcdukemtj5s6l0zu "5"
does not work, due to the message getting json-decoded to an int.
Anyway, I am still looking into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe these 3 lines can be deleted? if something needs to be converted to json, it will be done in parser.parse_args. Example: The following command works after deleting these 3 lines
@@ -256,9 +256,6 @@ async def run_offline_command(config: 'SimpleConfig', config_options: dict, wall
print_msg("Warning: running command offline")
# arguments passed to function
args = [config.get(x) for x in cmd.params]
- # decode json arguments
- if cmdname not in ('setconfig',):
- args = list(map(json_decode, args))
# options
kwargs = {}
for x in cmd.options:
/run_electrum --testnet -o serialize '{
"inputs": [
{"prevout_hash": "9d221a69ca3997cbeaf5624d723e7dc5f829b1023078c177d37bdae95f37c539", "prevout_n": 1,
"value_sats": 1000000, "privkey": "p2wpkh:cVDXzzQg6RoCTfiKpe8MBvmm5d5cJc6JLuFApsFDKwWa6F5TVHpD"}
],
"outputs": [
{"address": "tb1q4s8z6g5jqzllkgt8a4har94wl8tg0k9m8kv5zd", "value_sats": 990000}
]
}'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I forgot that this will not work with curl/jsonrpc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's not so simple. (1) jsonrpc vs (2) online CLI vs (3) offline CLI all work very subtly different. We need explicit unit tests, as otherwise the whole thing is extremely fragile.
I have some WIP changes from when I last commented above:
SomberNight@ef57336
implements release channels so the user can select either a stable or beta release channel in the SettingsDialog for update notifications. adapts the release_www.sh and make_download scripts to handle alpha and beta versions which are detected by an 'a' or 'b' in the version name. the version fields are added into the extradata field of the version file as 'version_alpha' and 'version_beta' and the extradata field is now being signed. The update checker is supposed to return the newest version of those contained in the version file which is allowed according to the user configured option.
Implements release channels so the user can select either a stable or beta release channel in the SettingsDialog for update notifications.
Adapts the
release_www.sh
andmake_download
scripts to handle alpha and beta versions which are detected by an 'a' or 'b' in the version name.The version fields are added into the
extradata
field of the version file asversion_alpha
andversion_beta
and theextradata
field is being signed too in theextradata_hash_signature
field.The update checker is supposed to return the newest version of those contained in the version file which is
allowed according to the user configured option.