Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Check relayer balance before dispatch #137

Merged
merged 11 commits into from
Jun 17, 2022

Conversation

boundless-forest
Copy link
Member

@boundless-forest boundless-forest commented Jun 17, 2022

This one is ready for review, but no merge until I finished the test in the darwinia-common. I'll let you guys know at that time. Maybe some little tweak need.

@boundless-forest boundless-forest marked this pull request as ready for review June 17, 2022 11:50
@@ -154,8 +163,15 @@ pub trait IntoDispatchOrigin<AccountId, Call, Origin> {

/// A generic trait to validate message before dispatch.
pub trait CallValidate<AccountId, Origin, Call> {
Copy link
Member Author

Choose a reason for hiding this comment

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

I want to change these three generic params into associated types later. Then on darwinia-common side, we only maintain a general struct is enough. I need more tests locally.

@hackfisher
Copy link
Contributor

I want to emphasize the difference between pre_dispatch and call_validate by introducing receiving in the name, because the ultimate behavior/result for returning errors.

	/// Checking in message receiving step before dispatch
	///
	/// This will be called before the call enter dispatch phase. If failed, the message(call) will
	/// be not be processed by this relayer, latter relayers can still continue process it.

@hackfisher hackfisher merged commit ddfecb1 into darwinia-v0.12.3 Jun 17, 2022
@hackfisher hackfisher deleted the bear-check-relayer-balance-ahead branch June 17, 2022 12:26
hackfisher pushed a commit that referenced this pull request Jun 17, 2022
hackfisher added a commit that referenced this pull request Jun 17, 2022
* cherry pick #137

* pick #141

Co-authored-by: bear <[email protected]>
jiguantong pushed a commit that referenced this pull request Jul 1, 2022
* cherry pick #137

* pick #141

Co-authored-by: bear <[email protected]>
jiguantong pushed a commit that referenced this pull request Sep 29, 2022
* cherry pick #137

* pick #141

Co-authored-by: bear <[email protected]>
wuminzhe pushed a commit that referenced this pull request Sep 30, 2022
* Update market after order is created or comfirmed (#94)

* Update order capacity

* FIX CI

* Update comment

* Redesign fee market payment (#169)

* Add basic solution

* Refactor Slash Report

* Refactor Slash Report 2

* Add other changes

* Add tests

* Self review

* Rename to `message_and_confirm_reward`

* Rename to `previous_relayers`

* Rename to AssignedRelayer

* Add more comments

* Add more comments

* Add new reward implementation

* Rename and clean the code, needs more test

* Add more docs here

* Prepare for tests

* Fix broken tests

* Refactor

* Rename

* Remove RewardBook

* Self review

* Save one storage

* Try fix ci

* Handle Zero `CollateralPerOrder` (#176)

* Companion 189 for darwinia-parachain (#194)

* Update fee-market terminology (#192) (#199)

* Support pangolin <> pangolin parachain alpha bridge (#190)

* Cherry-pick #201 to `darwinia-parachain` (#203)

* Del useless related to fee calculation (#201)

* Delete estimate_delivery_transaction

* Delete transaction_payment

* Delete MessageTransaction

* Code clean

* Fix compile

* Anchor polkadot-v0.9.27

* remove unused import

* Fix test problem (#172)

* fix ci

* Add necessary reward event (#89)

* Refactor the total reward cal

* Code Clean

* Fix test

* Add OrderCreated event

* Self review

* Update comment

* Update OrderCreate event to include relayers

* Fix review

* Enhance dispatch module (#121)

* rm shift session manager pallet and clean useless imports (#128)

* `Pre-dispatch` validate for main branch (#130)

* Adjust the traits

* Try fix compile

* Fix tests

* Code clean

* Avoid duplicate evm transact fees (#136)

* cherry pick #137 (#140)

* cherry pick #137

* pick #141

Co-authored-by: bear <[email protected]>

* Drop error in `pre_dispatch` (#152) (#153)

* Migrate to new s2s bridge (#149)

* Add client-darwinia/client-crab/client-crab-parachain

* Update CI

* rever substrate commit

* fix compile

* remove transactional

* Fix

* Bump finality-grandpa to v0.16.0

* fix wrong import

* make change follow paritytech/substrate#11415

* Add runtime-common to workspace and try fix test

* Make changes follow paritytech/substrate#10242

* Code clean

* More ci check

* Remove integrity

Co-authored-by: bear <[email protected]>

* Companion for #155 (#157)

* Update market after order is created or comfirmed (#94)

* Update order capacity

* FIX CI

* Update comment

* Redesign fee market payment (#169)

* Add basic solution

* Refactor Slash Report

* Refactor Slash Report 2

* Add other changes

* Add tests

* Self review

* Rename to `message_and_confirm_reward`

* Rename to `previous_relayers`

* Rename to AssignedRelayer

* Add more comments

* Add more comments

* Add new reward implementation

* Rename and clean the code, needs more test

* Add more docs here

* Prepare for tests

* Fix broken tests

* Refactor

* Rename

* Remove RewardBook

* Self review

* Save one storage

* Try fix ci

* Handle Zero `CollateralPerOrder` (#176)

* Update Fee market docs (#178)

* Update doc

* Update example

* Move to `dev-dependencies` (#182)

* Sync part.1 (#184)

* Remove fee relates (#186)

* Sync missing changes from different branches (#191)

* Support pangolin <> pangolin parachain alpha bridge (#190)

* Integrate `fee-market` to `FromThisChainMessageVerifier` (#189)

* Run ignored crate

* Fix tests

* Add features

* Fix compile

* Update fee-market terminology (#192)

* Del useless related to fee calculation (#201)

* Delete estimate_delivery_transaction

* Delete transaction_payment

* Delete MessageTransaction

* Code clean

* master > polkadot-v0.9.27

* roll back bp-parachain

Co-authored-by: bear <[email protected]>
Co-authored-by: Xavier Lau <[email protected]>
Co-authored-by: Aki Wu <[email protected]>
Co-authored-by: HackFisher <[email protected]>
Co-authored-by: HackFisher <[email protected]>
Co-authored-by: fewensa <[email protected]>
@jiguantong jiguantong mentioned this pull request Oct 27, 2022
10 tasks
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.

2 participants