Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
0f90a667
Commit
0f90a667
authored
1 year ago
by
Keith Yeung
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Document non-uniqueness of SetTopic IDs (#7579)
* Document non-uniqueness of SetTopic IDs * More comments on WithUniqueTopic
parent
ed7a0b87
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
polkadot/xcm/src/v3/mod.rs
+4
-0
4 additions, 0 deletions
polkadot/xcm/src/v3/mod.rs
polkadot/xcm/xcm-builder/src/barriers.rs
+3
-0
3 additions, 0 deletions
polkadot/xcm/xcm-builder/src/barriers.rs
polkadot/xcm/xcm-builder/src/routing.rs
+5
-0
5 additions, 0 deletions
polkadot/xcm/xcm-builder/src/routing.rs
with
12 additions
and
0 deletions
polkadot/xcm/src/v3/mod.rs
+
4
−
0
View file @
0f90a667
...
...
@@ -981,6 +981,10 @@ pub enum Instruction<Call> {
/// Set the Topic Register.
///
/// The 32-byte array identifier in the parameter is not guaranteed to be
/// unique; if such a property is desired, it is up to the code author to
/// enforce uniqueness.
///
/// Safety: No concerns.
///
/// Kind: *Instruction*
...
...
This diff is collapsed.
Click to expand it.
polkadot/xcm/xcm-builder/src/barriers.rs
+
3
−
0
View file @
0f90a667
...
...
@@ -207,6 +207,9 @@ impl<
/// Sets the message ID to `t` using a `SetTopic(t)` in the last position if present.
///
/// Note that the message ID does not necessarily have to be unique; it is the
/// sender's responsibility to ensure uniqueness.
///
/// Requires some inner barrier to pass on the rest of the message.
pub
struct
TrailingSetTopicAsId
<
InnerBarrier
>
(
PhantomData
<
InnerBarrier
>
);
impl
<
InnerBarrier
:
ShouldExecute
>
ShouldExecute
for
TrailingSetTopicAsId
<
InnerBarrier
>
{
...
...
This diff is collapsed.
Click to expand it.
polkadot/xcm/xcm-builder/src/routing.rs
+
5
−
0
View file @
0f90a667
...
...
@@ -25,6 +25,11 @@ use xcm::prelude::*;
/// appends one to the message filled with a universally unique ID. This ID is returned from a
/// successful `deliver`.
///
/// If the message does already end with a `SetTopic` instruction, then it is the responsibility
/// of the code author to ensure that the ID supplied to `SetTopic` is universally unique. Due to
/// this property, consumers of the topic ID must be aware that a user-supplied ID may not be
/// unique.
///
/// This is designed to be at the top-level of any routers, since it will always mutate the
/// passed `message` reference into a `None`. Don't try to combine it within a tuple except as the
/// last element.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment