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 setgov crashes #1719

Merged
merged 2 commits into from
Feb 2, 2023
Merged

Fix setgov crashes #1719

merged 2 commits into from
Feb 2, 2023

Conversation

shohamc1
Copy link
Contributor

What kind of PR is this?:

/kind fix

What this PR does / why we need it:

When a wallet tries to use setgov, unsetgov or setgovheight, the code crashes due to a bad access error instead of throwing an error. This is because auths remains empty since no addresses in the wallet has permission to send these transactions. We add a guard against ExtractDestination and allow the TX to be rejected during execTestTx instead.

@prasannavl
Copy link
Member

prasannavl commented Feb 1, 2023

Great. In addition, possible to address this on ExtractDestination so it's more holistic? (would ideally have been better at Solver too, but doesn't look like that's possible without changing more BTC related code)

@prasannavl prasannavl mentioned this pull request Feb 9, 2023
19 tasks
@prasannavl
Copy link
Member

Going ahead and merging this for now. Let's explore if we can guard against invalid inputs lower in the stack separately.

@prasannavl prasannavl merged commit faaad56 into master Feb 2, 2023
@prasannavl prasannavl deleted the setgov-crashfix branch February 2, 2023 12:09
shohamc1 added a commit that referenced this pull request Feb 3, 2023
commit 32c9295
Author: Shoham Chakraborty <[email protected]>
Date:   Fri Feb 3 13:11:51 2023 +0800

    Update test

commit 15fb0e5
Author: Shoham Chakraborty <[email protected]>
Date:   Fri Feb 3 12:38:41 2023 +0800

    Use VotingInfo, remove unknown votes from output

commit 0609603
Merge: e51834a faaad56
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 22:42:22 2023 +0800

    Merge branch 'master' into proposalvotes-stats

commit faaad56
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 20:09:41 2023 +0800

    Fix setgov crashes (#1719)

    Co-authored-by: Prasanna Loganathar <[email protected]>

commit 7807454
Author: Mihailo Milenkovic <[email protected]>
Date:   Thu Feb 2 11:13:43 2023 +0100

    Fix voting scenarios test (#1727)

commit e51834a
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 15:38:06 2023 +0800

    Fix test

commit 808ed6e
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:49:20 2023 +0800

    Redo neutral changes

commit 4a9c8f0
Merge: bc55ada b7b14c2
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:30:31 2023 +0800

    Merge branch 'master' into proposalvotes-stats

    # Conflicts:
    #	src/masternodes/rpc_proposals.cpp
    #	test/functional/feature_on_chain_government.py

commit bc55ada
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:27:51 2023 +0800

    Refactor tests

commit e47befd
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:25:13 2023 +0800

    Default cycles fix

commit 44d0a02
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 15:08:29 2023 +0800

    Fix isMine default

commit 7246e04
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 14:51:04 2023 +0800

    Fix multiple proposal output when aggregating

commit 8b072df
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 14:45:48 2023 +0800

    Fix output schema

commit 9fa408b
Author: Shoham Chakraborty <[email protected]>
Date:   Mon Jan 30 12:09:57 2023 +0800

    Add aggregate stats support to listgovproposalvotes
Bushstar added a commit that referenced this pull request Feb 7, 2023
…1725)

* Squashed commit of the following:

commit e51834a
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 15:38:06 2023 +0800

    Fix test

commit 808ed6e
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:49:20 2023 +0800

    Redo neutral changes

commit 4a9c8f0
Merge: bc55ada b7b14c2
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:30:31 2023 +0800

    Merge branch 'master' into proposalvotes-stats

    # Conflicts:
    #	src/masternodes/rpc_proposals.cpp
    #	test/functional/feature_on_chain_government.py

commit bc55ada
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:27:51 2023 +0800

    Refactor tests

commit e47befd
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:25:13 2023 +0800

    Default cycles fix

commit 44d0a02
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 15:08:29 2023 +0800

    Fix isMine default

commit 7246e04
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 14:51:04 2023 +0800

    Fix multiple proposal output when aggregating

commit 8b072df
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 14:45:48 2023 +0800

    Fix output schema

commit 9fa408b
Author: Shoham Chakraborty <[email protected]>
Date:   Mon Jan 30 12:09:57 2023 +0800

    Add aggregate stats support to listgovproposalvotes

* Add vote validity and filter

* Squashed commit of the following:

commit 32c9295
Author: Shoham Chakraborty <[email protected]>
Date:   Fri Feb 3 13:11:51 2023 +0800

    Update test

commit 15fb0e5
Author: Shoham Chakraborty <[email protected]>
Date:   Fri Feb 3 12:38:41 2023 +0800

    Use VotingInfo, remove unknown votes from output

commit 0609603
Merge: e51834a faaad56
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 22:42:22 2023 +0800

    Merge branch 'master' into proposalvotes-stats

commit faaad56
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 20:09:41 2023 +0800

    Fix setgov crashes (#1719)

    Co-authored-by: Prasanna Loganathar <[email protected]>

commit 7807454
Author: Mihailo Milenkovic <[email protected]>
Date:   Thu Feb 2 11:13:43 2023 +0100

    Fix voting scenarios test (#1727)

commit e51834a
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 15:38:06 2023 +0800

    Fix test

commit 808ed6e
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:49:20 2023 +0800

    Redo neutral changes

commit 4a9c8f0
Merge: bc55ada b7b14c2
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:30:31 2023 +0800

    Merge branch 'master' into proposalvotes-stats

    # Conflicts:
    #	src/masternodes/rpc_proposals.cpp
    #	test/functional/feature_on_chain_government.py

commit bc55ada
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:27:51 2023 +0800

    Refactor tests

commit e47befd
Author: Shoham Chakraborty <[email protected]>
Date:   Thu Feb 2 14:25:13 2023 +0800

    Default cycles fix

commit 44d0a02
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 15:08:29 2023 +0800

    Fix isMine default

commit 7246e04
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 14:51:04 2023 +0800

    Fix multiple proposal output when aggregating

commit 8b072df
Author: Shoham Chakraborty <[email protected]>
Date:   Wed Feb 1 14:45:48 2023 +0800

    Fix output schema

commit 9fa408b
Author: Shoham Chakraborty <[email protected]>
Date:   Mon Jan 30 12:09:57 2023 +0800

    Add aggregate stats support to listgovproposalvotes

* Remove test file

---------

Co-authored-by: Peter John Bushnell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants