-
Notifications
You must be signed in to change notification settings - Fork 73
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 #387 - Generalize the Event and Error of tasks by separating execution from triggering and rescheduling #383
Merged
Merged
Changes from 32 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
62730ce
If the balance is insufficient, skip the bond
imstar15 3900804
fixup: auto format Rust code
a9e94cb
Fix tests for auto compound task
imstar15 b0e16ec
Add test cases of 4 scenarios for auto compound task
imstar15 380328f
Fix DelegationNotFound typo
imstar15 32fd90d
Change the branch of pallet-parachain-staking library to oak-staging
imstar15 f8d061a
In the AutoCompoundDelegatorStakeFailed event, the error_message will…
imstar15 9268558
Merge branch 'master' into fix-auto-compound-task
imstar15 e74fc9f
Add non_interrupt_errors to Task attributes
imstar15 414dd65
fixup: auto format Rust code
8033e82
Add encoded_call attribute to TaskTriggered event
imstar15 8a65340
fixup: auto format Rust code
f60ec35
Remove XcmpTaskSucceeded, AutoCompoundDelegatorStakeSucceeded, AutoCo…
imstar15 2b5ae4d
fixup: auto format Rust code
49c19a9
Fix tests
imstar15 07fc23b
Fix tests. Add comments.
imstar15 8dad836
Merge branch 'master' into fix-auto-compound-task
imstar15 707c7cb
fixup: auto format Rust code
2c84a6f
Rename cancel_upon_errors to abort_errors
imstar15 1b02d36
fixup: auto format Rust code
8d3462c
Fix tests
imstar15 938ec97
fixup: auto format Rust code
a8167bf
Add TaskExecuted event
imstar15 8e12676
fixup: auto format Rust code
19e9eec
Fix tests
imstar15 eb25f28
fixup: auto format Rust code
5afe04b
Remove DynamicDispatchResult in benchmarking
imstar15 0a33b0d
Rename TaskFailedToReschedule to TaskRescheduleFailed
imstar15 0a9f202
Add comments
imstar15 f8f67bd
Add more checks in tests
imstar15 269dacf
fixup: auto format Rust code
917cb56
Merge branch 'master' into fix-auto-compound-task
chrisli30 0584ce2
Check dynamic dispatch error in bechmarking
imstar15 588c0ee
Remove abort_errors in TaskTriggered event
imstar15 599cdb2
Merge branch 'master' into fix-auto-compound-task
imstar15 70acade
Deposit DelegationIncreased event in MockDelegatorActions
imstar15 1c3f998
Merge branch 'master' into fix-auto-compound-task
imstar15 ac9d600
Rename cancel_errors to abort_errors in mock.rs
imstar15 03137e2
Revert assert_last_event and add allow(dead_code) annotation on it
imstar15 0843dda
Update parachain-staking library
imstar15 4049d66
Change the type of encoded_call in TaskTriggered event
imstar15 aa620dd
Change the type of abort_errors to Vec<Vec<u8>>
imstar15 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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.
I think we should still keep this verify block. i had a similar code in here we can use to get the right task id
https://github.com/OAK-Foundation/OAK-blockchain/blob/917cb56330ece0ac6fc8c5b79a804ac04ec39e8a/pallets/automation-time/src/benchmarking.rs#L221-L227
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.
Because
run_dynamic_dispatch_action
does not throw events, it only returns error. Therefore, I checked the error it returns. Since error variable cannot be used in theverify
block, I did not include these checks in theverify
blockRefers to:
https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/state-trie-migration/src/lib.rs#L964
.
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.
ic, that makes sense.