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 ethereum bridge testing support #812

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

Conversation

dimartiro
Copy link
Contributor

@dimartiro dimartiro commented Jan 17, 2025

Description

Add support for testing ethereum snowbridge in dancelight using xcm-emulator bridge features

@dimartiro dimartiro self-assigned this Jan 17, 2025
@dimartiro dimartiro force-pushed the diego-test-eth-bridge branch from 802a398 to 552f4bc Compare January 17, 2025 00:56
Copy link
Contributor

github-actions bot commented Jan 17, 2025

WASM runtime size check:

Compared to target branch

dancebox runtime: 1420 KB (no changes) ✅

flashbox runtime: 824 KB (no changes) ✅

dancelight runtime: 2172 KB (no changes) ✅

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

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

@dimartiro dimartiro added B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime/client code not-breaking Does not need to be mentioned in breaking changes labels Jan 17, 2025
}
}

pub fn force_process_bridge() {
type DancelightRelayMessageQueue = <DancelightRelay as DancelightRelayPallet>::MessageQueue;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would make this more generic. Maybe we can pass a mocknet and adjust the rest of the values? maybe not, just asking for reference

Copy link
Contributor Author

@dimartiro dimartiro Jan 20, 2025

Choose a reason for hiding this comment

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

Solved, but was easier using the Relay, Parachain instead of the mocknet.
I'm still thinking all will be more straightforward if we add bridge support for relay in the __impl_test_ext_for_relay_chain macro
but for sure that could take more time to test

@girazoki
Copy link
Contributor

Now that we know how this works, maybe we can add the dispatcher in the other direction? we should Call EthereumInboundQueue with the extrinsic submit and the message. We can use the same pattern, i.e., we create a send_inbound_message function that overrides a thread variable and we implement the other direction of the bridge

@dimartiro dimartiro force-pushed the diego-test-eth-bridge branch from 3a442b8 to 9be7a19 Compare January 20, 2025 13:32
Copy link
Contributor

github-actions bot commented Jan 20, 2025

Coverage Report

(master)

@@                    Coverage Diff                    @@
##           master   diego-test-eth-bridge      +/-   ##
=========================================================
+ Coverage   65.76%                  65.84%   +0.08%     
+ Files         332                     334       +2     
+ Lines       58475                   58553      +78     
=========================================================
+ Hits        38456                   38554      +98     
- Misses      20019                   19999      -20     
Files Changed Coverage
/pallets/external-validator-slashes/src/lib.rs 85.94% (+7.35%)
/primitives/bridge/src/custom_do_process_message.rs 97.47% (+1.27%)
/primitives/bridge/src/lib.rs 81.75% (+1.59%)

Coverage generated Wed Jan 22 15:20:32 UTC 2025

@dimartiro dimartiro force-pushed the diego-test-eth-bridge branch 3 times, most recently from def4ede to 2ce9556 Compare January 20, 2025 15:33
@dimartiro
Copy link
Contributor Author

Now that we know how this works, maybe we can add the dispatcher in the other direction? we should Call EthereumInboundQueue with the extrinsic submit and the message. We can use the same pattern, i.e., we create a send_inbound_message function that overrides a thread variable and we implement the other direction of the bridge

I'm not sure if I get it, you mean by creating another network with a bridge setting DancelightRelay as Target ?

@dimartiro dimartiro force-pushed the diego-test-eth-bridge branch from 2ce9556 to 20a003c Compare January 22, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime/client code not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants