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

[TSS] Stale channel account not cleared after switching distribution keys #79

Open
reecexlm opened this issue Oct 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@reecexlm
Copy link
Collaborator

reecexlm commented Oct 26, 2023

This bug can occur when a operator of the SDP switched their distribution seed after creating channel accounts with the old seed. That caused TSS to fail submitting transactions. The error was cannot decrypt private key

chAccPrivateKey := chAcc.PrivateKey
		if !strkey.IsValidEd25519SecretSeed(chAccPrivateKey) {
			chAccPrivateKey, err = ds.encrypter.Decrypt(chAccPrivateKey, ds.encrypterPass)
			if err != nil {
				return nil, fmt.Errorf("cannot decrypt private key: %w", err)
			}
		} 

The problem occurs when switching Distribution accounts a few times resulting in stale channel accounts. Those channel account seeds were not getting decrypted properly when fetched from the database.

THe following attempt to resolve the issue running the following CLI was tried, but that didn’t solve the issue for some reason:

./stellar-disbursement-platform channel-accounts verify --delete-invalid-accounts

🔥 Action Item:

Re-test the scenario described above. Create channel accounts and trigger disbursements with a distribution account, switch distribution accounts then see if we run into this error.

Check that the CLI above solves the problem correctly. If not, we should fix it.

@reecexlm reecexlm added the bug Something isn't working label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant