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 #4

Open
wants to merge 131 commits into
base: snowbridge-v2
Choose a base branch
from
Open

Conversation

claravanstaden
Copy link
Owner

@claravanstaden claravanstaden commented Nov 21, 2024

  • Converts command to XCM
  • Create inbound queue pallet v2 for unordered delivery tracking
  • Use sparse bitmap for nonce tracking
  • Updates Westend runtime to include inbound pallet v2
  • Unit tests for command to XCM conversion
  • Dry-run runtime API to convert command to XCM for execution fee estimation on AH
  • Use SendController to send xcm
  • Config fee T::XcmPrologueFee: Balance
  • Burn fees for DOT prologue
  • XCM simulation test to calculate minimum prologue fee for 8 assets (add 2x buffer)
  • Integration tests for inbound message delivery v2

rockbmb and others added 8 commits November 20, 2024 01:10
# Description

paritytech#4613 introduced events
for `pallet_conviction_voting::{vote, remove_vote, remove_other_vote}`.
However:
1. it did not include `unlock`
2. the pallet's unit tests were missing an update

## Integration

N/A

## Review Notes

This is as paritytech#6261 was, so
it is a trivial change.
The default trie cache size before was set to `64MiB`, which is quite
low to achieve real speed ups. `1GiB` should be a reasonable number as
the requirements for validators/collators/full nodes are much higher
when it comes to minimum memory requirements. Also the cache will not
use `1GiB` from the start and fills over time. The setting can be
changed by setting `--trie-cache-size BYTE_SIZE`.

---------

Co-authored-by: GitHub Action <[email protected]>
This PR includes:  
- Refactored integrity tests to support standalone deployment of
`pallet-bridge-messages`.
- Refactored the `open_and_close_bridge_works` test case to support
multiple scenarios, such as:
  1. A local chain opening a bridge.  
  2. Sibling parachains opening a bridge.  
  3. The relay chain opening a bridge.  
- Previously, we added instance support for `pallet-bridge-relayer` but
overlooked updating the `DeliveryConfirmationPaymentsAdapter`.

---------

Co-authored-by: GitHub Action <[email protected]>
Part of:

- paritytech#6202.

---------

Signed-off-by: Xavier Lau <[email protected]>
Co-authored-by: Giuseppe Re <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
…#6522)

paritytech#3970 updated the
treasury pallet to support relay chain block number provider. However,
it added a constraint to the BlockNumberProvider to have the same block
number type as frame_system:

```rust
type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;
```

This PR removes that constraint as suggested by @gui1117
@claravanstaden claravanstaden marked this pull request as ready for review November 21, 2024 08:10
@claravanstaden claravanstaden mentioned this pull request Nov 21, 2024
athei and others added 6 commits November 21, 2024 09:13
The eth RPC tests fail sometimes because they run into a connect timeout
because the node takes a long time to start. This bumps the connect
timeout from 30 to 120 seconds. Locally they take around 40s for me.

As a drive by I also remove a apparently duplicated nextest config.

---------

Co-authored-by: ordian <[email protected]>
…aritytech#6553)

The `GossipEngine::poll_next` implementation polls both the
`notification_service` and the `sync_event_stream`.

If both polls produce valid data to be processed
(`Poll::Ready(Some(..))`), then the sync event is ignored when we
receive `NotificationEvent::NotificationStreamOpened` and the role
cannot be deduced.

This PR ensures both events are processed gracefully. While at it, I
have added a warning to the sync engine related to
`notification_service` producing `Poll::Ready(None)`.

This effectively ensures that `SyncEvents` propagate to the network
potentially fixing any state mismatch.


For more context: paritytech#6507

cc @paritytech/sdk-node

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Move spawning of the slot-based collator into the `run` function. Also
the tasks are being spawned as blocking task and not just as normal
tasks.

---------

Co-authored-by: GitHub Action <[email protected]>
# Description

This PR adds the required changes to release `polkadot`,
`polkadot-parachain` and `polkadot-omni-node` binaries built on Apple
Sillicon macos.

## Integration

This addresses requests from the community for such binaries: paritytech#802, and
they should be part of the Github release page.

## Review Notes

Test on paritytech-stg solely focused on macos binaries:
https://github.com/paritytech-stg/polkadot-sdk/actions/runs/11824692766/job/32946793308,
except the steps related to `pgpkms` (which need AWS credentials,
missing from paritytech-stg). The binary names don't have a `darwin-arm`
identifier, and conflict with the existing x86_64-linux binaries. I
haven't tested building everything on `paritytech-stg` because the
x86_64-linux builds run on `unbutu-latest-m` which isn't enabled on
`pairtytech-stg` (and I haven't asked CI team to enable one), so testing
how to go around naming conflicts should be covered next.

### TODO

- [x] Test the workflow start to end (especially the last bits related
to uploading the binaries on S3 and ensuring the previous binaries and
the new ones coexist harmoniously on S3/action artifacts storage without
naming conflicts) @EgorPopelyaev
- [x] Publish the arm binaries on the Github release page - to clarify
what's needed @iulianbarbu . Current practice is to manually publish the
binaries built via `release-build-rc.yml` workflow, taken from S3. Would
be great to have the binaries there in the first place before working on
automating this, but I would also do it in a follow up PR.

### Follow ups

- [ ] unify the binaries building under
`release-30_publish_release_draft.yml` maybe?
- [ ] automate binary artifacts upload to S3 in
`release-30_publish_release_draft.yml`

---------

Signed-off-by: Iulian Barbu <[email protected]>
Co-authored-by: EgorPopelyaev <[email protected]>
…ash amount is atleast ED (paritytech#6540)

This change prevents `pools::apply_slash` from being executed when the
pending slash amount of the member is lower than the ED.

The issue came to light with the failing [benchmark
test](https://github.com/polkadot-fellows/runtimes/actions/runs/11879471717/job/33101445269?pr=490#step:11:765)
in Kusama. The problem arises from the inexact conversion between points
and balance. Specifically, when points are converted to balance and then
back to points, rounding can introduce a small discrepancy between the
input and the resulting value. This issue surfaced in Kusama due to its
ED being different from Westend and Polkadot (1 UNIT/300), making the
rounding issue noticeable.

This fix is also significant because applying a slash is feeless and
permissionless. Allowing super small slash amounts to be applied without
a fee is undesirable. With this change, such small slashes will still be
applied but only when member funds are withdrawn.

---------

Co-authored-by: Dónal Murray <[email protected]>
…h#6560)

# Description

Reused as before the `properties` variable when defining a development
chain spec for parachain-template-node.

## Integration

N/A

## Review Notes

One line change, pretty self explanatory (it got lost within the history
of changes over the parachain-template-node/chain_spec.rs file). To be
honest, not really sure how useful it is, but I had the choice of
removing the `properties` var or reuse it as before, and I went with the
latter.

Signed-off-by: Iulian Barbu <[email protected]>
let network = EthereumNetwork::get();

let fee_asset = Location::new(1, Here);
let fee_value = 1_000_000_000u128; // TODO get from command
Copy link

Choose a reason for hiding this comment

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

bridges/snowbridge/primitives/core/src/sparse_bitmap.rs Outdated Show resolved Hide resolved
bridges/snowbridge/pallets/inbound-queue-v2/src/lib.rs Outdated Show resolved Hide resolved
bridges/snowbridge/pallets/inbound-queue-v2/src/lib.rs Outdated Show resolved Hide resolved
bridges/snowbridge/pallets/inbound-queue-v2/src/lib.rs Outdated Show resolved Hide resolved
bridges/snowbridge/pallets/inbound-queue-v2/src/lib.rs Outdated Show resolved Hide resolved
pgherveou and others added 12 commits November 21, 2024 20:44
Add support for all eth tx types
Note that js libs will continue to use the Legacy type since we don't
include base_fee_per_gas yet in the block.
We can think about setting these values after we revisit how we encode
the gas into weight & deposit_limit in a follow up PR

---------

Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
…tech#5723)

Step in paritytech#3268

This PR adds the ability for these pallets to specify their source of
the block number. This is useful when these pallets are migrated from
the relay chain to a parachain and vice versa.

This change is backwards compatible:
1. If the `BlockNumberProvider` continues to use the system pallet's
block number
2. When a pallet deployed on the relay chain is moved to a parachain,
but still uses the relay chain's block number

However, we would need migrations if the deployed pallets are upgraded
on an existing parachain, and the `BlockNumberProvider` uses the relay
chain block number.

---------

Co-authored-by: Kian Paimani <[email protected]>
…ch#6605)

Before this was done for every imported transaction. When a lot of
transactions got imported, the import notification channel was filled.
The underlying problem was that the `status` call is read locking the
`validated_pool` which will be write locked by the internal submitting
logic. Thus, the submitting and status reading was interferring which
each other.

---------

Co-authored-by: GitHub Action <[email protected]>
Fixes paritytech#6209

This PR adds the support for cfg attributes in the runtime macro.

---------

Co-authored-by: Bastian Köcher <[email protected]>
claravanstaden and others added 19 commits December 5, 2024 09:11
…#6636)

# Description
These changes should enhance the quality of benchmark results by
excluding worker initialization time from the measurements and reducing
the overall duration of the benchmarks.

### Integration
It should not affect any downstream projects.

### Review Notes
- Workers initialize once per benchmark to avoid side effects.  
- The listen address is assigned when a worker starts.  
- Benchmarks are divided into two groups by size to create better charts
for comparison.

---------

Co-authored-by: GitHub Action <[email protected]>
…tytech#6760)

This PR ensures that substrate always reports discarded items as zero.
This is needed to align with the rpc-v2 spec

Closes: paritytech#6683


cc @paritytech/subxt-team

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Re-enable zombienet test for `solochain`.
Thx!
We were trapping the host context in case a sub call was exhausting the
storage deposit limit set for this sub call. This prevents the caller
from handling this error. In this PR we added a new error code that is
returned when either gas or storage deposit limit is exhausted by the
sub call.

We also remove the longer used `NotCallable` error. No longer used
because this is no longer an error: It will just be a balance transfer.

We also make `set_code_hash` infallible to be consistent with other host
functions which just trap on any error condition.

---------

Co-authored-by: GitHub Action <[email protected]>
Fix adds release environment to the backport job, so that token could be
properly generated
…ns (paritytech#6643)

Closes: paritytech#6585

Removing the `require_weight_at_most` parameter in V5 Transact had only
one problem. Converting a message from V5 to V4 to send to chains that
didn't upgrade yet. The conversion would not know what weight to give to
the Transact, since V4 and below require it.

To fix this, I added back the weight in the form of an `Option<Weight>`
called `fallback_max_weight`. This can be set to `None` if you don't
intend to deal with a chain that hasn't upgraded yet. If you set it to
`Some(_)`, the behaviour is the same. The plan is to totally remove this
in V6 since there will be a good conversion path from V6 to V5.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
The `debug` level in `sc-basic-authorship` is now less spammy.
Previously it was outputing logs per individual transactions. It was
quite hard to follow the logs (and also generates unneeded traffic in
grafana).

Now `debug` level only show some internal details, without spamming
output with per-transaction logs. They were moved to `trace` level.

I also added the `EndProposingReason` to the summary INFO message. This
allows us to know what was the block limit (which is very useful for
debugging).

Example:
```
🎁 Prepared block for proposing at 64 (1186 ms) hash: 0x4b5386c13c507d0dbab319ac054cc1bcfa08311e184452221ad07f12ecc6091c; parent_hash: 0x157c…ca5e; end: HitBlockWeightLimit; extrinsics_count: 7032; 
```

---------

Co-authored-by: GitHub Action <[email protected]>
@claravanstaden
Copy link
Owner Author

Closing in favour of paritytech#6697.

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.