-
Notifications
You must be signed in to change notification settings - Fork 492
Old channel can't sign instantly after being imported with sync_apply to a new SDK (needs to reconnect once for pubkey_id in channel certificate to fix itself) #3622
Copy link
Copy link
Labels
priority: blockerIssue is blocking release, do ASAPIssue is blocking release, do ASAP
Description
Getting wallet that has certificates for channels from old SDK(<=0.107.2) using sync_apply, and importing it to newer SDK(0.109.0) using sync_apply, will leave a "wrong" version of pubkey_id in the certificate in the wallet. And new SDK can't find the channel certificate, until it gets updated to the pubkey_id matching the new format of public_key. (Probably)
This seems to be consistent for repro:
- Start lbrynet (worked on current master, and with this https://github.com/lbryio/lbry-desktop/releases/tag/v0.53.5-t109)
- Run something like script below (just adds a single channel holding account to wallet, channel's name is channel8, made on old SDK)
- Run
lbrynet channel sign --channel_id 82e11fe952205210afe398e970f2068a6f4ddc42 --hexdata aa - See
"Couldn't find private key for id '82e11fe952205210afe398e970f2068a6f4ddc42'." - The
channel_signwill work after restart orwallet_reconnect. (Also seemed to fix itself over time, but not sure why/when exactly, or maybe it was just auto reconnect)
(Can also see that the channel certificate in wallet has different pubkey_id before the reconnect)
To run above again:
- Stop lbrynet
- Remove the channel8's holding account from wallet file
Script:
import requests
import json
server = "http://localhost:5279/"
sync_data = '{"data": "czo4MTkyOjE2OjE6M5jvGSSZt/i6RbwxVTQ8WxXcwRHovk/VVMrIZ+3MEXqtFoSqMqpPKUkgmNmgInEN3BQYtN9lZubKTcP2yuXTOHspO9Hnp0HrlfILE8IGv0VEiJBsKVef6raqihWZ1TzXAohzqjY43972rLyK7BXZoMmRdLt4IMtV66k3ZIKZqZcDLrKihXk7U7q72qjHZg2plDju+Ng0uN4eVelNN1lJnhBRrVg9u/WxnCx5d0rCwslutS4qKhG7Wz7xxVgwyoRNWHXgyV2v9pgI7nxzTSqaz8XVm/hk2Emc5WP08TwxQAfIqqfFeR08QU+kqqjZ/OqsiADObISmMFOT7enfgEbRUSGvbXQ/4c+GTyzMU4v8MrVLUQPzj2zQe7H2jiLtZ8T+Y6ukXwCpuAUWpD6imRkARG21XXajYrX8gYU6F4YmMfa2qka0tNFsVdGXkatLVUBJC0KCPW95RtTaFJ60yo5nVUZfl1bpRGFDS/Pjdwbtl+4A3uddxRMD8Ggf81vEzMS5wkOHDpC1iFBu0KnLd5MziBRO3JQR+Ez4ez9JoNwbUp4BamNxoR8UYG+GdyTWl0ojsGYbqkwH0Mz2J6Ux8JUJvwPlzAjTpX0QrJ2ifwagjQAGMRRTmCqm+bzY+e5nbpBstNdLOh5tX/cSKpvMuXP2QwvRmW6npqJNiQtObbKW2Q6wVH9TlfrPeC3BVQ9+kxFd"}'
call_json = {
"method": "sync_apply",
"params": {
"password": "",
"data": sync_data
}
}
response = requests.post(server, json=call_json).json()
print(json.dumps(response, indent=4))
Other details:
Using channel_import works without reconnect (old -> new)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: blockerIssue is blocking release, do ASAPIssue is blocking release, do ASAP