Skip to content

Conversation

@dragos-rebegea
Copy link
Contributor

Reasoning behind the pull request

  • When a user has staked delegated to multiple SCs, he will be able to vote only once

Proposed changes

  • Check if one has voted for one proposal but consider also the voter

Testing procedure

  • After the activation of GovernanceFixes flag, multiple SCs can delegateVote for the same address.
  • No ongoing governance shall exists during the activation

@codecov
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (d49fcca) 80.32% compared to head (78a4644) 80.32%.

Files Patch % Lines
vm/systemSmartContracts/governance.go 90.62% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feat/governance-fixes    #5857   +/-   ##
======================================================
  Coverage                  80.32%   80.32%           
======================================================
  Files                        709      709           
  Lines                      93973    94010   +37     
======================================================
+ Hits                       75480    75515   +35     
  Misses                     13215    13215           
- Partials                    5278     5280    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sasurobert
sasurobert previously approved these changes Jan 22, 2024
@AdoAdoAdo AdoAdoAdo self-requested a review January 22, 2024 10:37
@iulianpascalau iulianpascalau self-requested a review January 23, 2024 07:45
if err != nil {
return nil, err
}
return onGoingListV2, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should return onGoingList not the v2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method will be called only after GovernanceFixes gets activated, that means there is no ongoing v1 proposal, thus the information is not necessary anymore.

iulianpascalau
iulianpascalau previously approved these changes Feb 5, 2024
if err != nil {
return nil, err
}
return onGoingListV2, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

iulianpascalau
iulianpascalau previously approved these changes Feb 5, 2024
require.False(t, handler.IsFlagEnabled(common.ESDTFlagInSpecificEpochOnly)) // ==
require.True(t, handler.IsFlagEnabled(common.GovernanceFlag))
require.False(t, handler.IsFlagEnabled(common.GovernanceFlagInSpecificEpochOnly)) // ==
require.True(t, handler.IsFlagEnabled(common.GovernanceDisableProposeFlag)) // ==
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose for the == comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove in the next PR.

}

message DelegatedWithAddress {
uint64 Nonce = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason we don't add a json tag for nonce, or why we do for the others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add in the next PR.

@dragos-rebegea dragos-rebegea merged commit 8fa9408 into feat/governance-fixes Feb 5, 2024
@dragos-rebegea dragos-rebegea deleted the MX-15029 branch February 5, 2024 14:42
@dragos-rebegea dragos-rebegea restored the MX-15029 branch September 23, 2024 13:26
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.

5 participants