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

[Feature] Added query param to /blocks that will also include messages #732

Closed
TarikGul opened this issue Oct 24, 2021 · 2 comments
Closed
Assignees
Labels
I8 - Enhancement Additional feature request Q5 - Hard Requires deep knowledge of Substrate

Comments

@TarikGul
Copy link
Member

cc: @joepetrowski

This is a rough idea of the proposed feature, but a query param for /blocks that will return all inbound and outbound messages for a single block. Outbound Messages could also be applied to their corresponding extrinsics (As oppose to just aggregating all messages for the block, and putting it in the top level of the response). This will also be extended to /blocks/{blockId}/extrinsics/{extrinsicIndex} as well.

Example types:

interface Block {
	// snip
        ...
	// Messages executed in this block, ordered. Any effects are in `onInitialize`.
	InboundMessages: [Message];
	// Messages sent to other chains.
	OutboundMessages: [Message];
}

interface Message {
	// Maybe a hash or something else. (Help.) Must match the UID of a `Message` on `Interlocutor`.
	UniqueIdentifier: Hash;
	// Message provenance or destination, depending on if this is inbound or outbound.
	Interlocutor: MultiLocation;
	// The XCM version used to send this message.
	XcmVersion: Int;
	// The actual, decoded call.
	Message: Call;
}
@TarikGul TarikGul added the I8 - Enhancement Additional feature request label Oct 24, 2021
@TarikGul TarikGul self-assigned this Mar 8, 2022
@TarikGul TarikGul added this to the XCM support for /blocks milestone Jun 23, 2022
@TarikGul TarikGul added Q5 - Hard Requires deep knowledge of Substrate A3 - In Progress PR in progress, not ready for review labels Jul 30, 2022
@jsdw jsdw removed this from the XCM support for /blocks milestone Aug 16, 2022
@TarikGul TarikGul removed their assignment Oct 21, 2022
@TarikGul TarikGul removed the A3 - In Progress PR in progress, not ready for review label Oct 21, 2022
@TarikGul
Copy link
Member Author

We have finished the first part where we decode xcm messages in current blocks, now we just need to finish messages that are in transit.

@Imod7
Copy link
Contributor

Imod7 commented Mar 21, 2024

Closing this issue since the second part (in transit messages) was also implemented with this PR.

@Imod7 Imod7 closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I8 - Enhancement Additional feature request Q5 - Hard Requires deep knowledge of Substrate
Projects
None yet
Development

No branches or pull requests

3 participants