Skip to content

Commit d04eb58

Browse files
Nana-ECgeorgi-l95
andauthored
Bump 0.10.0-rc1 (#635)
- Bump 0.10.0-rc1 - cherry picked https://github.com/hashgraph/hedera-json-rpc-relay/pull/637 Signed-off-by: Nana Essilfie-Conduah <[email protected]> Signed-off-by: georgi-l95 <[email protected]> Co-authored-by: georgi-l95 <[email protected]>
1 parent 6fa8a1d commit d04eb58

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.7"
22
services:
33
relay:
44
container_name: hedera-jspn-rpc-relay
5-
image: "ghcr.io/hashgraph/hedera-json-rpc-relay:main"
5+
image: "ghcr.io/hashgraph/hedera-json-rpc-relay:0.10.0-rc1"
66
restart: "unless-stopped"
77
ports:
88
- 7546:7546

docs/openrpc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Hedera JSON-RPC Specification",
55
"description": "A specification of the implemented Ethereum JSON RPC APIs interface for Hedera clients and adheres to the Ethereum execution APIs schema.",
6-
"version": "0.10.0-SNAPSHOT"
6+
"version": "0.10.0-rc1"
77
},
88
"methods": [
99
{

helm-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ apiVersion: v2
22
name: hedera-json-rpc-relay
33
description: Helm chart deployment of the hashgraph/hedera-json-rpc-relay
44
type: application
5-
version: 0.10.0-SNAPSHOT
6-
appVersion: "0.10.0-SNAPSHOT"
5+
version: 0.10.0-rc1
6+
appVersion: "0.10.0-rc1"
77
home: https://github.com/hashgraph/hedera-json-rpc-relay

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/relay/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hashgraph/json-rpc-relay",
3-
"version": "0.10.0-SNAPSHOT",
3+
"version": "0.10.0-rc1",
44
"description": "Hedera Hashgraph implementation of Ethereum JSON RPC APIs. Utilises both the Hedera Consensus Nodes and the Mirror Nodes for transaction management and information retrieval",
55
"types": "dist/index.d.ts",
66
"main": "dist/index.js",

packages/relay/src/lib/errors/JsonRpcError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ export const predefined = {
125125
code: -32000,
126126
message: `Exceeded maximum block range: ${blockRange}`
127127
}),
128-
'IP_RATE_LIMIT_EXCEEDED': new JsonRpcError({
128+
'IP_RATE_LIMIT_EXCEEDED': (methodName: string) => new JsonRpcError({
129129
name: 'IP Rate limit exceeded',
130130
code: -32605,
131-
message: 'IP Rate limit exceeded'
131+
message: `IP Rate limit exceeded on ${methodName}`
132132
}),
133133
'HBAR_RATE_LIMIT_EXCEEDED': new JsonRpcError({
134134
name: 'HBAR Rate limit exceeded',

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hashgraph/json-rpc-server",
3-
"version": "0.10.0-SNAPSHOT",
3+
"version": "0.10.0-rc1",
44
"description": "Hedera Hashgraph Ethereum JSON RPC server. Accepts requests for Ethereum JSON RPC 2.0 APIs",
55
"main": "dist/index.js",
66
"keywords": [],

packages/server/src/koaJsonRpc/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ export default class KoaJsonRpc {
5353
constructor(logger: Logger, register: Registry, opts?) {
5454
this.koaApp = new Koa();
5555
this.limit = '1mb';
56-
this.duration = parseInt(process.env.LIMIT_DURATION!);
56+
this.duration = parseInt(process.env.LIMIT_DURATION!) || 60000;
5757
this.registry = Object.create(null);
5858
this.registryTotal = Object.create(null);
5959
this.methodConfig = methodConfiguration;
6060
if (opts) {
6161
this.limit = opts.limit || this.limit;
62-
this.duration = opts.limit || this.limit;
6362
}
6463
this.ratelimit = new RateLimit(logger.child({ name: 'ip-rate-limit' }), register, this.duration);
6564
}

packages/server/tests/acceptance/rateLimiter.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('@ratelimiter Rate Limiters Acceptance Tests', function () {
5757
}
5858
}catch(error) {
5959
rateLimited = true;
60-
Assertions.jsonRpcError(error, predefined.IP_RATE_LIMIT_EXCEEDED);
60+
Assertions.jsonRpcError(error, predefined.IP_RATE_LIMIT_EXCEEDED('eth_chainId'));
6161
}
6262

6363
expect(rateLimited).to.be.true;

0 commit comments

Comments
 (0)