@lodestar/reqresp 1.35.0-dev.e18102ed8c → 1.35.0-dev.f45a2be721

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 (69) hide show
  1. package/lib/ReqResp.d.ts.map +1 -0
  2. package/lib/encoders/requestDecode.d.ts.map +1 -0
  3. package/lib/encoders/requestEncode.d.ts.map +1 -0
  4. package/lib/encoders/responseDecode.d.ts.map +1 -0
  5. package/lib/encoders/responseEncode.d.ts.map +1 -0
  6. package/lib/encodingStrategies/index.d.ts.map +1 -0
  7. package/lib/encodingStrategies/sszSnappy/decode.d.ts.map +1 -0
  8. package/lib/encodingStrategies/sszSnappy/encode.d.ts.map +1 -0
  9. package/lib/encodingStrategies/sszSnappy/errors.d.ts.map +1 -0
  10. package/lib/encodingStrategies/sszSnappy/index.d.ts.map +1 -0
  11. package/lib/encodingStrategies/sszSnappy/snappyFrames/common.d.ts.map +1 -0
  12. package/lib/encodingStrategies/sszSnappy/snappyFrames/compress.d.ts.map +1 -0
  13. package/lib/encodingStrategies/sszSnappy/snappyFrames/uncompress.d.ts.map +1 -0
  14. package/lib/encodingStrategies/sszSnappy/utils.d.ts.map +1 -0
  15. package/lib/index.d.ts.map +1 -0
  16. package/lib/interface.d.ts.map +1 -0
  17. package/lib/metrics.d.ts.map +1 -0
  18. package/lib/rate_limiter/ReqRespRateLimiter.d.ts.map +1 -0
  19. package/lib/rate_limiter/rateLimiterGRCA.d.ts.map +1 -0
  20. package/lib/rate_limiter/selfRateLimiter.d.ts.map +1 -0
  21. package/lib/request/errors.d.ts.map +1 -0
  22. package/lib/request/index.d.ts.map +1 -0
  23. package/lib/response/errors.d.ts.map +1 -0
  24. package/lib/response/index.d.ts.map +1 -0
  25. package/lib/types.d.ts.map +1 -0
  26. package/lib/utils/abortableSource.d.ts.map +1 -0
  27. package/lib/utils/bufferedSource.d.ts.map +1 -0
  28. package/lib/utils/collectExactOne.d.ts.map +1 -0
  29. package/lib/utils/collectMaxResponse.d.ts.map +1 -0
  30. package/lib/utils/errorMessage.d.ts.map +1 -0
  31. package/lib/utils/index.d.ts.map +1 -0
  32. package/lib/utils/onChunk.d.ts.map +1 -0
  33. package/lib/utils/peerId.d.ts.map +1 -0
  34. package/lib/utils/protocolId.d.ts.map +1 -0
  35. package/package.json +12 -12
  36. package/src/ReqResp.ts +289 -0
  37. package/src/encoders/requestDecode.ts +29 -0
  38. package/src/encoders/requestEncode.ts +18 -0
  39. package/src/encoders/responseDecode.ts +169 -0
  40. package/src/encoders/responseEncode.ts +81 -0
  41. package/src/encodingStrategies/index.ts +46 -0
  42. package/src/encodingStrategies/sszSnappy/decode.ts +111 -0
  43. package/src/encodingStrategies/sszSnappy/encode.ts +24 -0
  44. package/src/encodingStrategies/sszSnappy/errors.ts +31 -0
  45. package/src/encodingStrategies/sszSnappy/index.ts +3 -0
  46. package/src/encodingStrategies/sszSnappy/snappyFrames/common.ts +36 -0
  47. package/src/encodingStrategies/sszSnappy/snappyFrames/compress.ts +25 -0
  48. package/src/encodingStrategies/sszSnappy/snappyFrames/uncompress.ts +114 -0
  49. package/src/encodingStrategies/sszSnappy/utils.ts +7 -0
  50. package/src/index.ts +10 -0
  51. package/src/interface.ts +26 -0
  52. package/src/metrics.ts +95 -0
  53. package/src/rate_limiter/ReqRespRateLimiter.ts +107 -0
  54. package/src/rate_limiter/rateLimiterGRCA.ts +92 -0
  55. package/src/rate_limiter/selfRateLimiter.ts +112 -0
  56. package/src/request/errors.ts +119 -0
  57. package/src/request/index.ts +225 -0
  58. package/src/response/errors.ts +50 -0
  59. package/src/response/index.ts +147 -0
  60. package/src/types.ts +158 -0
  61. package/src/utils/abortableSource.ts +80 -0
  62. package/src/utils/bufferedSource.ts +46 -0
  63. package/src/utils/collectExactOne.ts +15 -0
  64. package/src/utils/collectMaxResponse.ts +19 -0
  65. package/src/utils/errorMessage.ts +51 -0
  66. package/src/utils/index.ts +8 -0
  67. package/src/utils/onChunk.ts +12 -0
  68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MAAM,EAAE,YAAY,GAAG,IAAI;IAI9F;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC,GAAG,MAAM;CAGrG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestDecode.d.ts","sourceRoot":"","sources":["../../src/encoders/requestDecode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAK1C;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,aAAa,GACtB,IAAI,CAAC,aAAa,CAAC,UAAU,GAAG,cAAc,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAYvE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestEncode.d.ts","sourceRoot":"","sources":["../../src/encoders/requestEncode.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C;;;;;;;GAOG;AACH,wBAAuB,aAAa,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,CAM7G"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responseDecode.d.ts","sourceRoot":"","sources":["../../src/encoders/responseDecode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAEL,mBAAmB,EAEnB,aAAa,EACb,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,cAAc,EAAqB,MA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C,CAqBpE;AAED;;;;;;;;;GASG;AACH,wBAAuB,mBAAmB,CACxC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EACzC,MAAM,EAAE,sBAAsB,EAC9B,YAAY,EAAE,MAAM,GACnB,cAAc,CAAC,MAAM,CAAC,CAQxB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/encodingStrategies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AASjD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,UAAU,CAAC,CAQrB;AAED;;;;;GAKG;AACH,wBAAuB,mBAAmB,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAS5G"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../src/encodingStrategies/sszSnappy/decode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAKpD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAI/G;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAiC1G;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA4ClH"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/encodingStrategies/sszSnappy/encode.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAsB,CAAC,KAAK,EAAE,UAAU,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC;AAEtG;;GAEG;AACH,wBAAuB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAQ5E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/encodingStrategies/sszSnappy/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,oBAAY,kBAAkB;IAC5B,kDAAkD;IAClD,0BAA0B,gDAAgD;IAC1E,0DAA0D;IAC1D,kBAAkB,wCAAwC;IAC1D,yDAAyD;IACzD,iBAAiB,uCAAuC;IACxD,mBAAmB,yCAAyC;IAC5D,kBAAkB,wCAAwC;IAC1D,iBAAiB,uCAAuC;IACxD,eAAe,qCAAqC;IACpD,uDAAuD;IACvD,cAAc,oCAAoC;IAClD,wDAAwD;IACxD,cAAc,oCAAoC;CACnD;AAED,KAAK,kBAAkB,GACnB;IAAC,IAAI,EAAE,kBAAkB,CAAC,0BAA0B,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,GACpE;IAAC,IAAI,EAAE,kBAAkB,CAAC,kBAAkB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,GACrF;IAAC,IAAI,EAAE,kBAAkB,CAAC,iBAAiB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,GACpF;IAAC,IAAI,EAAE,kBAAkB,CAAC,mBAAmB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,GACxF;IAAC,IAAI,EAAE,kBAAkB,CAAC,kBAAkB,CAAC;IAAC,iBAAiB,EAAE,KAAK,CAAA;CAAC,GACvE;IAAC,IAAI,EAAE,kBAAkB,CAAC,iBAAiB,CAAC;IAAC,gBAAgB,EAAE,KAAK,CAAA;CAAC,GACrE;IAAC,IAAI,EAAE,kBAAkB,CAAC,eAAe,CAAC;IAAC,cAAc,EAAE,KAAK,CAAA;CAAC,GACjE;IAAC,IAAI,EAAE,kBAAkB,CAAC,cAAc,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,GAChE;IAAC,IAAI,EAAE,kBAAkB,CAAC,cAAc,CAAA;CAAC,CAAC;AAE9C,qBAAa,cAAe,SAAQ,aAAa,CAAC,kBAAkB,CAAC;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/encodingStrategies/sszSnappy/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/encodingStrategies/sszSnappy/snappyFrames/common.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACnB,UAAU,MAAO;IACjB,UAAU,IAAO;IACjB,YAAY,IAAO;IACnB,OAAO,MAAO;IACd,SAAS,MAAO;CACjB;AAED,eAAO,MAAM,UAAU,qBAAoD,CAAC;AAC5E,eAAO,MAAM,gBAAgB,qBAA4E,CAAC;AAE1G;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAE7C,wBAAgB,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAc7C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["../../../../src/encodingStrategies/sszSnappy/snappyFrames/compress.ts"],"names":[],"mappings":"AAKA,wBAAuB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAmBzE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uncompress.d.ts","sourceRoot":"","sources":["../../../../src/encodingStrategies/sszSnappy/snappyFrames/uncompress.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAG9C,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAwB;IAEtC,OAAO,CAAC,KAAK,CAEX;IAEF;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI;IAgExD,KAAK,IAAI,IAAI;CAMd"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/encodingStrategies/sszSnappy/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGvD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,YAAY,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,QAAQ,IAAI,eAAe,EAAC,MAAM,YAAY,CAAC;AACvD,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAC,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AACA,oBAAY,UAAU;IACpB;;OAEG;IACH,OAAO,IAAI;IACX;;;OAGG;IACH,eAAe,IAAI;IACnB;;OAEG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,oBAAoB,IAAI;IACxB;;OAEG;IACH,YAAY,MAAM;CACnB;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,oBAAoB;;gBAIX,MAAM;;;gBAKC,MAAM;;;gBAKN,MAAM;;;gBAKG,MAAM;;;gBAOxB,MAAM;;;gBAKA,gBAAgB;;;gBAKpB,MAAM;;;gBAKC,MAAM;;;gBAKN,MAAM;;;gBAKC,MAAM;;;gBAOtB,MAAM;;;gBAKI,MAAM;;;gBAON,MAAM;;;;EAgB3D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReqRespRateLimiter.d.ts","sourceRoot":"","sources":["../../src/rate_limiter/ReqRespRateLimiter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAC,qBAAqB,EAAE,sBAAsB,EAAC,MAAM,aAAa,CAAC;AAS1E,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,qBAAa,kBAAkB;IASjB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IARlC,OAAO,CAAC,QAAQ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AM,EAAE,EACrB,WAAW,EAAE,UAAU,EACvB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,eAAe,EACtB,SAAS,SAAI,GACZ,aAAa,CAAC,gBAAgB,CAAC,CAqKjC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/response/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EAAC,UAAU,EAAE,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AAEnE,KAAK,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;AAE3E,oBAAY,iBAAiB;IAC3B,qBAAqB,0BAA0B;CAChD;AAED,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,aAAc,SAAQ,aAAa,CAAC,gBAAgB,CAAC;IAChE,MAAM,EAAE,2BAA2B,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;gBACT,MAAM,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAOrF,WAAW,IAAI,qBAAqB;IAOpC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,mBAAmB,GAAG,aAAa;CAW3D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/response/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAC,MAAM,EAA4B,MAAM,iBAAiB,CAAC;AAIlE,OAAO,EAAC,OA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iB,GAAG,eAAe,GAAG,KAAK,CAAC;AAE9F,MAAM,MAAM,mBAAmB,GAC3B;IAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAA;CAAC,GAC9B;IAAC,IAAI,EAAE,gBAAgB,CAAC,UAAU,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAC,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG;IAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAA;CAAC,GAAG;IAAC,IAAI,EAAE,gBAAgB,CAAC,UAAU,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAC,CAAC;AAEhH,oBAAY,gBAAgB;IAC1B,oCAAoC;IACpC,KAAK,IAAA;IACL,iJAAiJ;IACjJ,UAAU,IAAA;CACX;AAED,oBAAY,0BAA0B;IACpC,oBAAoB,yBAAyB;CAC9C;AAED,MAAM,MAAM,0BAA0B,GAAG;IAAC,IAAI,EAAE,0BAA0B,CAAC,oBAAoB,CAAA;CAAC,CAAC;AAEjG,qBAAa,sBAAuB,SAAQ,aAAa,CAAC,0BAA0B,CAAC;CAAG;AAExF,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortableSource.d.ts","sourceRoot":"","sources":["../../src/utils/abortableSource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,OAAO,EAAE;IACP,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,KAAK,CAAC;CACvB,EAAE,GACF,aAAa,CAAC,CAAC,CAAC,CAkElB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bufferedSource.d.ts","sourceRoot":"","sources":["../../src/utils/bufferedSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAE9C;;;;;;GAMG;AACH,qBAAa,cAAc;IACzB,MAAM,UAAS;IACf,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,MAAM,CAA8C;gBAEhD,MAAM,EAAE,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;IAK/D,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,cAAc,CAAC;CA0BxD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectExactOne.d.ts","sourceRoot":"","sources":["../../src/utils/collectExactOne.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAK7E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectMaxResponse.d.ts","sourceRoot":"","sources":["../../src/utils/collectMaxResponse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAWxG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../src/utils/errorMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAarC;;GAEG;AACH,wBAAuB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAQ1G;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,mBAAmB,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBzF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onChunk.d.ts","sourceRoot":"","sources":["../../src/utils/onChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,CAOvG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peerId.d.ts","sourceRoot":"","sources":["../../src/utils/peerId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGxD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocolId.d.ts","sourceRoot":"","sources":["../../src/utils/protocolId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAEzD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEpH;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,CA+BtE"}
package/package.json CHANGED
@@ -11,13 +11,15 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.35.0-dev.e18102ed8c",
14
+ "version": "1.35.0-dev.f45a2be721",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
+ "bun": "./src/index.ts",
18
19
  "import": "./lib/index.js"
19
20
  },
20
21
  "./utils": {
22
+ "bun": "./src/utils/index.ts",
21
23
  "import": "./lib/utils/index.js"
22
24
  }
23
25
  },
@@ -32,11 +34,9 @@
32
34
  },
33
35
  "types": "./lib/index.d.ts",
34
36
  "files": [
35
- "lib/**/*.d.ts",
36
- "lib/**/*.js",
37
- "lib/**/*.js.map",
38
- "*.d.ts",
39
- "*.js"
37
+ "src",
38
+ "lib",
39
+ "!**/*.tsbuildinfo"
40
40
  ],
41
41
  "scripts": {
42
42
  "clean": "rm -rf lib && rm -f *.tsbuildinfo",
@@ -54,9 +54,9 @@
54
54
  "dependencies": {
55
55
  "@chainsafe/fast-crc32c": "^4.2.0",
56
56
  "@libp2p/interface": "^2.7.0",
57
- "@lodestar/config": "1.35.0-dev.e18102ed8c",
58
- "@lodestar/params": "1.35.0-dev.e18102ed8c",
59
- "@lodestar/utils": "1.35.0-dev.e18102ed8c",
57
+ "@lodestar/config": "1.35.0-dev.f45a2be721",
58
+ "@lodestar/params": "1.35.0-dev.f45a2be721",
59
+ "@lodestar/utils": "1.35.0-dev.f45a2be721",
60
60
  "it-all": "^3.0.4",
61
61
  "it-pipe": "^3.0.1",
62
62
  "snappy": "^7.2.2",
@@ -65,8 +65,8 @@
65
65
  "uint8arraylist": "^2.4.7"
66
66
  },
67
67
  "devDependencies": {
68
- "@lodestar/logger": "1.35.0-dev.e18102ed8c",
69
- "@lodestar/types": "1.35.0-dev.e18102ed8c",
68
+ "@lodestar/logger": "1.35.0-dev.f45a2be721",
69
+ "@lodestar/types": "1.35.0-dev.f45a2be721",
70
70
  "libp2p": "2.9.0"
71
71
  },
72
72
  "peerDependencies": {
@@ -80,5 +80,5 @@
80
80
  "reqresp",
81
81
  "blockchain"
82
82
  ],
83
- "gitHead": "43ceb57f4abc35fdb9f350c83e4dac8fffe7007f"
83
+ "gitHead": "580c5c222b9d61894860d10fd17b7808fba59b23"
84
84
  }
package/src/ReqResp.ts ADDED
@@ -0,0 +1,289 @@
1
+ import {setMaxListeners} from "node:events";
2
+ import {Connection, PeerId, Stream} from "@libp2p/interface";
3
+ import type {Libp2p} from "libp2p";
4
+ import {Logger, MetricsRegisterExtra} from "@lodestar/utils";
5
+ import {Metrics, getMetrics} from "./metrics.js";
6
+ import {ReqRespRateLimiter} from "./rate_limiter/ReqRespRateLimiter.js";
7
+ import {SelfRateLimiter} from "./rate_limiter/selfRateLimiter.js";
8
+ import {RequestError, RequestErrorCode, SendRequestOpts, sendRequest} from "./request/index.js";
9
+ import {handleRequest} from "./response/index.js";
10
+ import {
11
+ DialOnlyProtocol,
12
+ Encoding,
13
+ MixedProtocol,
14
+ Protocol,
15
+ ProtocolDescriptor,
16
+ ReqRespRateLimiterOpts,
17
+ ResponseIncoming,
18
+ } from "./types.js";
19
+ import {formatProtocolID} from "./utils/protocolId.js";
20
+
21
+ type ProtocolID = string;
22
+
23
+ export const DEFAULT_PROTOCOL_PREFIX = "/eth2/beacon_chain/req";
24
+
25
+ export interface ReqRespProtocolModules {
26
+ libp2p: Libp2p;
27
+ logger: Logger;
28
+ metricsRegister: MetricsRegisterExtra | null;
29
+ }
30
+
31
+ export interface ReqRespOpts extends SendRequestOpts, ReqRespRateLimiterOpts {
32
+ /** Custom prefix for `/ProtocolPrefix/MessageName/SchemaVersion/Encoding` */
33
+ protocolPrefix?: string;
34
+ getPeerLogMetadata?: (peerId: string) => string;
35
+ }
36
+
37
+ /**
38
+ * Implementation of Ethereum Consensus p2p Req/Resp domain.
39
+ * For the spec that this code is based on, see:
40
+ * https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/p2p-interface.md#the-reqresp-domain
41
+ * https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/light-client/p2p-interface.md#the-reqresp-domain
42
+ */
43
+ export class ReqResp {
44
+ // protected to be usable by extending class
45
+ protected readonly libp2p: Libp2p;
46
+ protected readonly logger: Logger;
47
+ protected readonly metrics: Metrics | null;
48
+
49
+ // rate limit requests coming to this node to not be used by extending class
50
+ private readonly rateLimiter: ReqRespRateLimiter;
51
+ // rate limit requests sending to other peers
52
+ private readonly selfRateLimiter: SelfRateLimiter;
53
+
54
+ private controller = new AbortController();
55
+ /** Tracks request and responses in a sequential counter */
56
+ private reqCount = 0;
57
+ private readonly protocolPrefix: string;
58
+
59
+ /** `${protocolPrefix}/${method}/${version}/${encoding}` */
60
+ private readonly registeredProtocols = new Map<ProtocolID, MixedProtocol>();
61
+ private readonly dialOnlyProtocols = new Map<ProtocolID, boolean>();
62
+
63
+ constructor(
64
+ modules: ReqRespProtocolModules,
65
+ private readonly opts: ReqRespOpts = {}
66
+ ) {
67
+ this.libp2p = modules.libp2p;
68
+ this.logger = modules.logger;
69
+ this.metrics = modules.metricsRegister ? getMetrics(modules.metricsRegister) : null;
70
+ this.protocolPrefix = opts.protocolPrefix ?? DEFAULT_PROTOCOL_PREFIX;
71
+ this.rateLimiter = new ReqRespRateLimiter(opts);
72
+ this.selfRateLimiter = new SelfRateLimiter();
73
+
74
+ this.metrics?.selfRateLimiterPeerCount.addCollect(() => {
75
+ this.metrics?.selfRateLimiterPeerCount.set(this.selfRateLimiter.getPeerCount());
76
+ });
77
+ }
78
+
79
+ /**
80
+ * Register protocol which will be used only to dial to other peers
81
+ * The libp2p instance will not handle that protocol
82
+ *
83
+ * Made it explicit method to avoid any developer mistake
84
+ */
85
+ registerDialOnlyProtocol(protocol: DialOnlyProtocol): void {
86
+ const protocolID = this.formatProtocolID(protocol);
87
+
88
+ this.registeredProtocols.set(protocolID, protocol);
89
+ this.dialOnlyProtocols.set(protocolID, true);
90
+ }
91
+
92
+ /**
93
+ * Register protocol as supported and to libp2p.
94
+ * async because libp2p registrar persists the new protocol list in the peer-store.
95
+ * Overrides handler and rate limits in case protocol is already registered.
96
+ * Can be called at any time, no concept of started / stopped
97
+ */
98
+ async registerProtocol(protocol: Protocol): Promise<void> {
99
+ const protocolID = this.formatProtocolID(protocol);
100
+ const {handler: _handler, inboundRateLimits, ...rest} = protocol;
101
+
102
+ this.registerDialOnlyProtocol(rest);
103
+ this.dialOnlyProtocols.set(protocolID, false);
104
+
105
+ if (inboundRateLimits) {
106
+ this.rateLimiter.setRateLimits(protocolID, inboundRateLimits);
107
+ }
108
+
109
+ return this.libp2p.handle(protocolID, this.getRequestHandler(protocol, protocolID), {force: true});
110
+ }
111
+
112
+ /**
113
+ * Remove protocol as supported and from libp2p.
114
+ * async because libp2p registrar persists the new protocol list in the peer-store.
115
+ * Does NOT throw if the protocolID is unknown.
116
+ * Can be called at any time, no concept of started / stopped
117
+ */
118
+ async unregisterProtocol(protocolID: ProtocolID): Promise<void> {
119
+ this.registeredProtocols.delete(protocolID);
120
+
121
+ return this.libp2p.unhandle(protocolID);
122
+ }
123
+
124
+ /**
125
+ * Remove all registered protocols from libp2p
126
+ */
127
+ async unregisterAllProtocols(): Promise<void> {
128
+ for (const protocolID of this.registeredProtocols.keys()) {
129
+ await this.unregisterProtocol(protocolID);
130
+ }
131
+ }
132
+
133
+ getRegisteredProtocols(): ProtocolID[] {
134
+ return Array.from(this.registeredProtocols.values()).map((protocol) => this.formatProtocolID(protocol));
135
+ }
136
+
137
+ async start(): Promise<void> {
138
+ this.controller = new AbortController();
139
+ this.rateLimiter.start();
140
+ this.selfRateLimiter.start();
141
+ // We set infinity to prevent MaxListenersExceededWarning which get logged when listeners > 10
142
+ // Since it is perfectly fine to have listeners > 10
143
+ setMaxListeners(Infinity, this.controller.signal);
144
+ }
145
+
146
+ async stop(): Promise<void> {
147
+ this.rateLimiter.stop();
148
+ this.selfRateLimiter.stop();
149
+ this.controller.abort();
150
+ }
151
+
152
+ // Helper to reduce code duplication
153
+ async *sendRequest(
154
+ peerId: PeerId,
155
+ method: string,
156
+ versions: number[],
157
+ encoding: Encoding,
158
+ body: Uint8Array
159
+ ): AsyncIterable<ResponseIncoming> {
160
+ const peerIdStr = peerId.toString();
161
+ const peerClient = this.opts.getPeerLogMetadata?.(peerIdStr);
162
+ this.metrics?.outgoingRequests.inc({method});
163
+ const timer = this.metrics?.outgoingRequestRoundtripTime.startTimer({method});
164
+
165
+ const protocols: (MixedProtocol | DialOnlyProtocol)[] = [];
166
+ const protocolIDs: string[] = [];
167
+ // don't increase this.reqCount until we know request will be sent
168
+ const requestId = this.reqCount + 1;
169
+
170
+ for (const version of versions) {
171
+ const protocolID = this.formatProtocolID({method, version, encoding});
172
+ const protocol = this.registeredProtocols.get(protocolID);
173
+ if (!protocol) {
174
+ throw Error(`Request to send to protocol ${protocolID} but it has not been declared`);
175
+ }
176
+
177
+ if (!this.selfRateLimiter.allows(peerIdStr, protocolID, requestId)) {
178
+ // we technically don't send request in this case but would be nice just to track this in the same `outgoingErrorReasons` metric
179
+ this.metrics?.outgoingErrorReasons.inc({reason: RequestErrorCode.REQUEST_SELF_RATE_LIMITED});
180
+ throw new RequestError({code: RequestErrorCode.REQUEST_SELF_RATE_LIMITED});
181
+ // don't call this.onOutgoingRequestError() to penalize peer
182
+ }
183
+
184
+ protocols.push(protocol);
185
+ protocolIDs.push(protocolID);
186
+ }
187
+
188
+ // requestId is now the same to reqCount
189
+ this.reqCount++;
190
+
191
+ try {
192
+ yield* sendRequest(
193
+ {logger: this.logger, libp2p: this.libp2p, metrics: this.metrics, peerClient},
194
+ peerId,
195
+ protocols,
196
+ protocolIDs,
197
+ body,
198
+ this.controller.signal,
199
+ this.opts,
200
+ requestId
201
+ );
202
+ } catch (e) {
203
+ this.metrics?.outgoingErrors.inc({method});
204
+
205
+ if (e instanceof RequestError) {
206
+ if (e.type.code === RequestErrorCode.DIAL_ERROR || e.type.code === RequestErrorCode.DIAL_TIMEOUT) {
207
+ this.metrics?.dialErrors.inc();
208
+ }
209
+ this.metrics?.outgoingErrorReasons.inc({reason: e.type.code});
210
+
211
+ this.onOutgoingRequestError(peerId, method, e);
212
+ }
213
+
214
+ throw e;
215
+ } finally {
216
+ for (const protocolID of protocolIDs) {
217
+ this.selfRateLimiter.requestCompleted(peerIdStr, protocolID, requestId);
218
+ }
219
+ timer?.();
220
+ }
221
+ }
222
+
223
+ private getRequestHandler(protocol: MixedProtocol, protocolID: string) {
224
+ return async ({connection, stream}: {connection: Connection; stream: Stream}) => {
225
+ if (this.dialOnlyProtocols.get(protocolID)) {
226
+ throw new Error(`Received request on dial only protocol '${protocolID}'`);
227
+ }
228
+
229
+ const peerId = connection.remotePeer;
230
+ const peerClient = this.opts.getPeerLogMetadata?.(peerId.toString());
231
+ const {method} = protocol;
232
+
233
+ this.metrics?.incomingRequests.inc({method});
234
+ const timer = this.metrics?.incomingRequestHandlerTime.startTimer({method});
235
+
236
+ this.onIncomingRequest?.(peerId, protocol);
237
+
238
+ try {
239
+ await handleRequest({
240
+ logger: this.logger,
241
+ metrics: this.metrics,
242
+ stream,
243
+ peerId,
244
+ protocol: protocol as Protocol,
245
+ protocolID,
246
+ rateLimiter: this.rateLimiter,
247
+ signal: this.controller.signal,
248
+ requestId: this.reqCount++,
249
+ peerClient,
250
+ requestTimeoutMs: this.opts.requestTimeoutMs,
251
+ });
252
+ // TODO: Do success peer scoring here
253
+ } catch (err) {
254
+ this.metrics?.incomingErrors.inc({method});
255
+
256
+ if (err instanceof RequestError) {
257
+ this.onIncomingRequestError(protocol as ProtocolDescriptor, err);
258
+ }
259
+
260
+ // TODO: Do error peer scoring here
261
+ // Must not throw since this is an event handler
262
+ } finally {
263
+ timer?.();
264
+ }
265
+ };
266
+ }
267
+
268
+ protected onIncomingRequest(_peerId: PeerId, _protocol: ProtocolDescriptor): void {
269
+ // Override
270
+ }
271
+
272
+ protected onIncomingRequestError(_protocol: ProtocolDescriptor, _error: RequestError): void {
273
+ // Override
274
+ }
275
+
276
+ protected onOutgoingRequestError(_peerId: PeerId, _method: string, _error: RequestError): void {
277
+ // Override
278
+ }
279
+
280
+ /**
281
+ * ```
282
+ * /ProtocolPrefix/MessageName/SchemaVersion/Encoding
283
+ * ```
284
+ * https://github.com/ethereum/consensus-specs/blob/v1.2.0/specs/phase0/p2p-interface.md#protocol-identification
285
+ */
286
+ protected formatProtocolID(protocol: Pick<MixedProtocol, "method" | "version" | "encoding">): string {
287
+ return formatProtocolID(this.protocolPrefix, protocol.method, protocol.version, protocol.encoding);
288
+ }
289
+ }
@@ -0,0 +1,29 @@
1
+ import type {Sink} from "it-stream-types";
2
+ import {Uint8ArrayList} from "uint8arraylist";
3
+ import {readEncodedPayload} from "../encodingStrategies/index.js";
4
+ import {MixedProtocol} from "../types.js";
5
+ import {BufferedSource} from "../utils/index.js";
6
+
7
+ const EMPTY_DATA = new Uint8Array();
8
+
9
+ /**
10
+ * Consumes a stream source to read a `<request>`
11
+ * ```bnf
12
+ * request ::= <encoding-dependent-header> | <encoded-payload>
13
+ * ```
14
+ */
15
+ export function requestDecode(
16
+ protocol: MixedProtocol
17
+ ): Sink<AsyncIterable<Uint8Array | Uint8ArrayList>, Promise<Uint8Array>> {
18
+ return async function requestDecodeSink(source) {
19
+ const type = protocol.requestSizes;
20
+ if (type === null) {
21
+ // method has no body
22
+ return EMPTY_DATA;
23
+ }
24
+
25
+ // Request has a single payload, so return immediately
26
+ const bufferedSource = new BufferedSource(source as AsyncGenerator<Uint8ArrayList>);
27
+ return readEncodedPayload(bufferedSource, protocol.encoding, type);
28
+ };
29
+ }
@@ -0,0 +1,18 @@
1
+ import {writeEncodedPayload} from "../encodingStrategies/index.js";
2
+ import {MixedProtocol} from "../types.js";
3
+
4
+ /**
5
+ * Yields byte chunks for a `<request>`
6
+ * ```bnf
7
+ * request ::= <encoding-dependent-header> | <encoded-payload>
8
+ * ```
9
+ * Requests may contain no payload (e.g. /eth2/beacon_chain/req/metadata/1/)
10
+ * if so, it would yield no byte chunks
11
+ */
12
+ export async function* requestEncode(protocol: MixedProtocol, requestBody: Uint8Array): AsyncGenerator<Buffer> {
13
+ const type = protocol.requestSizes;
14
+
15
+ if (type && requestBody !== null) {
16
+ yield* writeEncodedPayload(requestBody, protocol.encoding);
17
+ }
18
+ }