@lodestar/reqresp 1.8.0 → 1.9.0-dev.b90a09c997

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.
Files changed (90) hide show
  1. package/README.md +19 -7
  2. package/lib/ReqResp.d.ts +7 -7
  3. package/lib/ReqResp.js +1 -1
  4. package/lib/ReqResp.js.map +1 -1
  5. package/lib/encoders/requestDecode.d.ts +2 -2
  6. package/lib/encoders/requestDecode.js +3 -3
  7. package/lib/encoders/requestDecode.js.map +1 -1
  8. package/lib/encoders/requestEncode.d.ts +2 -2
  9. package/lib/encoders/requestEncode.js +2 -4
  10. package/lib/encoders/requestEncode.js.map +1 -1
  11. package/lib/encoders/responseDecode.d.ts +4 -4
  12. package/lib/encoders/responseDecode.js +7 -2
  13. package/lib/encoders/responseDecode.js.map +1 -1
  14. package/lib/encoders/responseEncode.d.ts +3 -3
  15. package/lib/encoders/responseEncode.js +3 -31
  16. package/lib/encoders/responseEncode.js.map +1 -1
  17. package/lib/encodingStrategies/index.d.ts +3 -3
  18. package/lib/encodingStrategies/index.js +2 -2
  19. package/lib/encodingStrategies/index.js.map +1 -1
  20. package/lib/encodingStrategies/sszSnappy/decode.d.ts +3 -3
  21. package/lib/encodingStrategies/sszSnappy/decode.js +1 -14
  22. package/lib/encodingStrategies/sszSnappy/decode.js.map +1 -1
  23. package/lib/encodingStrategies/sszSnappy/encode.d.ts +1 -2
  24. package/lib/encodingStrategies/sszSnappy/encode.js +2 -23
  25. package/lib/encodingStrategies/sszSnappy/encode.js.map +1 -1
  26. package/lib/index.d.ts +2 -2
  27. package/lib/index.js.map +1 -1
  28. package/lib/rate_limiter/ReqRespRateLimiter.d.ts +1 -1
  29. package/lib/rate_limiter/ReqRespRateLimiter.js.map +1 -1
  30. package/lib/request/errors.d.ts +5 -14
  31. package/lib/request/errors.js +3 -11
  32. package/lib/request/errors.js.map +1 -1
  33. package/lib/request/index.d.ts +2 -2
  34. package/lib/request/index.js +12 -17
  35. package/lib/request/index.js.map +1 -1
  36. package/lib/response/index.d.ts +4 -4
  37. package/lib/response/index.js +10 -5
  38. package/lib/response/index.js.map +1 -1
  39. package/lib/types.d.ts +62 -79
  40. package/lib/types.js +0 -8
  41. package/lib/types.js.map +1 -1
  42. package/lib/utils/bufferedSource.d.ts +1 -1
  43. package/lib/utils/bufferedSource.js.map +1 -1
  44. package/lib/utils/collectExactOne.js +2 -2
  45. package/lib/utils/collectExactOne.js.map +1 -1
  46. package/lib/utils/protocolId.d.ts +2 -2
  47. package/lib/utils/protocolId.js.map +1 -1
  48. package/package.json +9 -9
  49. package/lib/protocols/BeaconBlockAndBlobsSidecarByRoot.d.ts +0 -4
  50. package/lib/protocols/BeaconBlockAndBlobsSidecarByRoot.js +0 -27
  51. package/lib/protocols/BeaconBlockAndBlobsSidecarByRoot.js.map +0 -1
  52. package/lib/protocols/BeaconBlocksByRange.d.ts +0 -5
  53. package/lib/protocols/BeaconBlocksByRange.js +0 -38
  54. package/lib/protocols/BeaconBlocksByRange.js.map +0 -1
  55. package/lib/protocols/BeaconBlocksByRoot.d.ts +0 -5
  56. package/lib/protocols/BeaconBlocksByRoot.js +0 -38
  57. package/lib/protocols/BeaconBlocksByRoot.js.map +0 -1
  58. package/lib/protocols/BlobsSidecarsByRange.d.ts +0 -4
  59. package/lib/protocols/BlobsSidecarsByRange.js +0 -27
  60. package/lib/protocols/BlobsSidecarsByRange.js.map +0 -1
  61. package/lib/protocols/Goodbye.d.ts +0 -4
  62. package/lib/protocols/Goodbye.js +0 -21
  63. package/lib/protocols/Goodbye.js.map +0 -1
  64. package/lib/protocols/LightClientBootstrap.d.ts +0 -4
  65. package/lib/protocols/LightClientBootstrap.js +0 -30
  66. package/lib/protocols/LightClientBootstrap.js.map +0 -1
  67. package/lib/protocols/LightClientFinalityUpdate.d.ts +0 -4
  68. package/lib/protocols/LightClientFinalityUpdate.js +0 -29
  69. package/lib/protocols/LightClientFinalityUpdate.js.map +0 -1
  70. package/lib/protocols/LightClientOptimisticUpdate.d.ts +0 -4
  71. package/lib/protocols/LightClientOptimisticUpdate.js +0 -29
  72. package/lib/protocols/LightClientOptimisticUpdate.js.map +0 -1
  73. package/lib/protocols/LightClientUpdatesByRange.d.ts +0 -4
  74. package/lib/protocols/LightClientUpdatesByRange.js +0 -28
  75. package/lib/protocols/LightClientUpdatesByRange.js.map +0 -1
  76. package/lib/protocols/Metadata.d.ts +0 -5
  77. package/lib/protocols/Metadata.js +0 -31
  78. package/lib/protocols/Metadata.js.map +0 -1
  79. package/lib/protocols/Ping.d.ts +0 -4
  80. package/lib/protocols/Ping.js +0 -20
  81. package/lib/protocols/Ping.js.map +0 -1
  82. package/lib/protocols/Status.d.ts +0 -4
  83. package/lib/protocols/Status.js +0 -24
  84. package/lib/protocols/Status.js.map +0 -1
  85. package/lib/protocols/index.d.ts +0 -13
  86. package/lib/protocols/index.js +0 -13
  87. package/lib/protocols/index.js.map +0 -1
  88. package/lib/protocols/utils.d.ts +0 -7
  89. package/lib/protocols/utils.js +0 -9
  90. package/lib/protocols/utils.js.map +0 -1
package/package.json CHANGED
@@ -11,15 +11,12 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.8.0",
14
+ "version": "1.9.0-dev.b90a09c997",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
18
  "import": "./lib/index.js"
19
19
  },
20
- "./protocols": {
21
- "import": "./lib/protocols/index.js"
22
- },
23
20
  "./utils": {
24
21
  "import": "./lib/utils/index.js"
25
22
  }
@@ -59,16 +56,19 @@
59
56
  "@chainsafe/snappy-stream": "^5.1.2",
60
57
  "@libp2p/interface-connection": "^3.0.2",
61
58
  "@libp2p/interface-peer-id": "^2.0.1",
62
- "@lodestar/config": "^1.8.0",
63
- "@lodestar/params": "^1.8.0",
64
- "@lodestar/types": "^1.8.0",
65
- "@lodestar/utils": "^1.8.0",
59
+ "@lodestar/config": "1.9.0-dev.b90a09c997",
60
+ "@lodestar/params": "1.9.0-dev.b90a09c997",
61
+ "@lodestar/types": "1.9.0-dev.b90a09c997",
62
+ "@lodestar/utils": "1.9.0-dev.b90a09c997",
66
63
  "it-all": "^3.0.1",
67
64
  "snappyjs": "^0.7.0",
68
65
  "stream-to-it": "^0.2.4",
69
66
  "uint8arraylist": "^2.4.3",
70
67
  "varint": "^6.0.0"
71
68
  },
69
+ "devDependencies": {
70
+ "@lodestar/types": "^1.7.2"
71
+ },
72
72
  "peerDependencies": {
73
73
  "libp2p": "0.41.0"
74
74
  },
@@ -80,5 +80,5 @@
80
80
  "reqresp",
81
81
  "blockchain"
82
82
  ],
83
- "gitHead": "a4b29cfe38de109c44992977074869a8c01cfc83"
83
+ "gitHead": "ea8bb27505f247fdc7501563bd9e1f97b1cc74c7"
84
84
  }
@@ -1,4 +0,0 @@
1
- import { deneb } from "@lodestar/types";
2
- import { DuplexProtocolDefinitionGenerator } from "../types.js";
3
- export declare const BeaconBlockAndBlobsSidecarByRoot: DuplexProtocolDefinitionGenerator<deneb.BeaconBlockAndBlobsSidecarByRootRequest, deneb.SignedBeaconBlockAndBlobsSidecar>;
4
- //# sourceMappingURL=BeaconBlockAndBlobsSidecarByRoot.d.ts.map
@@ -1,27 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { toHex } from "@lodestar/utils";
3
- import { ContextBytesType, Encoding } from "../types.js";
4
- // eslint-disable-next-line @typescript-eslint/naming-convention
5
- export const BeaconBlockAndBlobsSidecarByRoot = (modules, handler) => {
6
- return {
7
- method: "beacon_block_and_blobs_sidecar_by_root",
8
- version: 1,
9
- encoding: Encoding.SSZ_SNAPPY,
10
- handler,
11
- requestType: () => ssz.deneb.BeaconBlockAndBlobsSidecarByRootRequest,
12
- // TODO: Make it fork compliant
13
- responseType: () => ssz.deneb.SignedBeaconBlockAndBlobsSidecar,
14
- renderRequestBody: (req) => req.map((root) => toHex(root)).join(","),
15
- contextBytes: {
16
- type: ContextBytesType.ForkDigest,
17
- forkDigestContext: modules.config,
18
- forkFromResponse: ({ beaconBlock }) => modules.config.getForkName(beaconBlock.message.slot),
19
- },
20
- inboundRateLimits: {
21
- // TODO DENEB: For now same value as BeaconBlocksByRoot https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
22
- byPeer: { quota: 128, quotaTimeMs: 10000 },
23
- getRequestCount: (req) => req.length,
24
- },
25
- };
26
- };
27
- //# sourceMappingURL=BeaconBlockAndBlobsSidecarByRoot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BeaconBlockAndBlobsSidecarByRoot.js","sourceRoot":"","sources":["../../src/protocols/BeaconBlockAndBlobsSidecarByRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,gBAAgB,EAAqC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAE1F,gEAAgE;AAChE,MAAM,CAAC,MAAM,gCAAgC,GAGzC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACvB,OAAO;QACL,MAAM,EAAE,wCAAwC;QAChD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,OAAO;QACP,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC;QACpE,+BAA+B;QAC/B,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,gCAAgC;QAC9D,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACpE,YAAY,EAAE;YACZ,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,iBAAiB,EAAE,OAAO,CAAC,MAAM;YACjC,gBAAgB,EAAE,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;SAC1F;QACD,iBAAiB,EAAE;YACjB,gMAAgM;YAChM,MAAM,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,KAAM,EAAC;YACzC,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM;SACrC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { allForks, phase0 } from "@lodestar/types";
2
- import { DuplexProtocolDefinitionGenerator } from "../types.js";
3
- export declare const BeaconBlocksByRange: DuplexProtocolDefinitionGenerator<phase0.BeaconBlocksByRangeRequest, allForks.SignedBeaconBlock>;
4
- export declare const BeaconBlocksByRangeV2: DuplexProtocolDefinitionGenerator<phase0.BeaconBlocksByRangeRequest, allForks.SignedBeaconBlock>;
5
- //# sourceMappingURL=BeaconBlocksByRange.d.ts.map
@@ -1,38 +0,0 @@
1
- import { MAX_REQUEST_BLOCKS } from "@lodestar/params";
2
- import { ssz } from "@lodestar/types";
3
- import { ContextBytesType, Encoding } from "../types.js";
4
- /* eslint-disable @typescript-eslint/naming-convention */
5
- const BeaconBlocksByRangeCommon = {
6
- method: "beacon_blocks_by_range",
7
- encoding: Encoding.SSZ_SNAPPY,
8
- requestType: () => ssz.phase0.BeaconBlocksByRangeRequest,
9
- renderRequestBody: (req) => `${req.startSlot},${req.step},${req.count}`,
10
- inboundRateLimits: {
11
- // Rationale: https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
12
- byPeer: { quota: MAX_REQUEST_BLOCKS, quotaTimeMs: 10000 },
13
- getRequestCount: (req) => req.count,
14
- },
15
- };
16
- export const BeaconBlocksByRange = (_modules, handler) => {
17
- return {
18
- ...BeaconBlocksByRangeCommon,
19
- version: 1,
20
- handler,
21
- responseType: () => ssz.phase0.SignedBeaconBlock,
22
- contextBytes: { type: ContextBytesType.Empty },
23
- };
24
- };
25
- export const BeaconBlocksByRangeV2 = (modules, handler) => {
26
- return {
27
- ...BeaconBlocksByRangeCommon,
28
- version: 2,
29
- handler,
30
- responseType: (forkName) => ssz[forkName].SignedBeaconBlock,
31
- contextBytes: {
32
- type: ContextBytesType.ForkDigest,
33
- forkDigestContext: modules.config,
34
- forkFromResponse: (block) => modules.config.getForkName(block.message.slot),
35
- },
36
- };
37
- };
38
- //# sourceMappingURL=BeaconBlocksByRange.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BeaconBlocksByRange.js","sourceRoot":"","sources":["../../src/protocols/BeaconBlocksByRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAmB,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAA6D,MAAM,aAAa,CAAC;AAEnH,yDAAyD;AACzD,MAAM,yBAAyB,GAG3B;IACF,MAAM,EAAE,wBAAwB;IAChC,QAAQ,EAAE,QAAQ,CAAC,UAAU;IAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,0BAA0B;IACxD,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE;IACvE,iBAAiB,EAAE;QACjB,sJAAsJ;QACtJ,MAAM,EAAE,EAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,KAAM,EAAC;QACxD,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK;KACpC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAG5B,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE;IACxB,OAAO;QACL,GAAG,yBAAyB;QAC5B,OAAO,EAAE,CAAC;QACV,OAAO;QACP,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,iBAAiB;QAChD,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;KAC7C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAG9B,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACvB,OAAO;QACL,GAAG,yBAAyB;QAC5B,OAAO,EAAE,CAAC;QACV,OAAO;QACP,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,iBAAiB;QAC3D,YAAY,EAAE;YACZ,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,iBAAiB,EAAE,OAAO,CAAC,MAAM;YACjC,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;SAC5E;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { allForks, phase0 } from "@lodestar/types";
2
- import { DuplexProtocolDefinitionGenerator } from "../types.js";
3
- export declare const BeaconBlocksByRoot: DuplexProtocolDefinitionGenerator<phase0.BeaconBlocksByRootRequest, allForks.SignedBeaconBlock>;
4
- export declare const BeaconBlocksByRootV2: DuplexProtocolDefinitionGenerator<phase0.BeaconBlocksByRootRequest, allForks.SignedBeaconBlock>;
5
- //# sourceMappingURL=BeaconBlocksByRoot.d.ts.map
@@ -1,38 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { toHex } from "@lodestar/utils";
3
- import { ContextBytesType, Encoding } from "../types.js";
4
- /* eslint-disable @typescript-eslint/naming-convention */
5
- const BeaconBlocksByRootCommon = {
6
- method: "beacon_blocks_by_root",
7
- encoding: Encoding.SSZ_SNAPPY,
8
- requestType: () => ssz.phase0.BeaconBlocksByRootRequest,
9
- renderRequestBody: (req) => req.map((root) => toHex(root)).join(","),
10
- inboundRateLimits: {
11
- // Rationale: https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
12
- byPeer: { quota: 128, quotaTimeMs: 10000 },
13
- getRequestCount: (req) => req.length,
14
- },
15
- };
16
- export const BeaconBlocksByRoot = (_modules, handler) => {
17
- return {
18
- ...BeaconBlocksByRootCommon,
19
- version: 1,
20
- handler,
21
- responseType: () => ssz.phase0.SignedBeaconBlock,
22
- contextBytes: { type: ContextBytesType.Empty },
23
- };
24
- };
25
- export const BeaconBlocksByRootV2 = (modules, handler) => {
26
- return {
27
- ...BeaconBlocksByRootCommon,
28
- version: 2,
29
- handler,
30
- responseType: (forkName) => ssz[forkName].SignedBeaconBlock,
31
- contextBytes: {
32
- type: ContextBytesType.ForkDigest,
33
- forkDigestContext: modules.config,
34
- forkFromResponse: (block) => modules.config.getForkName(block.message.slot),
35
- },
36
- };
37
- };
38
- //# sourceMappingURL=BeaconBlocksByRoot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BeaconBlocksByRoot.js","sourceRoot":"","sources":["../../src/protocols/BeaconBlocksByRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,gBAAgB,EAAqC,QAAQ,EAA0B,MAAM,aAAa,CAAC;AAEnH,yDAAyD;AACzD,MAAM,wBAAwB,GAG1B;IACF,MAAM,EAAE,uBAAuB;IAC/B,QAAQ,EAAE,QAAQ,CAAC,UAAU;IAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,yBAAyB;IACvD,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;IACpE,iBAAiB,EAAE;QACjB,sJAAsJ;QACtJ,MAAM,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,KAAM,EAAC;QACzC,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM;KACrC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAG3B,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE;IACxB,OAAO;QACL,GAAG,wBAAwB;QAC3B,OAAO,EAAE,CAAC;QACV,OAAO;QACP,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,iBAAiB;QAChD,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;KAC7C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAG7B,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACvB,OAAO;QACL,GAAG,wBAAwB;QAC3B,OAAO,EAAE,CAAC;QACV,OAAO;QACP,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,iBAAiB;QAC3D,YAAY,EAAE;YACZ,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,iBAAiB,EAAE,OAAO,CAAC,MAAM;YACjC,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;SAC5E;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { deneb } from "@lodestar/types";
2
- import { DuplexProtocolDefinitionGenerator } from "../types.js";
3
- export declare const BlobsSidecarsByRange: DuplexProtocolDefinitionGenerator<deneb.BlobsSidecarsByRangeRequest, deneb.BlobsSidecar>;
4
- //# sourceMappingURL=BlobsSidecarsByRange.d.ts.map
@@ -1,27 +0,0 @@
1
- import { MAX_REQUEST_BLOCKS } from "@lodestar/params";
2
- import { ssz } from "@lodestar/types";
3
- import { ContextBytesType, Encoding } from "../types.js";
4
- // eslint-disable-next-line @typescript-eslint/naming-convention
5
- export const BlobsSidecarsByRange = (modules, handler) => {
6
- return {
7
- method: "blobs_sidecars_by_range",
8
- version: 1,
9
- encoding: Encoding.SSZ_SNAPPY,
10
- handler,
11
- requestType: () => ssz.deneb.BlobsSidecarsByRangeRequest,
12
- // TODO: Make it fork compliant
13
- responseType: () => ssz.deneb.BlobsSidecar,
14
- renderRequestBody: (req) => `${req.startSlot},${req.count}`,
15
- contextBytes: {
16
- type: ContextBytesType.ForkDigest,
17
- forkDigestContext: modules.config,
18
- forkFromResponse: (blobsSidecar) => modules.config.getForkName(blobsSidecar.beaconBlockSlot),
19
- },
20
- inboundRateLimits: {
21
- // TODO DENEB: For now same value as BeaconBlocksByRange https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
22
- byPeer: { quota: MAX_REQUEST_BLOCKS, quotaTimeMs: 10000 },
23
- getRequestCount: (req) => req.count,
24
- },
25
- };
26
- };
27
- //# sourceMappingURL=BlobsSidecarsByRange.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlobsSidecarsByRange.js","sourceRoot":"","sources":["../../src/protocols/BlobsSidecarsByRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAQ,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAqC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAE1F,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAG7B,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACvB,OAAO;QACL,MAAM,EAAE,yBAAyB;QACjC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,OAAO;QACP,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,2BAA2B;QACxD,+BAA+B;QAC/B,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY;QAC1C,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,KAAK,EAAE;QAC3D,YAAY,EAAE;YACZ,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,iBAAiB,EAAE,OAAO,CAAC,MAAM;YACjC,gBAAgB,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,eAAe,CAAC;SAC7F;QACD,iBAAiB,EAAE;YACjB,iMAAiM;YACjM,MAAM,EAAE,EAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,KAAM,EAAC;YACxD,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK;SACpC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { phase0 } from "@lodestar/types";
2
- import { DuplexProtocolDefinitionGenerator } from "../types.js";
3
- export declare const Goodbye: DuplexProtocolDefinitionGenerator<phase0.Goodbye, phase0.Goodbye>;
4
- //# sourceMappingURL=Goodbye.d.ts.map
@@ -1,21 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { ContextBytesType, Encoding } from "../types.js";
3
- // eslint-disable-next-line @typescript-eslint/naming-convention
4
- export const Goodbye = (_modules, handler) => {
5
- return {
6
- method: "goodbye",
7
- version: 1,
8
- encoding: Encoding.SSZ_SNAPPY,
9
- handler,
10
- requestType: () => ssz.phase0.Goodbye,
11
- responseType: () => ssz.phase0.Goodbye,
12
- ignoreResponse: true,
13
- renderRequestBody: (req) => req.toString(10),
14
- contextBytes: { type: ContextBytesType.Empty },
15
- inboundRateLimits: {
16
- // Rationale: https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
17
- byPeer: { quota: 1, quotaTimeMs: 10000 },
18
- },
19
- };
20
- };
21
- //# sourceMappingURL=Goodbye.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Goodbye.js","sourceRoot":"","sources":["../../src/protocols/Goodbye.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAqC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAE1F,gEAAgE;AAChE,MAAM,CAAC,MAAM,OAAO,GAAsE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE;IAC9G,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,OAAO;QACP,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;QACrC,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;QACtC,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5C,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;QAC5C,iBAAiB,EAAE;YACjB,sJAAsJ;YACtJ,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAM,EAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Root, allForks } from "@lodestar/types";
2
- import { MixedProtocolDefinitionGenerator } from "../types.js";
3
- export declare const LightClientBootstrap: MixedProtocolDefinitionGenerator<Root, allForks.LightClientBootstrap>;
4
- //# sourceMappingURL=LightClientBootstrap.d.ts.map
@@ -1,30 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { isForkLightClient } from "@lodestar/params";
3
- import { toHex } from "@lodestar/utils";
4
- import { Encoding } from "../types.js";
5
- import { getContextBytesLightclient } from "./utils.js";
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const LightClientBootstrap = ((modules, handler) => {
8
- const dialProtocol = {
9
- method: "light_client_bootstrap",
10
- version: 1,
11
- encoding: Encoding.SSZ_SNAPPY,
12
- requestType: () => ssz.Root,
13
- responseType: (forkName) => isForkLightClient(forkName)
14
- ? ssz.allForksLightClient[forkName].LightClientBootstrap
15
- : ssz.altair.LightClientBootstrap,
16
- contextBytes: getContextBytesLightclient((bootstrap) => modules.config.getForkName(bootstrap.header.beacon.slot), modules),
17
- };
18
- if (!handler)
19
- return dialProtocol;
20
- return {
21
- ...dialProtocol,
22
- handler,
23
- renderRequestBody: (req) => toHex(req),
24
- inboundRateLimits: {
25
- // As similar in the nature of `Status` protocol so we use the same rate limits.
26
- byPeer: { quota: 5, quotaTimeMs: 15000 },
27
- },
28
- };
29
- });
30
- //# sourceMappingURL=LightClientBootstrap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LightClientBootstrap.js","sourceRoot":"","sources":["../../src/protocols/LightClientBootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAW,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA6B,QAAQ,EAAmC,MAAM,aAAa,CAAC;AACnG,OAAO,EAAC,0BAA0B,EAAC,MAAM,YAAY,CAAC;AAEtD,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAA0E,CAAC,CAC1G,OAAO,EACP,OAAO,EACP,EAAE;IACF,MAAM,YAAY,GAAoE;QACpF,MAAM,EAAE,wBAAwB;QAChC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI;QAC3B,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE,CACzB,iBAAiB,CAAC,QAAQ,CAAC;YACzB,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,oBAAoB;YACxD,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,oBAAoB;QACrC,YAAY,EAAE,0BAA0B,CACtC,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EACvE,OAAO,CACR;KACF,CAAC;IAEF,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAElC,OAAO;QACL,GAAG,YAAY;QACf,OAAO;QACP,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;QACtC,iBAAiB,EAAE;YACjB,gFAAgF;YAChF,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAM,EAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAA0E,CAAC"}
@@ -1,4 +0,0 @@
1
- import { allForks } from "@lodestar/types";
2
- import { MixedProtocolDefinitionGenerator } from "../types.js";
3
- export declare const LightClientFinalityUpdate: MixedProtocolDefinitionGenerator<null, allForks.LightClientFinalityUpdate>;
4
- //# sourceMappingURL=LightClientFinalityUpdate.d.ts.map
@@ -1,29 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { isForkLightClient } from "@lodestar/params";
3
- import { Encoding } from "../types.js";
4
- import { getContextBytesLightclient } from "./utils.js";
5
- // eslint-disable-next-line @typescript-eslint/naming-convention
6
- export const LightClientFinalityUpdate = ((modules, handler) => {
7
- const dialProtocol = {
8
- method: "light_client_finality_update",
9
- version: 1,
10
- encoding: Encoding.SSZ_SNAPPY,
11
- requestType: () => null,
12
- responseType: (forkName) => isForkLightClient(forkName)
13
- ? ssz.allForksLightClient[forkName].LightClientFinalityUpdate
14
- : ssz.altair.LightClientFinalityUpdate,
15
- contextBytes: getContextBytesLightclient((update) => modules.config.getForkName(update.signatureSlot), modules),
16
- };
17
- if (!handler)
18
- return dialProtocol;
19
- return {
20
- ...dialProtocol,
21
- handler,
22
- inboundRateLimits: {
23
- // Finality updates should not be requested more than once per epoch.
24
- // Allow 2 per slot and a very safe bound until there's more testing of real usage.
25
- byPeer: { quota: 2, quotaTimeMs: 12000 },
26
- },
27
- };
28
- });
29
- //# sourceMappingURL=LightClientFinalityUpdate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LightClientFinalityUpdate.js","sourceRoot":"","sources":["../../src/protocols/LightClientFinalityUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAW,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAmC,MAAM,aAAa,CAAC;AACnG,OAAO,EAAC,0BAA0B,EAAC,MAAM,YAAY,CAAC;AAEtD,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAA+E,CAAC,CACpH,OAAO,EACP,OAAO,EACP,EAAE;IACF,MAAM,YAAY,GAAyE;QACzF,MAAM,EAAE,8BAA8B;QACtC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;QACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE,CACzB,iBAAiB,CAAC,QAAQ,CAAC;YACzB,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,yBAAyB;YAC7D,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,yBAAyB;QAC1C,YAAY,EAAE,0BAA0B,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;KAChH,CAAC;IAEF,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAElC,OAAO;QACL,GAAG,YAAY;QACf,OAAO;QACP,iBAAiB,EAAE;YACjB,qEAAqE;YACrE,mFAAmF;YACnF,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAM,EAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAA+E,CAAC"}
@@ -1,4 +0,0 @@
1
- import { allForks } from "@lodestar/types";
2
- import { MixedProtocolDefinitionGenerator } from "../types.js";
3
- export declare const LightClientOptimisticUpdate: MixedProtocolDefinitionGenerator<null, allForks.LightClientOptimisticUpdate>;
4
- //# sourceMappingURL=LightClientOptimisticUpdate.d.ts.map
@@ -1,29 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { isForkLightClient } from "@lodestar/params";
3
- import { Encoding } from "../types.js";
4
- import { getContextBytesLightclient } from "./utils.js";
5
- // eslint-disable-next-line @typescript-eslint/naming-convention
6
- export const LightClientOptimisticUpdate = ((modules, handler) => {
7
- const dialProtocol = {
8
- method: "light_client_optimistic_update",
9
- version: 1,
10
- encoding: Encoding.SSZ_SNAPPY,
11
- requestType: () => null,
12
- responseType: (forkName) => isForkLightClient(forkName)
13
- ? ssz.allForksLightClient[forkName].LightClientOptimisticUpdate
14
- : ssz.altair.LightClientOptimisticUpdate,
15
- contextBytes: getContextBytesLightclient((update) => modules.config.getForkName(update.signatureSlot), modules),
16
- };
17
- if (!handler)
18
- return dialProtocol;
19
- return {
20
- ...dialProtocol,
21
- handler,
22
- inboundRateLimits: {
23
- // Optimistic updates should not be requested more than once per slot.
24
- // Allow 2 per slot and a very safe bound until there's more testing of real usage.
25
- byPeer: { quota: 2, quotaTimeMs: 12000 },
26
- },
27
- };
28
- });
29
- //# sourceMappingURL=LightClientOptimisticUpdate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LightClientOptimisticUpdate.js","sourceRoot":"","sources":["../../src/protocols/LightClientOptimisticUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAW,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAmC,MAAM,aAAa,CAAC;AACnG,OAAO,EAAC,0BAA0B,EAAC,MAAM,YAAY,CAAC;AAEtD,gEAAgE;AAChE,MAAM,CAAC,MAAM,2BAA2B,GACtC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACpB,MAAM,YAAY,GAA2E;QAC3F,MAAM,EAAE,gCAAgC;QACxC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;QACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE,CACzB,iBAAiB,CAAC,QAAQ,CAAC;YACzB,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,2BAA2B;YAC/D,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,2BAA2B;QAC5C,YAAY,EAAE,0BAA0B,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;KAChH,CAAC;IAEF,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAElC,OAAO;QACL,GAAG,YAAY;QACf,OAAO;QACP,iBAAiB,EAAE;YACjB,sEAAsE;YACtE,mFAAmF;YACnF,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAM,EAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAAiF,CAAC"}
@@ -1,4 +0,0 @@
1
- import { altair, allForks } from "@lodestar/types";
2
- import { MixedProtocolDefinitionGenerator } from "../types.js";
3
- export declare const LightClientUpdatesByRange: MixedProtocolDefinitionGenerator<altair.LightClientUpdatesByRange, allForks.LightClientUpdate>;
4
- //# sourceMappingURL=LightClientUpdatesByRange.d.ts.map
@@ -1,28 +0,0 @@
1
- import { MAX_REQUEST_LIGHT_CLIENT_UPDATES, isForkLightClient } from "@lodestar/params";
2
- import { ssz } from "@lodestar/types";
3
- import { Encoding } from "../types.js";
4
- import { getContextBytesLightclient } from "./utils.js";
5
- // eslint-disable-next-line @typescript-eslint/naming-convention
6
- export const LightClientUpdatesByRange = ((modules, handler) => {
7
- const dialProtocol = {
8
- method: "light_client_updates_by_range",
9
- version: 1,
10
- encoding: Encoding.SSZ_SNAPPY,
11
- requestType: () => ssz.altair.LightClientUpdatesByRange,
12
- responseType: (forkName) => isForkLightClient(forkName) ? ssz.allForksLightClient[forkName].LightClientUpdate : ssz.altair.LightClientUpdate,
13
- contextBytes: getContextBytesLightclient((update) => modules.config.getForkName(update.signatureSlot), modules),
14
- };
15
- if (!handler)
16
- return dialProtocol;
17
- return {
18
- ...dialProtocol,
19
- handler,
20
- renderRequestBody: (req) => `${req.startPeriod},${req.count}`,
21
- inboundRateLimits: {
22
- // Same rationale as for BeaconBlocksByRange
23
- byPeer: { quota: MAX_REQUEST_LIGHT_CLIENT_UPDATES, quotaTimeMs: 10000 },
24
- getRequestCount: (req) => req.count,
25
- },
26
- };
27
- });
28
- //# sourceMappingURL=LightClientUpdatesByRange.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LightClientUpdatesByRange.js","sourceRoot":"","sources":["../../src/protocols/LightClientUpdatesByRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gCAAgC,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAS,GAAG,EAAW,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAA6B,QAAQ,EAAmC,MAAM,aAAa,CAAC;AACnG,OAAO,EAAC,0BAA0B,EAAC,MAAM,YAAY,CAAC;AAEtD,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAGlC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACxB,MAAM,YAAY,GAA6F;QAC7G,MAAM,EAAE,+BAA+B;QACvC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,yBAAyB;QACvD,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE,CACzB,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,iBAAiB;QAClH,YAAY,EAAE,0BAA0B,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;KAChH,CAAC;IAEF,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAElC,OAAO;QACL,GAAG,YAAY;QACf,OAAO;QACP,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,KAAK,EAAE;QAC7D,iBAAiB,EAAE;YACjB,4CAA4C;YAC5C,MAAM,EAAE,EAAC,KAAK,EAAE,gCAAgC,EAAE,WAAW,EAAE,KAAM,EAAC;YACtE,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK;SACpC;KACF,CAAC;AACJ,CAAC,CAAmG,CAAC"}
@@ -1,5 +0,0 @@
1
- import { allForks } from "@lodestar/types";
2
- import { DuplexProtocolDefinitionGenerator } from "../types.js";
3
- export declare const Metadata: DuplexProtocolDefinitionGenerator<null, allForks.Metadata>;
4
- export declare const MetadataV2: DuplexProtocolDefinitionGenerator<null, allForks.Metadata>;
5
- //# sourceMappingURL=Metadata.d.ts.map
@@ -1,31 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { ContextBytesType, Encoding } from "../types.js";
3
- /* eslint-disable @typescript-eslint/naming-convention */
4
- const MetadataCommon = {
5
- method: "metadata",
6
- encoding: Encoding.SSZ_SNAPPY,
7
- requestType: () => null,
8
- inboundRateLimits: {
9
- // Rationale: https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
10
- byPeer: { quota: 2, quotaTimeMs: 5000 },
11
- },
12
- };
13
- export const Metadata = (modules, handler) => {
14
- return {
15
- ...MetadataCommon,
16
- version: 1,
17
- handler,
18
- responseType: () => ssz.phase0.Metadata,
19
- contextBytes: { type: ContextBytesType.Empty },
20
- };
21
- };
22
- export const MetadataV2 = (modules, handler) => {
23
- return {
24
- ...MetadataCommon,
25
- version: 2,
26
- handler,
27
- responseType: () => ssz.altair.Metadata,
28
- contextBytes: { type: ContextBytesType.Empty },
29
- };
30
- };
31
- //# sourceMappingURL=Metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Metadata.js","sourceRoot":"","sources":["../../src/protocols/Metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAqC,QAAQ,EAA0B,MAAM,aAAa,CAAC;AAEnH,yDAAyD;AACzD,MAAM,cAAc,GAGhB;IACF,MAAM,EAAE,UAAU;IAClB,QAAQ,EAAE,QAAQ,CAAC,UAAU;IAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;IACvB,iBAAiB,EAAE;QACjB,sJAAsJ;QACtJ,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,IAAK,EAAC;KACvC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA+D,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACvG,OAAO;QACL,GAAG,cAAc;QACjB,OAAO,EAAE,CAAC;QACV,OAAO;QACP,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;QACvC,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;KAC7C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA+D,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACzG,OAAO;QACL,GAAG,cAAc;QACjB,OAAO,EAAE,CAAC;QACV,OAAO;QACP,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;QACvC,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;KAC7C,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { phase0 } from "@lodestar/types";
2
- import { ReqRespHandler, ProtocolDefinition } from "../types.js";
3
- export declare function Ping(handler: ReqRespHandler<phase0.Ping, phase0.Ping>): ProtocolDefinition<phase0.Ping, phase0.Ping>;
4
- //# sourceMappingURL=Ping.d.ts.map
@@ -1,20 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { ContextBytesType, Encoding } from "../types.js";
3
- // eslint-disable-next-line @typescript-eslint/naming-convention
4
- export function Ping(handler) {
5
- return {
6
- method: "ping",
7
- version: 1,
8
- encoding: Encoding.SSZ_SNAPPY,
9
- handler,
10
- requestType: () => ssz.phase0.Ping,
11
- responseType: () => ssz.phase0.Ping,
12
- renderRequestBody: (req) => req.toString(10),
13
- contextBytes: { type: ContextBytesType.Empty },
14
- inboundRateLimits: {
15
- // Rationale: https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
16
- byPeer: { quota: 2, quotaTimeMs: 10000 },
17
- },
18
- };
19
- }
20
- //# sourceMappingURL=Ping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Ping.js","sourceRoot":"","sources":["../../src/protocols/Ping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAAqC,MAAM,aAAa,CAAC;AAE3F,gEAAgE;AAChE,MAAM,UAAU,IAAI,CAAC,OAAiD;IACpE,OAAO;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,OAAO;QACP,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI;QAClC,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI;QACnC,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5C,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;QAC5C,iBAAiB,EAAE;YACjB,sJAAsJ;YACtJ,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAM,EAAC;SACxC;KACF,CAAC;AACJ,CAAC"}
@@ -1,4 +0,0 @@
1
- import { phase0 } from "@lodestar/types";
2
- import { MixedProtocolDefinitionGenerator } from "../types.js";
3
- export declare const Status: MixedProtocolDefinitionGenerator<phase0.Status, phase0.Status>;
4
- //# sourceMappingURL=Status.d.ts.map
@@ -1,24 +0,0 @@
1
- import { ssz } from "@lodestar/types";
2
- import { ContextBytesType, Encoding } from "../types.js";
3
- // eslint-disable-next-line @typescript-eslint/naming-convention
4
- export const Status = ((_modules, handler) => {
5
- const dialProtocol = {
6
- method: "status",
7
- version: 1,
8
- encoding: Encoding.SSZ_SNAPPY,
9
- requestType: () => ssz.phase0.Status,
10
- responseType: () => ssz.phase0.Status,
11
- contextBytes: { type: ContextBytesType.Empty },
12
- };
13
- if (!handler)
14
- return dialProtocol;
15
- return {
16
- ...dialProtocol,
17
- handler,
18
- inboundRateLimits: {
19
- // Rationale: https://github.com/sigp/lighthouse/blob/bf533c8e42cc73c35730e285c21df8add0195369/beacon_node/lighthouse_network/src/rpc/mod.rs#L118-L130
20
- byPeer: { quota: 5, quotaTimeMs: 15000 },
21
- },
22
- };
23
- });
24
- //# sourceMappingURL=Status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Status.js","sourceRoot":"","sources":["../../src/protocols/Status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAA8B,QAAQ,EAAmC,MAAM,aAAa,CAAC;AAErH,gEAAgE;AAChE,MAAM,CAAC,MAAM,MAAM,GAAmE,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE;IAC3G,MAAM,YAAY,GAA6D;QAC7E,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM;QACpC,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM;QACrC,YAAY,EAAE,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAC;KAC7C,CAAC;IAEF,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAElC,OAAO;QACL,GAAG,YAAY;QACf,OAAO;QACP,iBAAiB,EAAE;YACjB,sJAAsJ;YACtJ,MAAM,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAM,EAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAAmE,CAAC"}
@@ -1,13 +0,0 @@
1
- export { BeaconBlockAndBlobsSidecarByRoot } from "./BeaconBlockAndBlobsSidecarByRoot.js";
2
- export { BeaconBlocksByRoot, BeaconBlocksByRootV2 } from "./BeaconBlocksByRoot.js";
3
- export { BeaconBlocksByRange, BeaconBlocksByRangeV2 } from "./BeaconBlocksByRange.js";
4
- export { BlobsSidecarsByRange } from "./BlobsSidecarsByRange.js";
5
- export { Goodbye } from "./Goodbye.js";
6
- export { LightClientBootstrap } from "./LightClientBootstrap.js";
7
- export { LightClientFinalityUpdate } from "./LightClientFinalityUpdate.js";
8
- export { LightClientOptimisticUpdate } from "./LightClientOptimisticUpdate.js";
9
- export { LightClientUpdatesByRange } from "./LightClientUpdatesByRange.js";
10
- export { Metadata, MetadataV2 } from "./Metadata.js";
11
- export { Ping } from "./Ping.js";
12
- export { Status } from "./Status.js";
13
- //# sourceMappingURL=index.d.ts.map
@@ -1,13 +0,0 @@
1
- export { BeaconBlockAndBlobsSidecarByRoot } from "./BeaconBlockAndBlobsSidecarByRoot.js";
2
- export { BeaconBlocksByRoot, BeaconBlocksByRootV2 } from "./BeaconBlocksByRoot.js";
3
- export { BeaconBlocksByRange, BeaconBlocksByRangeV2 } from "./BeaconBlocksByRange.js";
4
- export { BlobsSidecarsByRange } from "./BlobsSidecarsByRange.js";
5
- export { Goodbye } from "./Goodbye.js";
6
- export { LightClientBootstrap } from "./LightClientBootstrap.js";
7
- export { LightClientFinalityUpdate } from "./LightClientFinalityUpdate.js";
8
- export { LightClientOptimisticUpdate } from "./LightClientOptimisticUpdate.js";
9
- export { LightClientUpdatesByRange } from "./LightClientUpdatesByRange.js";
10
- export { Metadata, MetadataV2 } from "./Metadata.js";
11
- export { Ping } from "./Ping.js";
12
- export { Status } from "./Status.js";
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/protocols/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gCAAgC,EAAC,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAC,kBAAkB,EAAE,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAC,mBAAmB,EAAE,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC"}
@@ -1,7 +0,0 @@
1
- import { BeaconConfig } from "@lodestar/config";
2
- import { ForkName } from "@lodestar/params";
3
- import { ContextBytesFactory } from "../types.js";
4
- export declare function getContextBytesLightclient<T>(forkFromResponse: (response: T) => ForkName, modules: {
5
- config: BeaconConfig;
6
- }): ContextBytesFactory<T>;
7
- //# sourceMappingURL=utils.d.ts.map
@@ -1,9 +0,0 @@
1
- import { ContextBytesType } from "../types.js";
2
- export function getContextBytesLightclient(forkFromResponse, modules) {
3
- return {
4
- type: ContextBytesType.ForkDigest,
5
- forkDigestContext: modules.config,
6
- forkFromResponse,
7
- };
8
- }
9
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/protocols/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AAElE,MAAM,UAAU,0BAA0B,CACxC,gBAA2C,EAC3C,OAA+B;IAE/B,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,UAAU;QACjC,iBAAiB,EAAE,OAAO,CAAC,MAAM;QACjC,gBAAgB;KACjB,CAAC;AACJ,CAAC"}