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

Add eth outbound queue and system pallets #742

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

tmpolaczyk
Copy link
Collaborator

No description provided.

@tmpolaczyk tmpolaczyk changed the title Tomasz generic aggregate message origin [WIP] Add eth outbound queue and system pallets Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

WASM runtime size check:

Compared to target branch

dancebox runtime: 1412 KB (no changes) ✅

flashbox runtime: 832 KB (no changes) ✅

dancelight runtime: 2056 KB (no changes) ✅

container chain template simple runtime: 1088 KB (no changes) ✅

container chain template frontier runtime: 1388 KB (no changes) ✅

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Coverage Report

(master)

@@                             Coverage Diff                             @@
##           master   tomasz-generic-aggregate-message-origin      +/-   ##
===========================================================================
- Coverage   65.44%                                    65.16%   -0.28%     
+ Files         309                                       310       +1     
+ Lines       53985                                     54234     +249     
===========================================================================
+ Hits        35328                                     35339      +11     
+ Misses      18657                                     18895     +238     
Files Changed Coverage
/pallets/external-validator-slashes/src/lib.rs 74.71% (-10.25%)
/solo-chains/runtime/dancelight/src/lib.rs 66.79% (-0.99%)

Coverage generated Wed Nov 13 08:29:04 UTC 2024

@tmpolaczyk tmpolaczyk changed the title [WIP] Add eth outbound queue and system pallets Add eth outbound queue and system pallets Nov 8, 2024
@tmpolaczyk tmpolaczyk marked this pull request as ready for review November 8, 2024 10:22
@@ -14,6 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Tanssi. If not, see <http://www.gnu.org/licenses/>

use snowbridge_core::outbound::Fee;
use snowbridge_core::outbound::SendError;
Copy link
Collaborator

Choose a reason for hiding this comment

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

FMT

use frame_support::ensure;
use frame_support::traits::{Defensive, ProcessMessage, ProcessMessageError};
use frame_support::weights::WeightMeter;
use snowbridge_pallet_outbound_queue::MessageLeaves;
Copy link
Collaborator

Choose a reason for hiding this comment

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

FMT again


#[pallet::call_index(2)]
#[pallet::weight(T::WeightInfo::force_inject_slash())]
pub fn root_test_send_msg_to_eth(
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to bench this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's only for testing, and ensure_root, what's the point of benchmarking it?

type Balance = Balance;
type WeightToFee = WeightToFee;
type WeightInfo = ();
//type WeightInfo = crate::weights::snowbridge_pallet_outbound_queue::WeightInfo<Runtime>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

put proper weight info benchmarked

type GetAggregateMessageOrigin = GetAggregateMessageOrigin;
type MessageQueue = MessageQueue;
type Decimals = ConstU8<12>;
type MaxMessagePayloadSize = ConstU32<2048>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

it seems to be this will be not enough, maybe we should double it.

in the case of 100 validators, 32 byte per validator account * 100 is already 3200...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We decided not to do this and instead send the message in batches, correct?

type Helper = benchmark_helper::EthSystemBenchHelper;
type DefaultPricingParameters = Parameters;
type InboundDeliveryCost = ();
//type InboundDeliveryCost = EthereumInboundQueue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

same thing with benchmarks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will do benchmarks when the PR is ready, as they are time consuming

@girazoki
Copy link
Collaborator

Upstream changes look good, waiting for a potential PR opening and approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants