Skip to content
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

fix: Permission created before making device a control node is not getting active #14537

Merged

Conversation

kounkou
Copy link
Contributor

@kounkou kounkou commented Apr 29, 2024

What does the PR do

This PR mitigates permission stuck in pending state upon making device a control node. It fixes
#14023 by applying events and publishing community events once the device is promoted to control node.
Related to status-im/status-go#5070

Affected areas

  • NA

Screenshot of functionality (including design for comparison)

Performing tests to gather evidence for resolution.

@status-im-auto
Copy link
Member

status-im-auto commented Apr 29, 2024

Jenkins Builds

Click to see older builds (39)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c33a6af #1 2024-04-29 09:00:09 ~6 min tests/nim 📄log
✔️ c33a6af #1 2024-04-29 09:00:52 ~7 min macos/aarch64 🍎dmg
c33a6af #1 2024-04-29 09:04:16 ~10 min tests/ui 📄log
✔️ c33a6af #1 2024-04-29 09:06:56 ~13 min macos/x86_64 🍎dmg
✔️ c33a6af #1 2024-04-29 09:10:48 ~17 min linux/x86_64 📦tgz
✔️ c33a6af #1 2024-04-29 09:23:13 ~29 min windows/x86_64 💿exe
✔️ c33a6af #2 2024-04-29 10:07:50 ~10 min tests/ui 📄log
✔️ 2518053 #2 2024-05-08 22:37:32 ~5 min macos/aarch64 🍎dmg
✔️ 1f312be #3 2024-05-08 22:42:07 ~4 min macos/aarch64 🍎dmg
✔️ 1f312be #3 2024-05-08 22:46:20 ~8 min tests/nim 📄log
✔️ 1f312be #3 2024-05-08 22:48:28 ~10 min macos/x86_64 🍎dmg
✔️ bdb4d3f #4 2024-05-08 22:53:44 ~4 min macos/aarch64 🍎dmg
✔️ bdb4d3f #4 2024-05-08 22:55:44 ~6 min tests/nim 📄log
✔️ bdb4d3f #4 2024-05-08 22:56:26 ~7 min macos/x86_64 🍎dmg
bdb4d3f #5 2024-05-08 23:00:12 ~10 min tests/ui 📄log
✔️ 19dd7c3 #5 2024-05-08 23:08:16 ~4 min macos/aarch64 🍎dmg
✔️ 19dd7c3 #5 2024-05-08 23:09:35 ~5 min tests/nim 📄log
✔️ 19dd7c3 #5 2024-05-08 23:10:55 ~7 min macos/x86_64 🍎dmg
19dd7c3 #6 2024-05-08 23:14:27 ~10 min tests/ui 📄log
✔️ 19dd7c3 #5 2024-05-08 23:20:18 ~16 min linux/x86_64 📦tgz
19dd7c3 #7 2024-05-08 23:34:14 ~10 min tests/ui 📄log
✔️ 19dd7c3 #5 2024-05-08 23:38:10 ~34 min windows/x86_64 💿exe
✔️ 3290c17 #6 2024-05-08 23:46:44 ~4 min macos/aarch64 🍎dmg
✔️ 3290c17 #6 2024-05-08 23:48:06 ~5 min tests/nim 📄log
✔️ 3290c17 #6 2024-05-08 23:49:18 ~7 min macos/x86_64 🍎dmg
3290c17 #8 2024-05-08 23:53:05 ~10 min tests/ui 📄log
✔️ 3290c17 #6 2024-05-08 23:56:58 ~14 min linux/x86_64 📦tgz
✔️ 3290c17 #6 2024-05-09 00:09:17 ~26 min windows/x86_64 💿exe
3290c17 #9 2024-05-09 00:15:53 ~6 min tests/ui 📄log
✔️ ec62008 #7 2024-05-09 05:01:12 ~4 min macos/aarch64 🍎dmg
✔️ ec62008 #7 2024-05-09 05:02:44 ~6 min tests/nim 📄log
✔️ ec62008 #7 2024-05-09 05:04:30 ~7 min macos/x86_64 🍎dmg
ec62008 #10 2024-05-09 05:07:46 ~11 min tests/ui 📄log
✔️ ec62008 #7 2024-05-09 05:10:52 ~14 min linux/x86_64 📦tgz
✔️ ec62008 #7 2024-05-09 05:24:43 ~28 min windows/x86_64 💿exe
✔️ 4883ad0 #8 2024-05-09 07:19:27 ~4 min macos/aarch64 🍎dmg
✔️ 4883ad0 #8 2024-05-09 07:21:13 ~6 min tests/nim 📄log
✔️ 4883ad0 #8 2024-05-09 07:21:51 ~7 min macos/x86_64 🍎dmg
4883ad0 #11 2024-05-09 07:25:14 ~10 min tests/ui 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b5d8a91 #10 2024-05-09 07:38:04 ~7 min macos/aarch64 🍎dmg
✔️ b5d8a91 #10 2024-05-09 07:38:46 ~7 min macos/x86_64 🍎dmg
✔️ b5d8a91 #10 2024-05-09 07:41:07 ~10 min tests/nim 📄log
✔️ b5d8a91 #10 2024-05-09 07:46:10 ~15 min linux/x86_64 📦tgz
✔️ b5d8a91 #13 2024-05-09 07:47:03 ~16 min tests/ui 📄log
✔️ b5d8a91 #10 2024-05-09 07:58:09 ~27 min windows/x86_64 💿exe
✔️ 5797225 #11 2024-05-09 20:48:38 ~5 min macos/aarch64 🍎dmg
✔️ 5797225 #11 2024-05-09 20:50:06 ~6 min tests/nim 📄log
✔️ 5797225 #11 2024-05-09 20:51:32 ~7 min macos/x86_64 🍎dmg
✔️ 5797225 #14 2024-05-09 20:54:33 ~10 min tests/ui 📄log
✔️ 5797225 #11 2024-05-09 20:59:08 ~15 min linux/x86_64 📦tgz

@anastasiyaig
Copy link
Contributor

panic: interface conversion: interface {} is nil, not int64

goroutine 29992 [running]:
github.com/status-im/status-go/services/wallet.(*Reader).startWalletEventsWatcher.func1({{0x10cafb0fc, 0x19}, 0x0, {0x2400711b668, 0x1, 0x1}, {0x0, 0x0}, 0x662a7d1d, 0xa, ...})
	/Users/jenkins/workspace/s_macos_aarch64_package_PR-14537/vendor/status-go/services/wallet/reader.go:225 +0x19c
github.com/status-im/status-go/services/wallet/walletevent.watch({0x10d7e1d58, 0x24004819400}, 0x2400043fdd0?, 0x2402742da60)
	/Users/jenkins/workspace/s_macos_aarch64_package_PR-14537/vendor/status-go/services/wallet/walletevent/watcher.go:61 +0x1a0
github.com/status-im/status-go/services/wallet/walletevent.(*Watcher).Start.func1({0x10d7e1d58?, 0x24004819400?})
	/Users/jenkins/workspace/s_macos_aarch64_package_PR-14537/vendor/status-go/services/wallet/walletevent/watcher.go:34 +0x30
github.com/status-im/status-go/services/wallet/async.(*Group).Add.func1()
	/Users/jenkins/workspace/s_macos_aarch64_package_PR-14537/vendor/status-go/services/wallet/async/async.go:107 +0x34
created by github.com/status-im/status-go/services/wallet/async.(*Group).Add
	/Users/jenkins/workspace/s_macos_aarch64_package_PR-14537/vendor/status-go/services/wallet/async/async.go:106 +0x88
SIGABRT: Abnormal termination.
zsh: abort      ./nim_status_client --datadir=~/data/pr1 --LOG_LEVEL=DEBUG

@kounkou i am seeing this in this PR which is fixed in master certainly. Also there is 1 test failing and thats also because of some go changes being done recently (the chain ID value being sent)

can you please rebase the PR so it has recent commits from go?

@anastasiyaig
Copy link
Contributor

also, i tested the scenario from the bug and it is reproduced as described
permission is not getting active even after restart

Screenshot 2024-04-29 at 17 59 54
Screen.Recording.2024-04-29.at.17.57.53.mov
Screenshot 2024-04-29 at 17 59 45

@kounkou
Copy link
Contributor Author

kounkou commented Apr 29, 2024

Thanks a lot for the testing, I am having another look now.

@kounkou kounkou force-pushed the fix-activate-permissions-upon-making-device-controlnode branch from c33a6af to 2518053 Compare May 8, 2024 22:31
@kounkou kounkou force-pushed the fix-activate-permissions-upon-making-device-controlnode branch 5 times, most recently from 3290c17 to ec62008 Compare May 9, 2024 04:56
@kounkou kounkou changed the title chore: bump status-go fix: Permission created before making device a control node is not getting active May 9, 2024
@kounkou kounkou force-pushed the fix-activate-permissions-upon-making-device-controlnode branch 3 times, most recently from 96e180e to b5d8a91 Compare May 9, 2024 07:30
@kounkou kounkou requested a review from mprakhov May 9, 2024 08:08
@kounkou
Copy link
Contributor Author

kounkou commented May 9, 2024

Hi @anastasiyaig can I get a retest on this ticket please? Currently facing some issue forever minting token...

Screenshot from 2024-05-09 01-15-03


Because minting token is currently broken, I don't want to block
I have performed integration testing and debugged to follow each calls during the PromoteSelfToControlNode and everything works as expected.
I'll just ask for approvals now

Screenshot from 2024-05-09 21-36-52

@anastasiyaig
Copy link
Contributor

sure, @glitchminer or @lukaszso could you assist please?

This PR fixes #14023

UI does NOT allow promoting to control node is no Owner token is present
@kounkou kounkou force-pushed the fix-activate-permissions-upon-making-device-controlnode branch from b5d8a91 to 5797225 Compare May 9, 2024 20:43
@status-im-auto
Copy link
Member

@kounkou kounkou requested a review from mprakhov May 9, 2024 21:46
@kounkou kounkou merged commit ac54a70 into master May 10, 2024
8 checks passed
@kounkou kounkou deleted the fix-activate-permissions-upon-making-device-controlnode branch May 10, 2024 15:57
@mprakhov17
Copy link
Contributor

@kounkou your status-desktop must point to @status-go develop branch

@kounkou
Copy link
Contributor Author

kounkou commented May 10, 2024

Updated, thanks

@anastasiyaig
Copy link
Contributor

@kounkou you requested a test from qa here, was it done or you just merged?

@glitchminer
Copy link
Contributor

@kounkou you requested a test from qa here, was it done or you just merged?

@anastasiyaig , @lukaszso is looking into it

@kounkou
Copy link
Contributor Author

kounkou commented May 12, 2024

@kounkou you requested a test from qa here, was it done or you just merged?

Hi anastasiyaig@
It was done by caybro@ however please note that the original test as stated in the ticket is no longer valid as we have added a requirement that in order to promote self as control node, we need to have minted the owner token beforehand.
Please let me know if any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission created before making device a control node is not getting active
7 participants