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

Remove message fee + message send calls #1642

Merged
merged 20 commits into from
Nov 18, 2022
Merged

Remove message fee + message send calls #1642

merged 20 commits into from
Nov 18, 2022

Conversation

svyatonik
Copy link
Contributor

@svyatonik svyatonik commented Nov 15, 2022

resolves some parts of #1638
very wip => draft

Splitting it into separate issues turned out to be hard - removed parts are tightly tied together, so single PR. I'll explicitly add comments where I'd like to have an approval.

UPD: this PR is not touching everything that is related to relayer rewards

UPD2: what this PR removes:

  • send_message and increase_message_fee calls of the messages pallet + their corresponding benchmarks;
  • everything that is related to message delivery and dispatch fee - since messages fee is now supposed to be taken at bridge "appication level";
  • rational relayer mode;
  • conversion rates - storage entries, computations, metrics + some linked parameters that have been involved in fee computation;
  • estimate-fee subcommand of relayer

@svyatonik svyatonik added A-chores Something that has to be done, as part of regular maintenance PR-audit-needed A PR has to be audited before going live. PR-breaksrelay A PR that is going to break existing relayers. I.e. some Runtime changes render old relayers unusabl PR-breaksruntime A PR that is going to break runtime bridge compatibility. We need to be careful with upgrade. labels Nov 15, 2022
@svyatonik svyatonik changed the title Remove message fee + message rewards + message send calls Remove message fee + message send calls Nov 16, 2022
messages_relayers,
received_range,
);

register_relayers_rewards::<T>(
confirmation_relayer,
relayers_rewards,
GetConfirmationFee::get(),
// TODO (https://github.com/paritytech/parity-bridges-common/issues/1318): this shall be fixed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shall be fixed either in this PR, or later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left it for later. New relayer rewards scheme will be introduced later && it deserves a separate review

@svyatonik svyatonik marked this pull request as ready for review November 17, 2022 10:24
@svyatonik svyatonik marked this pull request as draft November 17, 2022 10:27
@svyatonik
Copy link
Contributor Author

Need to test it locally => back to draft


// there's no way to craft XCM of the given size - we'll be using `ExpectPallet`
// instruction, which has byte vector inside
let mut current_vec_size = expected_xcm_size;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the only new code in this PR - since we are now only sending messages using XCM pallet, then the message shall be valid xcm and vec[42; 1024] won't work here.

@svyatonik svyatonik marked this pull request as ready for review November 17, 2022 13:54
Copy link
Contributor

@bkontur bkontur left a comment

Choose a reason for hiding this comment

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

@svyatonik
wow, lots of code removed,
very nice, it will also remove lots of my "0/None TODOs" from bridge-hubs :)

jiguantong pushed a commit to darwinia-network/darwinia-messages-substrate that referenced this pull request Apr 18, 2023
svyatonik pushed a commit that referenced this pull request Jul 17, 2023
* [WIP][ci] Disable auto-fmt and revert cancel-pipeline

* fail test-linux-stable

* fix test-linux-stable
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Mar 27, 2024
* remove message fee

* it is compiling!

* fixes + fmt

* more cleanup

* more cleanup

* restore MessageDeliveryAndDispatchPayment since we'll need relayer rewards

* started rational relayer removal

* more removal

* removed estimate fee subcommand

* remove DispatchFeePayment

* more removals

* removed conversion rates && some metrics

* - unneeded associated type

* - OutboundMessageFee

* fix benchmarks compilation

* fmt

* test + fix benchmarks

* fix send message

* clippy
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Apr 8, 2024
* remove message fee

* it is compiling!

* fixes + fmt

* more cleanup

* more cleanup

* restore MessageDeliveryAndDispatchPayment since we'll need relayer rewards

* started rational relayer removal

* more removal

* removed estimate fee subcommand

* remove DispatchFeePayment

* more removals

* removed conversion rates && some metrics

* - unneeded associated type

* - OutboundMessageFee

* fix benchmarks compilation

* fmt

* test + fix benchmarks

* fix send message

* clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chores Something that has to be done, as part of regular maintenance PR-audit-needed A PR has to be audited before going live. PR-breaksrelay A PR that is going to break existing relayers. I.e. some Runtime changes render old relayers unusabl PR-breaksruntime A PR that is going to break runtime bridge compatibility. We need to be careful with upgrade.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants