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

Inbound queue v2 #3

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
b01161f
feat(xcm-v5): skeleton
franciscoaguirre Jun 5, 2024
0b83e68
feat(xcm-v3): no longer use v2 types
franciscoaguirre Jun 5, 2024
e917d67
feat: remove XCMv2
franciscoaguirre Jun 5, 2024
9005e04
Merge branch 'master' into xcm-v5
franciscoaguirre Jun 19, 2024
5fc4a32
fix(xcm-v5): fix most compilation errors
franciscoaguirre Jun 19, 2024
337e26e
Merge branch 'master' into xcm-v5
franciscoaguirre Jun 26, 2024
19cc1da
fix(pallet-xcm): change V4 to V5
franciscoaguirre Jun 26, 2024
5cfd108
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 14, 2024
96b5b4b
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 14, 2024
6de7a42
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 16, 2024
126ef2f
fix(xcm-v5): change v4 to v5
franciscoaguirre Aug 16, 2024
a16e19f
fix: more v4 to v5 conversions
franciscoaguirre Aug 16, 2024
a3a09af
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 16, 2024
bbba323
fix: more v4 to v5 conversions
franciscoaguirre Aug 16, 2024
98c3906
fix: more v4 to v5 conversions
franciscoaguirre Aug 16, 2024
08a82d1
fix(xcm-builder): use previously unused function
franciscoaguirre Aug 19, 2024
1f031ec
fix(xcm-executor): change v4 to v5
franciscoaguirre Aug 19, 2024
5b423ad
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 21, 2024
1116cbb
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 21, 2024
cfa2ef4
Merge branch 'master' into xcm-v5
franciscoaguirre Aug 27, 2024
241e992
Merge branch 'master' into xcm-v5
franciscoaguirre Sep 4, 2024
d421d3f
Merge branch 'master' into xcm-v5
franciscoaguirre Sep 4, 2024
3e85791
Merge branch 'master' into xcm-v5
franciscoaguirre Oct 1, 2024
f80c76a
fix: v4 -> v5
franciscoaguirre Oct 1, 2024
d8895c2
Initialize bridge V2
yrong Oct 8, 2024
10d7bcb
Revamp outbound for V2
yrong Oct 10, 2024
821ffdc
Extrinsic for submit delivery proof
yrong Oct 11, 2024
d5cadfa
Improve error & more tests
yrong Oct 14, 2024
0905c41
Move merkle impl to core
yrong Oct 14, 2024
7a37072
Revert FeeManager
yrong Oct 14, 2024
db634a3
Route first to V2 then fallback to V1 with a custom instruction Expec…
yrong Oct 16, 2024
d1425bb
[XCMv5] Better fee mechanism (#5420)
franciscoaguirre Oct 17, 2024
f481f8e
Merge branch 'master' of github.com:paritytech/polkadot-sdk into xcm-v5
acatangiu Oct 17, 2024
678a379
Merge branch 'master' into xcm-v5
acatangiu Oct 17, 2024
4d9cc77
Merge branch 'master' of github.com:paritytech/polkadot-sdk into xcm-v5
acatangiu Oct 17, 2024
cdfecb7
fix merge dmg
acatangiu Oct 17, 2024
99ba809
Fix fee amount
yrong Oct 20, 2024
446465b
Added SetAssetClaimer Instruction to XCM v5 (#5585)
x3c41a Oct 21, 2024
4a6e85c
Merge branch 'master' into xcm-v5
acatangiu Oct 21, 2024
ec16524
Add blocknumber to LockedFee for easy scanning
yrong Oct 21, 2024
58de17b
Fix abi encode command
yrong Oct 22, 2024
9cd9890
Refactor merkle tree as a seperated package
yrong Oct 23, 2024
a0deaba
Seperate V1&V2 more clearly
yrong Oct 23, 2024
850fe96
Move governance origin to V2 package
yrong Oct 23, 2024
273b971
Fix breaking tests
yrong Oct 23, 2024
2bc9b58
Remove command deprecated
yrong Oct 23, 2024
165e5a6
Update bridges/snowbridge/pallets/outbound-queue-v2/src/types.rs
yrong Oct 23, 2024
f7a1dbd
Remove MAXIMUM_BASE_GAS
yrong Oct 23, 2024
2fdd374
Merge branch 'outbound-queue-v2' of https://github.com/yrong/polkadot…
yrong Oct 23, 2024
8fe7700
[xcm-v5] implement RFC#100: add new InitiateTransfer instruction (#5876)
acatangiu Oct 23, 2024
10d6795
Merge branch 'master' into xcm-v5
franciscoaguirre Oct 23, 2024
33fdc5f
Refactor with alloy macro
yrong Oct 24, 2024
6bd7eb1
Update bridges/snowbridge/pallets/outbound-queue-v2/src/types.rs
yrong Oct 24, 2024
353e925
Use const for MAX_COMMANDS
yrong Oct 24, 2024
ba03ae6
Rename to PendingOrder
yrong Oct 24, 2024
57fad4c
Encode as compact
yrong Oct 24, 2024
12bb98f
Cleanup
yrong Oct 24, 2024
bf3041c
Add RewardLedger trait
yrong Oct 24, 2024
3963326
Reorganize route v2
yrong Oct 24, 2024
4796240
Remove merkle-tree in outbound-queue
yrong Oct 24, 2024
0e9cca0
Rebase inbound queue
yrong Oct 24, 2024
c90bfed
Emit the entire message
yrong Oct 28, 2024
3233c3f
Merge branch 'xcm-v5' into outbound-queue-v2
yrong Oct 29, 2024
d3b26bb
Update tests
yrong Oct 29, 2024
32ac7aa
Fix compile error
yrong Oct 29, 2024
8f59cc4
Merge branch 'outbound-queue-v2' into inbound-queue-v2
yrong Oct 29, 2024
3660624
Fix test
yrong Oct 29, 2024
ee92d41
Predict route table by content of xcm
yrong Oct 29, 2024
bd02251
Merge branch 'outbound-queue-v2' into inbound-queue-v2
yrong Oct 29, 2024
91b6405
Use XCM V5 instructions
yrong Oct 29, 2024
a1b8381
Transact without specifying weight (#6228)
franciscoaguirre Oct 29, 2024
86542d6
[xcm-v5] implement RFC#122: InitiateTransfer can alias XCM original o…
acatangiu Oct 29, 2024
e8807a3
Merge branch 'master' into xcm-v5
acatangiu Oct 29, 2024
d9bb2c4
Transfer PNA with XCMV5
yrong Oct 29, 2024
67c6e79
Merge branch 'xcm-v5' into outbound-queue-v2
yrong Oct 29, 2024
f40656c
Preserve origin with AliasOrigin
yrong Oct 29, 2024
bbf1299
Improve commens
yrong Oct 30, 2024
593c182
Fix FeeManager runtime config & Refactoring to pull SendMessageFeePro…
yrong Oct 30, 2024
48f5e19
Fix tests
yrong Oct 30, 2024
d1e901d
Fix test
yrong Oct 30, 2024
9e39dca
Merge branch 'outbound-queue-v2' into inbound-queue-v2
yrong Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 100 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ members = [
"bridges/snowbridge/pallets/ethereum-client",
"bridges/snowbridge/pallets/ethereum-client/fixtures",
"bridges/snowbridge/pallets/inbound-queue",
"bridges/snowbridge/pallets/inbound-queue-v2",
"bridges/snowbridge/pallets/inbound-queue-v2/fixtures",
"bridges/snowbridge/pallets/inbound-queue/fixtures",
"bridges/snowbridge/pallets/outbound-queue",
"bridges/snowbridge/pallets/outbound-queue/merkle-tree",
"bridges/snowbridge/pallets/outbound-queue-v2",
"bridges/snowbridge/pallets/outbound-queue-v2/runtime-api",
"bridges/snowbridge/pallets/outbound-queue/runtime-api",
"bridges/snowbridge/pallets/system",
"bridges/snowbridge/pallets/system/runtime-api",
"bridges/snowbridge/primitives/beacon",
"bridges/snowbridge/primitives/core",
"bridges/snowbridge/primitives/ethereum",
"bridges/snowbridge/primitives/merkle-tree",
"bridges/snowbridge/primitives/router",
"bridges/snowbridge/runtime/runtime-common",
"bridges/snowbridge/runtime/test-common",
Expand Down Expand Up @@ -1201,13 +1205,17 @@ smoldot-light = { version = "0.9.0", default-features = false }
snowbridge-beacon-primitives = { path = "bridges/snowbridge/primitives/beacon", default-features = false }
snowbridge-core = { path = "bridges/snowbridge/primitives/core", default-features = false }
snowbridge-ethereum = { path = "bridges/snowbridge/primitives/ethereum", default-features = false }
snowbridge-outbound-queue-merkle-tree = { path = "bridges/snowbridge/pallets/outbound-queue/merkle-tree", default-features = false }
snowbridge-merkle-tree = { path = "bridges/snowbridge/primitives/merkle-tree", default-features = false }
snowbridge-outbound-queue-runtime-api = { path = "bridges/snowbridge/pallets/outbound-queue/runtime-api", default-features = false }
snowbridge-outbound-queue-runtime-api-v2 = { path = "bridges/snowbridge/pallets/outbound-queue-v2/runtime-api", default-features = false }
snowbridge-pallet-ethereum-client = { path = "bridges/snowbridge/pallets/ethereum-client", default-features = false }
snowbridge-pallet-ethereum-client-fixtures = { path = "bridges/snowbridge/pallets/ethereum-client/fixtures", default-features = false }
snowbridge-pallet-inbound-queue = { path = "bridges/snowbridge/pallets/inbound-queue", default-features = false }
snowbridge-pallet-inbound-queue-fixtures = { path = "bridges/snowbridge/pallets/inbound-queue/fixtures", default-features = false }
snowbridge-pallet-inbound-queue-fixtures-v2 = { path = "bridges/snowbridge/pallets/inbound-queue-v2/fixtures", default-features = false }
snowbridge-pallet-inbound-queue-v2 = { path = "bridges/snowbridge/pallets/inbound-queue-v2", default-features = false }
snowbridge-pallet-outbound-queue = { path = "bridges/snowbridge/pallets/outbound-queue", default-features = false }
snowbridge-pallet-outbound-queue-v2 = { path = "bridges/snowbridge/pallets/outbound-queue-v2", default-features = false }
snowbridge-pallet-system = { path = "bridges/snowbridge/pallets/system", default-features = false }
snowbridge-router-primitives = { path = "bridges/snowbridge/primitives/router", default-features = false }
snowbridge-runtime-common = { path = "bridges/snowbridge/runtime/runtime-common", default-features = false }
Expand Down
93 changes: 93 additions & 0 deletions bridges/snowbridge/pallets/inbound-queue-v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[package]
name = "snowbridge-pallet-inbound-queue-v2"
description = "Snowbridge Inbound Queue Pallet V2"
version = "0.2.0"
authors = ["Snowfork <[email protected]>"]
edition.workspace = true
repository.workspace = true
license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]

[lints]
workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
serde = { optional = true, workspace = true, default-features = true }
codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
hex-literal = { optional = true, workspace = true, default-features = true }
log = { workspace = true }
alloy-primitives = { features = ["rlp"], workspace = true }
alloy-sol-types = { workspace = true }

frame-benchmarking = { optional = true, workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-balances = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }

xcm = { workspace = true }
xcm-executor = { workspace = true }

snowbridge-core = { workspace = true }
snowbridge-router-primitives = { workspace = true }
snowbridge-beacon-primitives = { workspace = true }
snowbridge-pallet-inbound-queue-fixtures-v2 = { optional = true, workspace = true }

[dev-dependencies]
frame-benchmarking = { workspace = true, default-features = true }
sp-keyring = { workspace = true, default-features = true }
snowbridge-pallet-ethereum-client = { workspace = true, default-features = true }
hex-literal = { workspace = true, default-features = true }

[features]
default = ["std"]
std = [
"alloy-primitives/std",
"alloy-sol-types/std",
"codec/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-balances/std",
"scale-info/std",
"serde",
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"snowbridge-pallet-inbound-queue-fixtures-v2?/std",
"snowbridge-router-primitives/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm-executor/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"pallet-balances/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"snowbridge-pallet-ethereum-client/runtime-benchmarks",
"snowbridge-pallet-inbound-queue-fixtures-v2/runtime-benchmarks",
"snowbridge-router-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"snowbridge-pallet-ethereum-client/try-runtime",
"sp-runtime/try-runtime",
]
3 changes: 3 additions & 0 deletions bridges/snowbridge/pallets/inbound-queue-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ethereum Inbound Queue

Reads messages from Ethereum and sends it to intended destination on Polkadot, using XCM.
34 changes: 34 additions & 0 deletions bridges/snowbridge/pallets/inbound-queue-v2/fixtures/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "snowbridge-pallet-inbound-queue-fixtures-v2"
description = "Snowbridge Inbound Queue Test Fixtures V2"
version = "0.10.0"
authors = ["Snowfork <[email protected]>"]
edition.workspace = true
repository.workspace = true
license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]

[lints]
workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
hex-literal = { workspace = true, default-features = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
snowbridge-core = { workspace = true }
snowbridge-beacon-primitives = { workspace = true }

[features]
default = ["std"]
std = [
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"sp-core/std",
"sp-std/std",
]
runtime-benchmarks = [
"snowbridge-core/runtime-benchmarks",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]>
#![cfg_attr(not(feature = "std"), no_std)]

pub mod register_token;
pub mod send_token;
pub mod send_token_to_penpal;
Loading
Loading