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

Ensure validators are registered before staking #74

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

ethanfrey
Copy link
Collaborator

@ethanfrey ethanfrey commented Jun 27, 2023

Closes #70

This doesn't let a new stake occur unless when know the validator is in the active set.
Added a test command to place a validator in the active set.

@ethanfrey ethanfrey requested a review from maurolacy June 27, 2023 16:40
@@ -115,6 +125,23 @@ fn staking() {
.call(users[1])
.unwrap();

/*
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@hashedone @jawoznia

Another non-blocking issue in Sylvia.

User calls contract A. contract A returns message to execute contract B. contract B calls fail (no reply registered). A and B both have different ContractError registered.

The caller doesn't ever get the result, but it fails inside ExecProxy when trying to downcast the result to vault::ContractError (contract A). Not sure if the error is external_staking::ContractError (contract B), or StdError, but I want to assert this fails without panic-ing the test

@ethanfrey
Copy link
Collaborator Author

Merging this one. Happy for more detailed review later.

@ethanfrey ethanfrey merged commit 1494152 into main Jun 27, 2023
@ethanfrey ethanfrey deleted the ensure-known-validators branch June 27, 2023 17:44
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.

Reject unknown validators for external staking
1 participant