Repository navigation
feat(contract): report pending parameter votes by proposal hash in state() #4872
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
Open
SimonRastikian
wants to merge
22
commits into
2825-store-parameter-votes-hash-only
from
2825-report-parameter-votes-tally
+223
−47
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2e59dc0
feat(contract): report pending parameter votes by proposal hash in st…
SimonRastikian 4adcd90
test(contract): update the ABI snapshot for the parameter-votes tally
SimonRastikian 69286e4
fix(contract-interface): accept the legacy parameter-votes report whe…
SimonRastikian ccd5f10
Merge branch '2825-store-parameter-votes-hash-only' into 2825-report-…
SimonRastikian 0c780d9
test(contract): use the Environment helper in the re-proposal state()…
SimonRastikian 46a0897
Merge branch '2825-store-parameter-votes-hash-only' into 2825-report-…
SimonRastikian 607cbaa
Merge branch '2825-store-parameter-votes-hash-only' into 2825-report-…
SimonRastikian 14ec286
docs(contract-interface): track removal of the legacy parameter-votes…
SimonRastikian 90e7148
Copilot Nits
SimonRastikian 0e1fe84
test(contract): accept the ABI snapshot and drop the stray .snap.new
SimonRastikian fbded4f
Merge branch '2825-store-parameter-votes-hash-only' into 2825-report-…
SimonRastikian 8421b40
docs(contract-interface): point the legacy parameter-votes arm at its…
SimonRastikian 92b7184
docs(contract-interface): note the end state when dropping the legacy…
SimonRastikian 9968b6f
Merge branch '2825-store-parameter-votes-hash-only' into 2825-report-…
SimonRastikian ae2479c
docs(contract-interface): drop the paraphrase from the previous_runni…
SimonRastikian e6e95bb
docs(contract-interface): drop the previous_running_state doc
SimonRastikian cf6a6f2
test(contract-interface): cover a populated legacy parameter-votes re…
SimonRastikian 958f611
refactor(contract): expose pending parameter votes via new_parameters…
SimonRastikian 0afd1e8
test(contract): update the ABI snapshot for the new_parameters_votes …
SimonRastikian d144e7f
test(contract-interface): pin legacy parameters_votes tolerance and d…
SimonRastikian aea3371
Merge branch '2825-store-parameter-votes-hash-only' into 2825-report-…
SimonRastikian 1a40b34
test(contract-interface): use DomainId for next_domain_id in the lega…
SimonRastikian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,8 +34,8 @@ use crate::method_names::{ | |
| GET_FOREIGN_CHAINS_CONFIGS, GET_PENDING_CKD_REQUEST, GET_PENDING_REQUEST, | ||
| GET_PENDING_VERIFY_FOREIGN_TX_REQUEST, GET_TEE_ACCOUNTS, INIT, INIT_RUNNING, | ||
| LAUNCHER_HASH_VOTES, MIGRATE, MIGRATION_INFO, MPC_NODE_MANIFEST_DIGEST_VOTES, | ||
| OS_MEASUREMENT_VOTES, PREPAY_ATTESTATION_STORAGE, PUBLIC_KEY, REGISTER_BACKUP_SERVICE, | ||
| REGISTER_FOREIGN_CHAINS_CONFIG, REMOVE_CONTRACT_UPDATE_VOTE, | ||
| NEW_PARAMETERS_VOTES, OS_MEASUREMENT_VOTES, PREPAY_ATTESTATION_STORAGE, PUBLIC_KEY, | ||
| REGISTER_BACKUP_SERVICE, REGISTER_FOREIGN_CHAINS_CONFIG, REMOVE_CONTRACT_UPDATE_VOTE, | ||
| REMOVE_NON_PARTICIPANT_CONTRACT_UPDATE_VOTES, REQUEST_APP_PRIVATE_KEY, RESPOND, RESPOND_CKD, | ||
| RESPOND_VERIFY_FOREIGN_TX, SIGN, START_KEYGEN_INSTANCE, START_NODE_MIGRATION, | ||
| START_RESHARE_INSTANCE, STATE, SUBMIT_CONTRACT_UPDATE, SUBMIT_PARTICIPANT_INFO, | ||
|
|
@@ -50,12 +50,12 @@ use crate::types::{ | |
| AvailableForeignChains, BackupServiceInfo, CKDAppPublicKey, CKDRequest, CKDRequestArgs, | ||
| CKDResponse, ChainEntry, CodeHashesVotes, Config, DestinationNodeInfo, DomainConfig, DomainId, | ||
| Ed25519PublicKey, EpochId, ExpectedMeasurements, ForeignChain, ForeignChainsConfig, | ||
| ForeignChainsConfigs, GovernanceThresholdParameters, InitConfig, KeyEventId, Keyset, | ||
| LauncherDockerComposeHash, LauncherHashVotes, LauncherImageHash, MeasurementVotes, | ||
| MigrationInfo, NodeId, NodeImageHash, ParticipantUrl, ProposalHash, | ||
| ProposedGovernanceThresholdParameters, ProtocolContractState, PublicKey, SignRequestArgs, | ||
| SignatureRequest, SignatureResponse, StoredAttestation, TeeVerifierCodeHash, Update, | ||
| UpdateHash, VerifyForeignTransactionRequest, VerifyForeignTransactionRequestArgs, | ||
| ForeignChainsConfigs, GovernanceThresholdParameters, GovernanceThresholdParametersVotes, | ||
| InitConfig, KeyEventId, Keyset, LauncherDockerComposeHash, LauncherHashVotes, | ||
| LauncherImageHash, MeasurementVotes, MigrationInfo, NodeId, NodeImageHash, ParticipantUrl, | ||
| ProposalHash, ProposedGovernanceThresholdParameters, ProtocolContractState, PublicKey, | ||
| SignRequestArgs, SignatureRequest, SignatureResponse, StoredAttestation, TeeVerifierCodeHash, | ||
| Update, UpdateHash, VerifyForeignTransactionRequest, VerifyForeignTransactionRequestArgs, | ||
| VerifyForeignTransactionResponse, YieldIndex, | ||
| }; | ||
| use near_mpc_bounded_collections::NonEmptyBTreeMap; | ||
|
|
@@ -633,6 +633,10 @@ impl<C: ViewContract + Clone> MpcContractHandle<C> { | |
| self.view(ViewArgs::no_args(LAUNCHER_HASH_VOTES)) | ||
| } | ||
|
|
||
| pub fn new_parameters_votes(&self) -> ViewCall<C, GovernanceThresholdParametersVotes> { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the method should be added to the catalog test below |
||
| self.view(ViewArgs::no_args(NEW_PARAMETERS_VOTES)) | ||
| } | ||
|
|
||
| pub fn os_measurement_votes(&self) -> ViewCall<C, MeasurementVotes> { | ||
| self.view(ViewArgs::no_args(OS_MEASUREMENT_VOTES)) | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just
parameter_votes? I don't think thenew_*prefix adds anything of value. In fact, I think it makes it more confusing.