-
Notifications
You must be signed in to change notification settings - Fork 129
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
[R-W Bridge] (Fees) Redeploy to synch Rococo and Wococo with fees/weights/rewards #1677
Comments
One delivered message (local setup) BridgeHubRococo -> BridgeHubWococo: on BridgeHubRococo:
on BridgeHubWococo:
|
@svyatonik One thing, I see here that reward is much lower than paid fees on And second thing, I am just thinking, how to setup those fee consts for On the sending side we have constants for rewards and on the receiving side we have reward as fee calculation from extrinsic call. I am just thinking, what if we have the same system on both sides: |
First of all, RBH<>WBH realyer is not using batch transactions now, so the numbers are incorrect at least at
Yep - we may add another signed ext for that (to refund confirmation transaction), so that it'll be consistent on both sides. @serban300 @acatangiu wdyt - do we need to do that/do that now/do that after initial deployment? Just a brief intro on how it works now: Right now at the source chain there are two constants to configure relayer rewards -
The code is here: https://github.com/paritytech/parity-bridges-common/blob/master/modules/relayers/src/payment_adapter.rs#L68-L102 |
Having a consistent approach on both sides sounds good. But I just want to take a look on the code to make sure I understand everything correctly. I'll get back with a more documented opinion. |
I looked on the code. I suppose that if the delivery and confirmation fees are configured correctly, they will always cover the costs of submitting the extrinsics, but I think it would make sense to refund the Regarding timing, if we're sure we want to do it, I would do it now, in order to avoid bugs after the initial deployment. I can take the issue if you want. However you prefer. Another small thing, related to the fees. IIUC right now the
the confirmation reward is 10000, while the actual delivery reward is (100000 - 10000) = 90000. I was a bit confused by this. Could we rename the |
I don't mind if you want to take it, of course :) But probably we want a separate signed extension for that - it is for an opposite bridge direction. So it needs to be explored. If we gonna do it now, then:
|
I hope I understood correctly. Just checking. So you're saying that we'll replace the confirmation fee with a refund of the batch of calls containing the |
Let's consider one-direction bridge. So we have source and target chains + some lane. Right now we have everything ready to get rewards/compensations at the target chain. So right now we have everything ready to handle that at target chain:
Once messages are delivered (delivery transaction is sent to the target chain), the relayer submits delivery confirmation transaction to the source chain. We have no batch transactions there (at the source chain) and right now we don't have any plans to support that! Right now we have this
So yes - we're replacing the |
Thanks for the details ! They were helpful. And replacing |
Actually - I maybe wrong here. Maybe we need to support refund for batch transactions here too. Because if we'll be only refunding confirmation transaction submitter, he'll lose funds for submitting finality transactions (unless he has previously submitted them in a single batch with other-direction delivery transactions). And malicious relayers can just block the inbound lane (at the target chain) by not submitting confirmation transaction to the source chain (and thus by not clearing the
Also we need to be sure that:
Yep, that sounds about right - sorry for misleading you, @serban300 . So if you're going to work on signed extension, then I'll work on the relayer part. Does it sounds ok to you? |
Yes, perfect. Thanks ! |
The changes were deployed (Runtimes + relay). The script for sending a remark fails:
Not sure what this failure is related to. This also fails on local. The script for sending a trap works, the message reaches BHR and the relayer fails to send it to BHW:
Not sure why. This works locally. |
maybe live westmint is down, there is one call to generate remark_with_event encoded_call_data |
hmm, I tried now and it worked from actual
@serban300
this could explain, why trap works and transact not :), |
@bkontur thanks ! I'll try. For the moment I'm debugging using traps since they work. I ran the relayer locally, and I'm getting a more specific error here:
Which makes sense. I'll try to fund the relayer accounts. |
@EmmanuellNorbertTulbure to redefine title and description |
So I've been watching relay balances today during single message send. Here's what happening now:
So:
|
closing, we dont care about constants now, but we will provide test which will check them so it will be under controll |
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.144 to 1.0.145. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.144...v1.0.145) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
check and setup weight/fees everywhere
type OnChargeTransaction
change()
->DealWithFees<Runtime>
setup reward constants- checking constants will be a part of Add test cases to Cumulus which simulates real e2e message delivery #2078The text was updated successfully, but these errors were encountered: