Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Implement Proposal execution #57

Merged
merged 4 commits into from
Apr 15, 2020
Merged

Implement Proposal execution #57

merged 4 commits into from
Apr 15, 2020

Conversation

alpe
Copy link
Collaborator

@alpe alpe commented Mar 19, 2020

After #66

Resolves #38

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Mostly looks good.

I see in the test cases that there are a number of edge cases around how proposal execution behaves. Are these listed out and documented somewhere?

Also I'm having trouble understanding where all the testdata stuff is used in this PR.

"not authz by group account": {
srcAccount: []byte("my-group-acct-addrss"),
srcMsgs: []sdk.Msg{MyMsg{[]sdk.AccAddress{[]byte("any--other---address")}}},
srcHandler: alwaysPanicHandler(),
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be mockHandler if we actually want to test this case? (panic might get caught by the router)

Copy link
Collaborator Author

@alpe alpe Apr 3, 2020

Choose a reason for hiding this comment

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

In this scenario the authentication decorator is tested. The handler should not be called as the payload message "signer" is not the groupAccount. This prevents access to random accounts.
The alwaysPanicHandler makes sense as it would raise a panic and not an error. The panic would not be handled by the router.

@alpe alpe changed the base branch from vote to master April 3, 2020 08:24
@alpe
Copy link
Collaborator Author

alpe commented Apr 3, 2020

As with the other PRs there is no "proper documentation" written. I have tried to define test cases for all the scenarios I could imagine so that they are a specification as code. Probably not what you were looking for.
I think we should make documentation a first class task. But before, I would appreciate if we can be more precise what kind of documentation, where we host it and who we are targeting as readers. Otherwise it would become an epic. We currently have only #40 which is not on the critical path.

The testdata messages are used for the tests in ProposalExecutor and Keeper. I see them also as extension point so that people may use them for their test scenarios.

@alpe alpe changed the base branch from master to vote April 3, 2020 09:13
@alpe alpe changed the base branch from vote to master April 6, 2020 07:28
@aaronc
Copy link
Member

aaronc commented Apr 7, 2020

@clevinson can you comment on documentation here?

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Approving this, but would be great if we can track all the edge cases covered here as a documentation TODO. @clevinson maybe you can flag this in an issue and link to the test cases covered here?

@alpe
Copy link
Collaborator Author

alpe commented Apr 15, 2020

I have created an issue and linked to the comment

@alpe alpe merged commit f6e7ff6 into master Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement MsgExec functionality
2 participants