@substrate/api-sidecar 20.7.3 → 20.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/Specs.js +1 -0
- package/build/src/Specs.js.map +1 -1
- package/build/src/chains-config/assetHubKusamaControllers.js +2 -0
- package/build/src/chains-config/assetHubKusamaControllers.js.map +1 -1
- package/build/src/chains-config/assetHubNextWestendControllers.js +2 -0
- package/build/src/chains-config/assetHubNextWestendControllers.js.map +1 -1
- package/build/src/chains-config/assetHubPolkadotControllers.js +2 -0
- package/build/src/chains-config/assetHubPolkadotControllers.js.map +1 -1
- package/build/src/chains-config/assetHubWestendControllers.js +2 -0
- package/build/src/chains-config/assetHubWestendControllers.js.map +1 -1
- package/build/src/chains-config/defaultControllers.js +1 -0
- package/build/src/chains-config/defaultControllers.js.map +1 -1
- package/build/src/chains-config/index.js +8 -1
- package/build/src/chains-config/index.js.map +1 -1
- package/build/src/chains-config/kusamaControllers.js +1 -0
- package/build/src/chains-config/kusamaControllers.js.map +1 -1
- package/build/src/chains-config/polkadotControllers.js +1 -0
- package/build/src/chains-config/polkadotControllers.js.map +1 -1
- package/build/src/chains-config/westendControllers.js +1 -0
- package/build/src/chains-config/westendControllers.js.map +1 -1
- package/build/src/controllers/AbstractController.d.ts +1 -1
- package/build/src/controllers/AbstractController.js +8 -7
- package/build/src/controllers/AbstractController.js.map +1 -1
- package/build/src/controllers/blocks/BlocksController.js +251 -186
- package/build/src/controllers/blocks/BlocksController.js.map +1 -1
- package/build/src/controllers/blocks/BlocksExtrinsicsController.js +52 -48
- package/build/src/controllers/blocks/BlocksExtrinsicsController.js.map +1 -1
- package/build/src/controllers/blocks/BlocksParaInclusionsController.d.ts +19 -0
- package/build/src/controllers/blocks/BlocksParaInclusionsController.js +52 -0
- package/build/src/controllers/blocks/BlocksParaInclusionsController.js.map +1 -0
- package/build/src/controllers/blocks/BlocksRawExtrinsicsController.js +18 -14
- package/build/src/controllers/blocks/BlocksRawExtrinsicsController.js.map +1 -1
- package/build/src/controllers/blocks/index.d.ts +1 -0
- package/build/src/controllers/blocks/index.js +3 -1
- package/build/src/controllers/blocks/index.js.map +1 -1
- package/build/src/controllers/index.d.ts +7 -4
- package/build/src/controllers/index.js +4 -1
- package/build/src/controllers/index.js.map +1 -1
- package/build/src/controllers/paras/ParasInclusionController.d.ts +16 -0
- package/build/src/controllers/paras/ParasInclusionController.js +71 -0
- package/build/src/controllers/paras/ParasInclusionController.js.map +1 -0
- package/build/src/controllers/paras/index.d.ts +1 -0
- package/build/src/controllers/paras/index.js +3 -1
- package/build/src/controllers/paras/index.js.map +1 -1
- package/build/src/controllers/rc/blocks/RcBlocksParaInclusionsController.d.ts +19 -0
- package/build/src/controllers/rc/blocks/RcBlocksParaInclusionsController.js +59 -0
- package/build/src/controllers/rc/blocks/RcBlocksParaInclusionsController.js.map +1 -0
- package/build/src/controllers/rc/blocks/index.d.ts +1 -0
- package/build/src/controllers/rc/blocks/index.js +3 -1
- package/build/src/controllers/rc/blocks/index.js.map +1 -1
- package/build/src/services/blocks/BlocksParaInclusionsService.d.ts +17 -0
- package/build/src/services/blocks/BlocksParaInclusionsService.js +85 -0
- package/build/src/services/blocks/BlocksParaInclusionsService.js.map +1 -0
- package/build/src/services/blocks/index.d.ts +1 -0
- package/build/src/services/blocks/index.js +1 -0
- package/build/src/services/blocks/index.js.map +1 -1
- package/build/src/services/paras/ParasInclusionService.d.ts +24 -0
- package/build/src/services/paras/ParasInclusionService.js +110 -0
- package/build/src/services/paras/ParasInclusionService.js.map +1 -0
- package/build/src/services/paras/index.d.ts +1 -0
- package/build/src/services/paras/index.js +1 -0
- package/build/src/services/paras/index.js.map +1 -1
- package/build/src/types/responses/BlockParaInclusions.d.ts +77 -0
- package/build/src/types/responses/BlockParaInclusions.js +18 -0
- package/build/src/types/responses/BlockParaInclusions.js.map +1 -0
- package/build/src/types/responses/ParachainInclusion.d.ts +8 -0
- package/build/src/types/responses/ParachainInclusion.js +18 -0
- package/build/src/types/responses/ParachainInclusion.js.map +1 -0
- package/build/src/types/responses/index.d.ts +2 -0
- package/build/src/types/responses/index.js +2 -0
- package/build/src/types/responses/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,11 +18,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.RcBlocksTrace = exports.RcBlocksRawExtrinsics = exports.RcBlocksExtrinsics = exports.RcBlocks = void 0;
|
|
21
|
+
exports.RcBlocksTrace = exports.RcBlocksRawExtrinsics = exports.RcBlocksParaInclusions = exports.RcBlocksExtrinsics = exports.RcBlocks = void 0;
|
|
22
22
|
var RcBlocksController_1 = require("./RcBlocksController");
|
|
23
23
|
Object.defineProperty(exports, "RcBlocks", { enumerable: true, get: function () { return __importDefault(RcBlocksController_1).default; } });
|
|
24
24
|
var RcBlocksExtrinsicsController_1 = require("./RcBlocksExtrinsicsController");
|
|
25
25
|
Object.defineProperty(exports, "RcBlocksExtrinsics", { enumerable: true, get: function () { return __importDefault(RcBlocksExtrinsicsController_1).default; } });
|
|
26
|
+
var RcBlocksParaInclusionsController_1 = require("./RcBlocksParaInclusionsController");
|
|
27
|
+
Object.defineProperty(exports, "RcBlocksParaInclusions", { enumerable: true, get: function () { return __importDefault(RcBlocksParaInclusionsController_1).default; } });
|
|
26
28
|
var RcBlocksRawExtrinsicsController_1 = require("./RcBlocksRawExtrinsicsController");
|
|
27
29
|
Object.defineProperty(exports, "RcBlocksRawExtrinsics", { enumerable: true, get: function () { return __importDefault(RcBlocksRawExtrinsicsController_1).default; } });
|
|
28
30
|
var RcBlocksTraceController_1 = require("./RcBlocksTraceController");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/controllers/rc/blocks/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;AAExE,2DAA2D;AAAlD,+HAAA,OAAO,OAAY;AAC5B,+EAA+E;AAAtE,mJAAA,OAAO,OAAsB;AACtC,qFAAqF;AAA5E,yJAAA,OAAO,OAAyB;AACzC,qEAAqE;AAA5D,yIAAA,OAAO,OAAiB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/controllers/rc/blocks/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;AAExE,2DAA2D;AAAlD,+HAAA,OAAO,OAAY;AAC5B,+EAA+E;AAAtE,mJAAA,OAAO,OAAsB;AACtC,uFAAuF;AAA9E,2JAAA,OAAO,OAA0B;AAC1C,qFAAqF;AAA5E,yJAAA,OAAO,OAAyB;AACzC,qEAAqE;AAA5D,yIAAA,OAAO,OAAiB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BlockHash } from '@polkadot/types/interfaces';
|
|
2
|
+
import { IBlockParaInclusions } from '../../types/responses';
|
|
3
|
+
import { AbstractService } from '../AbstractService';
|
|
4
|
+
/**
|
|
5
|
+
* Service for fetching parachain inclusion information from relay chain blocks
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlocksParaInclusionsService extends AbstractService {
|
|
8
|
+
constructor(api: string);
|
|
9
|
+
/**
|
|
10
|
+
* Fetch all decoded parachain inclusion information for a relay chain block
|
|
11
|
+
*
|
|
12
|
+
* @param hash - The relay chain block hash to query
|
|
13
|
+
* @param paraIdFilter - Optional parachain ID to filter results
|
|
14
|
+
* @returns IBlockParaInclusions containing all parachain inclusions in the block
|
|
15
|
+
*/
|
|
16
|
+
fetchParaInclusions(hash: BlockHash, paraIdFilter?: number): Promise<IBlockParaInclusions>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2017-2025 Parity Technologies (UK) Ltd.
|
|
3
|
+
// This file is part of Substrate API Sidecar.
|
|
4
|
+
//
|
|
5
|
+
// Substrate API Sidecar is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU General Public License
|
|
16
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BlocksParaInclusionsService = void 0;
|
|
19
|
+
const http_errors_1 = require("http-errors");
|
|
20
|
+
const AbstractService_1 = require("../AbstractService");
|
|
21
|
+
/**
|
|
22
|
+
* Service for fetching parachain inclusion information from relay chain blocks
|
|
23
|
+
*/
|
|
24
|
+
class BlocksParaInclusionsService extends AbstractService_1.AbstractService {
|
|
25
|
+
constructor(api) {
|
|
26
|
+
super(api);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetch all decoded parachain inclusion information for a relay chain block
|
|
30
|
+
*
|
|
31
|
+
* @param hash - The relay chain block hash to query
|
|
32
|
+
* @param paraIdFilter - Optional parachain ID to filter results
|
|
33
|
+
* @returns IBlockParaInclusions containing all parachain inclusions in the block
|
|
34
|
+
*/
|
|
35
|
+
async fetchParaInclusions(hash, paraIdFilter) {
|
|
36
|
+
const { api } = this;
|
|
37
|
+
const [apiAt, header] = await Promise.all([api.at(hash), api.rpc.chain.getHeader(hash)]);
|
|
38
|
+
const events = await apiAt.query.system.events();
|
|
39
|
+
const inclusionEvents = events.filter((record) => {
|
|
40
|
+
return record.event.section === 'paraInclusion' && record.event.method === 'CandidateIncluded';
|
|
41
|
+
});
|
|
42
|
+
if (inclusionEvents.length === 0) {
|
|
43
|
+
throw new http_errors_1.BadRequest(`Block ${header.number.toString()} on chain ${this.specName} doesn't have the paraInclusion event`);
|
|
44
|
+
}
|
|
45
|
+
const inclusions = inclusionEvents.map((record) => {
|
|
46
|
+
const eventData = record.event.data;
|
|
47
|
+
const candidateReceipt = eventData[0].toJSON();
|
|
48
|
+
const descriptor = candidateReceipt.descriptor;
|
|
49
|
+
const headData = eventData[1];
|
|
50
|
+
const header = apiAt.registry.createType('Header', headData);
|
|
51
|
+
const paraBlockNumber = header.number.toNumber();
|
|
52
|
+
const paraBlockHash = header.hash.toString();
|
|
53
|
+
const coreIndex = eventData[2].toString();
|
|
54
|
+
const groupIndex = eventData[3].toString();
|
|
55
|
+
return {
|
|
56
|
+
paraId: descriptor.paraId.toString(),
|
|
57
|
+
paraBlockNumber,
|
|
58
|
+
paraBlockHash,
|
|
59
|
+
descriptor: {
|
|
60
|
+
relayParent: descriptor.relayParent.toString(),
|
|
61
|
+
persistedValidationDataHash: descriptor.persistedValidationDataHash.toString(),
|
|
62
|
+
povHash: descriptor.povHash.toString(),
|
|
63
|
+
erasureRoot: descriptor.erasureRoot.toString(),
|
|
64
|
+
paraHead: descriptor.paraHead.toString(),
|
|
65
|
+
validationCodeHash: descriptor.validationCodeHash.toString(),
|
|
66
|
+
},
|
|
67
|
+
commitmentsHash: candidateReceipt.commitmentsHash.toString(),
|
|
68
|
+
coreIndex,
|
|
69
|
+
groupIndex,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const filteredInclusions = paraIdFilter !== undefined
|
|
73
|
+
? inclusions.filter((inclusion) => parseInt(inclusion.paraId) === paraIdFilter)
|
|
74
|
+
: inclusions;
|
|
75
|
+
return {
|
|
76
|
+
at: {
|
|
77
|
+
hash: hash.toString(),
|
|
78
|
+
height: header.number.toString(),
|
|
79
|
+
},
|
|
80
|
+
inclusions: filteredInclusions.sort((a, b) => parseInt(a.paraId) - parseInt(b.paraId)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.BlocksParaInclusionsService = BlocksParaInclusionsService;
|
|
85
|
+
//# sourceMappingURL=BlocksParaInclusionsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlocksParaInclusionsService.js","sourceRoot":"","sources":["../../../../src/services/blocks/BlocksParaInclusionsService.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;AAIxE,6CAAyC;AAGzC,wDAAqD;AAErD;;GAEG;AACH,MAAa,2BAA4B,SAAQ,iCAAe;IAC/D,YAAY,GAAW;QACtB,KAAK,CAAC,GAAG,CAAC,CAAC;IACZ,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,mBAAmB,CAAC,IAAe,EAAE,YAAqB;QAC/D,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAErB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,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
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
__exportStar(require("./BlocksParaInclusionsService"), exports);
|
|
32
33
|
__exportStar(require("./BlocksService"), exports);
|
|
33
34
|
__exportStar(require("./BlocksTraceService"), exports);
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/blocks/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;;;;;;;;;;;AAExE,kDAAgC;AAChC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/blocks/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;;;;;;;;;;;AAExE,gEAA8C;AAC9C,kDAAgC;AAChC,uDAAqC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BlockHash } from '@polkadot/types/interfaces';
|
|
2
|
+
import { u32 } from '@polkadot/types-codec';
|
|
3
|
+
import { IParachainInclusion } from '../../types/responses';
|
|
4
|
+
import { AbstractService } from '../AbstractService';
|
|
5
|
+
export declare class ParasInclusionService extends AbstractService {
|
|
6
|
+
constructor(api: string);
|
|
7
|
+
/**
|
|
8
|
+
* Find the relay chain inclusion information for a specific parachain block.
|
|
9
|
+
*
|
|
10
|
+
* @param hash - The relay chain block hash to start searching from
|
|
11
|
+
* @param blockNumber - The parachain block number
|
|
12
|
+
* @param depth - Search depth (defaults to 10)
|
|
13
|
+
*/
|
|
14
|
+
getParachainInclusion(hash: BlockHash, paraId: u32, number: string, depth?: number): Promise<IParachainInclusion>;
|
|
15
|
+
/**
|
|
16
|
+
* Search relay chain blocks for inclusion of a specific parachain block
|
|
17
|
+
* Uses optimized candidate_events runtime API when available, falls back to system events for historical support
|
|
18
|
+
*/
|
|
19
|
+
private searchForInclusion;
|
|
20
|
+
/**
|
|
21
|
+
* Search using system events
|
|
22
|
+
*/
|
|
23
|
+
private searchWithSystemEvents;
|
|
24
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2017-2025 Parity Technologies (UK) Ltd.
|
|
3
|
+
// This file is part of Substrate API Sidecar.
|
|
4
|
+
//
|
|
5
|
+
// Substrate API Sidecar is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU General Public License
|
|
16
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ParasInclusionService = void 0;
|
|
19
|
+
const apiRegistry_1 = require("../../apiRegistry");
|
|
20
|
+
const AbstractService_1 = require("../AbstractService");
|
|
21
|
+
class ParasInclusionService extends AbstractService_1.AbstractService {
|
|
22
|
+
constructor(api) {
|
|
23
|
+
super(api);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Find the relay chain inclusion information for a specific parachain block.
|
|
27
|
+
*
|
|
28
|
+
* @param hash - The relay chain block hash to start searching from
|
|
29
|
+
* @param blockNumber - The parachain block number
|
|
30
|
+
* @param depth - Search depth (defaults to 10)
|
|
31
|
+
*/
|
|
32
|
+
async getParachainInclusion(hash, paraId, number, depth = 10) {
|
|
33
|
+
var _a;
|
|
34
|
+
const { api } = this;
|
|
35
|
+
const rcApi = (_a = apiRegistry_1.ApiPromiseRegistry.getApiByType('relay')[0]) === null || _a === void 0 ? void 0 : _a.api;
|
|
36
|
+
if (!rcApi) {
|
|
37
|
+
throw new Error('Relay chain api must be available');
|
|
38
|
+
}
|
|
39
|
+
const [apiAt, { block }] = await Promise.all([api.at(hash), api.rpc.chain.getBlock(hash)]);
|
|
40
|
+
const setValidationData = block.extrinsics.find((ext) => {
|
|
41
|
+
return ext.method.method.toString() === 'setValidationData';
|
|
42
|
+
});
|
|
43
|
+
if (!setValidationData) {
|
|
44
|
+
throw new Error("Block contains no set validation data. Can't find relayParentNumber");
|
|
45
|
+
}
|
|
46
|
+
const callArgs = apiAt.registry.createType('Call', setValidationData.method);
|
|
47
|
+
const { relayParentNumber } = callArgs.toJSON().args.data.validationData;
|
|
48
|
+
// Search for inclusion starting from relay_parent_number + 1
|
|
49
|
+
const inclusionNumber = await this.searchForInclusion(rcApi, paraId.toNumber(), number, // parachain block number
|
|
50
|
+
relayParentNumber, depth);
|
|
51
|
+
// For now, return a placeholder response
|
|
52
|
+
return {
|
|
53
|
+
parachainBlock: parseInt(number, 10),
|
|
54
|
+
parachainBlockHash: hash.toString(),
|
|
55
|
+
parachainId: paraId.toNumber(),
|
|
56
|
+
relayParentNumber,
|
|
57
|
+
inclusionNumber: inclusionNumber || null,
|
|
58
|
+
found: inclusionNumber !== null,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Search relay chain blocks for inclusion of a specific parachain block
|
|
63
|
+
* Uses optimized candidate_events runtime API when available, falls back to system events for historical support
|
|
64
|
+
*/
|
|
65
|
+
async searchForInclusion(rcApi, paraId, parachainBlockNumber, relayParentNumber, maxDepth) {
|
|
66
|
+
return this.searchWithSystemEvents(rcApi, paraId, parachainBlockNumber, relayParentNumber, maxDepth);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Search using system events
|
|
70
|
+
*/
|
|
71
|
+
async searchWithSystemEvents(rcApi, paraId, parachainBlockNumber, relayParentNumber, maxDepth) {
|
|
72
|
+
// The number is 5 here since most searches are relative to 2-4 blocks from the `relayParentNumber`.
|
|
73
|
+
// Therefore we give 1 extra block for extra room, while also minimizing the amount of searches we do.
|
|
74
|
+
const BATCH_SIZE = 5;
|
|
75
|
+
// Search in batches of 5 for optimal performance
|
|
76
|
+
for (let offset = 0; offset < maxDepth; offset += BATCH_SIZE) {
|
|
77
|
+
const batchSize = Math.min(BATCH_SIZE, maxDepth - offset);
|
|
78
|
+
const searchBlocks = Array.from({ length: batchSize }, (_, i) => relayParentNumber + offset + i + 1);
|
|
79
|
+
const searchPromises = searchBlocks.map(async (blockNum) => {
|
|
80
|
+
try {
|
|
81
|
+
const relayBlockHash = await rcApi.rpc.chain.getBlockHash(blockNum);
|
|
82
|
+
const rcApiAt = await rcApi.at(relayBlockHash);
|
|
83
|
+
const events = await rcApiAt.query.system.events();
|
|
84
|
+
const foundInclusion = events.find((record) => {
|
|
85
|
+
if (record.event.section === 'paraInclusion' && record.event.method === 'CandidateIncluded') {
|
|
86
|
+
const eventData = record.event.data[0].toJSON();
|
|
87
|
+
if (eventData.descriptor.paraId === paraId) {
|
|
88
|
+
const header = rcApiAt.registry.createType('Header', record.event.data[1]);
|
|
89
|
+
return header.number.toString() === parachainBlockNumber;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
});
|
|
94
|
+
return foundInclusion ? blockNum : null;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const results = await Promise.all(searchPromises);
|
|
101
|
+
const found = results.find((result) => result !== null);
|
|
102
|
+
if (found) {
|
|
103
|
+
return found; // Early termination when found in this batch
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return null; // Not found within search depth
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.ParasInclusionService = ParasInclusionService;
|
|
110
|
+
//# sourceMappingURL=ParasInclusionService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParasInclusionService.js","sourceRoot":"","sources":["../../../../src/services/paras/ParasInclusionService.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;AAMxE,mDAAuD;AAEvD,wDAAqD;AAkBrD,MAAa,qBAAsB,SAAQ,iCAAe;IACzD,YAAY,GAAW;QACtB,KAAK,CAAC,GAAG,CAAC,CAAC;IACZ,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,qBAAqB,CAAC,IAAe,EAAE,MAAW,EAAE,MAAc,EAAE,KAAK,GAAG,EAAE;;QACnF,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QACrB,MAAM,KAAK,GAAG,MAAA,gCAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,0CAAE,GAAG,CAAC;QAE/D,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACtD,CAAC;QAED,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,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BAAmB,EAAE,CAAC;4BAC7F,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAA+B,CAAC;4BAC7E,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;gCAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gCAC3E,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,oBAAoB,CAAC;4BAC1D,CAAC;wBACF,CAAC;wBACD,OAAO,KAAK,CAAC;oBACd,CAAC,CAAC,CAAC;oBAEH,OAAO,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;gBACzC,CAAC;gBAAC,MAAM,CAAC;oBACR,OAAO,IAAI,CAAC;gBACb,CAAC;YACF,CAAC,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YAClD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;YAExD,IAAI,KAAK,EAAE,CAAC;gBACX,OAAO,KAAK,CAAC,CAAC,6CAA6C;YAC5D,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,CAAC,gCAAgC;IAC9C,CAAC;CACD;AAvHD,sDAuHC"}
|
|
@@ -29,5 +29,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
__exportStar(require("./ParasInclusionService"), exports);
|
|
32
33
|
__exportStar(require("./ParasService"), exports);
|
|
33
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/paras/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;;;;;;;;;;;AAExE,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/paras/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;;;;;;;;;;;AAExE,0DAAwC;AACxC,iDAA+B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { IAt } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* Response type for /blocks/{blockId}/para-inclusions endpoint
|
|
4
|
+
* Contains all decoded parachain inclusion information for a relay chain block
|
|
5
|
+
*/
|
|
6
|
+
export interface IBlockParaInclusions {
|
|
7
|
+
/**
|
|
8
|
+
* Block height and hash at which the query was made
|
|
9
|
+
*/
|
|
10
|
+
at: IAt;
|
|
11
|
+
/**
|
|
12
|
+
* Array of parachain inclusions in this relay chain block
|
|
13
|
+
*/
|
|
14
|
+
inclusions: IParaInclusion[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Information about a single parachain inclusion event
|
|
18
|
+
*/
|
|
19
|
+
export interface IParaInclusion {
|
|
20
|
+
/**
|
|
21
|
+
* The parachain ID
|
|
22
|
+
*/
|
|
23
|
+
paraId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The parachain block number that was included (decoded from HeadData)
|
|
26
|
+
*/
|
|
27
|
+
paraBlockNumber: number;
|
|
28
|
+
/**
|
|
29
|
+
* The parachain block hash that was included (decoded from HeadData)
|
|
30
|
+
*/
|
|
31
|
+
paraBlockHash: string;
|
|
32
|
+
/**
|
|
33
|
+
* Candidate descriptor containing parachain inclusion metadata
|
|
34
|
+
*/
|
|
35
|
+
descriptor: IParaInclusionDescriptor;
|
|
36
|
+
/**
|
|
37
|
+
* Hash of the candidate commitments
|
|
38
|
+
*/
|
|
39
|
+
commitmentsHash: string;
|
|
40
|
+
/**
|
|
41
|
+
* Core index (available in data[2])
|
|
42
|
+
*/
|
|
43
|
+
coreIndex: string;
|
|
44
|
+
/**
|
|
45
|
+
* Group index (available in data[3])
|
|
46
|
+
*/
|
|
47
|
+
groupIndex: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Candidate descriptor from the parachain inclusion event
|
|
51
|
+
*/
|
|
52
|
+
export interface IParaInclusionDescriptor {
|
|
53
|
+
/**
|
|
54
|
+
* The relay chain parent block hash
|
|
55
|
+
*/
|
|
56
|
+
relayParent: string;
|
|
57
|
+
/**
|
|
58
|
+
* Hash of the persisted validation data
|
|
59
|
+
*/
|
|
60
|
+
persistedValidationDataHash: string;
|
|
61
|
+
/**
|
|
62
|
+
* Hash of the Proof of Validity (PoV)
|
|
63
|
+
*/
|
|
64
|
+
povHash: string;
|
|
65
|
+
/**
|
|
66
|
+
* Root hash of the erasure encoding
|
|
67
|
+
*/
|
|
68
|
+
erasureRoot: string;
|
|
69
|
+
/**
|
|
70
|
+
* Hash of the parachain head data
|
|
71
|
+
*/
|
|
72
|
+
paraHead: string;
|
|
73
|
+
/**
|
|
74
|
+
* Hash of the validation code
|
|
75
|
+
*/
|
|
76
|
+
validationCodeHash: string;
|
|
77
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2017-2025 Parity Technologies (UK) Ltd.
|
|
3
|
+
// This file is part of Substrate API Sidecar.
|
|
4
|
+
//
|
|
5
|
+
// Substrate API Sidecar is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU General Public License
|
|
16
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=BlockParaInclusions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockParaInclusions.js","sourceRoot":"","sources":["../../../../src/types/responses/BlockParaInclusions.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2017-2025 Parity Technologies (UK) Ltd.
|
|
3
|
+
// This file is part of Substrate API Sidecar.
|
|
4
|
+
//
|
|
5
|
+
// Substrate API Sidecar is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU General Public License
|
|
16
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=ParachainInclusion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParachainInclusion.js","sourceRoot":"","sources":["../../../../src/types/responses/ParachainInclusion.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE"}
|
|
@@ -9,6 +9,7 @@ export * from './AccountVestingInfo';
|
|
|
9
9
|
export * from './Assets';
|
|
10
10
|
export * from './At';
|
|
11
11
|
export * from './Block';
|
|
12
|
+
export * from './BlockParaInclusions';
|
|
12
13
|
export * from './BlockRaw';
|
|
13
14
|
export * from './BlockXCMMessages';
|
|
14
15
|
export * from './Coretime';
|
|
@@ -36,6 +37,7 @@ export * from './PalletStakingProgress';
|
|
|
36
37
|
export * from './PalletStakingValidators';
|
|
37
38
|
export * from './PalletStorage';
|
|
38
39
|
export * from './PalletStorageItem';
|
|
40
|
+
export * from './ParachainInclusion';
|
|
39
41
|
export * from './Paras';
|
|
40
42
|
export * from './Payout';
|
|
41
43
|
export * from './PoolAssets';
|
|
@@ -40,6 +40,7 @@ __exportStar(require("./AccountVestingInfo"), exports);
|
|
|
40
40
|
__exportStar(require("./Assets"), exports);
|
|
41
41
|
__exportStar(require("./At"), exports);
|
|
42
42
|
__exportStar(require("./Block"), exports);
|
|
43
|
+
__exportStar(require("./BlockParaInclusions"), exports);
|
|
43
44
|
__exportStar(require("./BlockRaw"), exports);
|
|
44
45
|
__exportStar(require("./BlockXCMMessages"), exports);
|
|
45
46
|
__exportStar(require("./Coretime"), exports);
|
|
@@ -67,6 +68,7 @@ __exportStar(require("./PalletStakingProgress"), exports);
|
|
|
67
68
|
__exportStar(require("./PalletStakingValidators"), exports);
|
|
68
69
|
__exportStar(require("./PalletStorage"), exports);
|
|
69
70
|
__exportStar(require("./PalletStorageItem"), exports);
|
|
71
|
+
__exportStar(require("./ParachainInclusion"), exports);
|
|
70
72
|
__exportStar(require("./Paras"), exports);
|
|
71
73
|
__exportStar(require("./Payout"), exports);
|
|
72
74
|
__exportStar(require("./PoolAssets"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/responses/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;;;;;;;;;;;AAExE,kDAAgC;AAChC,uDAAqC;AACrC,mDAAiC;AACjC,sDAAoC;AACpC,qDAAmC;AACnC,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC;AACrC,2CAAyB;AACzB,uCAAqB;AACrB,0CAAwB;AACxB,6CAA2B;AAC3B,qDAAmC;AACnC,6CAA2B;AAC3B,+CAA6B;AAC7B,8CAA4B;AAC5B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,wDAAsC;AACtC,gDAA8B;AAC9B,2CAAyB;AACzB,0DAAwC;AACxC,oDAAkC;AAClC,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,0DAAwC;AACxC,2DAAyC;AACzC,0DAAwC;AACxC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACpC,0CAAwB;AACxB,2CAAyB;AACzB,+CAA6B;AAC7B,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,mDAAiC;AACjC,+DAA6C;AAC7C,iEAA+C;AAC/C,sDAAoC;AACpC,wDAAsC;AACtC,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/responses/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE;;;;;;;;;;;;;;;;AAExE,kDAAgC;AAChC,uDAAqC;AACrC,mDAAiC;AACjC,sDAAoC;AACpC,qDAAmC;AACnC,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC;AACrC,2CAAyB;AACzB,uCAAqB;AACrB,0CAAwB;AACxB,wDAAsC;AACtC,6CAA2B;AAC3B,qDAAmC;AACnC,6CAA2B;AAC3B,+CAA6B;AAC7B,8CAA4B;AAC5B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,wDAAsC;AACtC,gDAA8B;AAC9B,2CAAyB;AACzB,0DAAwC;AACxC,oDAAkC;AAClC,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,0DAAwC;AACxC,2DAAyC;AACzC,0DAAwC;AACxC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACpC,uDAAqC;AACrC,0CAAwB;AACxB,2CAAyB;AACzB,+CAA6B;AAC7B,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,mDAAiC;AACjC,+DAA6C;AAC7C,iEAA+C;AAC/C,sDAAoC;AACpC,wDAAsC;AACtC,oDAAkC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "20.
|
|
2
|
+
"version": "20.9.0",
|
|
3
3
|
"name": "@substrate/api-sidecar",
|
|
4
4
|
"description": "REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.",
|
|
5
5
|
"homepage": "https://github.com/paritytech/substrate-api-sidecar#readme",
|