Skip to content

Commit

Permalink
Release/v2.29.0 (#1660)
Browse files Browse the repository at this point in the history
* testing configurations and plugins for babel

Signed-off-by: ochikov <[email protected]>

* bump up version

Signed-off-by: ochikov <[email protected]>

* babel options and exports

Signed-off-by: ochikov <[email protected]>

* options for babel and for properly building the SDK

Signed-off-by: ochikov <[email protected]>

* Fix/issue with encode decode (#1647)

* refactor and add integration tests

Signed-off-by: ochikov <[email protected]>

* fix linter

Signed-off-by: ochikov <[email protected]>

* add ds store ignore

Signed-off-by: ochikov <[email protected]>

* remove the max attempts from commonJs tests

Signed-off-by: ochikov <[email protected]>

* change the mainnet topicId subscription in TopicMessageQuery integration test

Signed-off-by: ochikov <[email protected]>

---------

Signed-off-by: ochikov <[email protected]>

* fix exact version of grpc librart (#1652)

Signed-off-by: ochikov <[email protected]>

* remove ping all from the integration test env setup (#1650)

Signed-off-by: ochikov <[email protected]>

* changelog and version updated

Signed-off-by: ochikov <[email protected]>

* fix getting a random node when the list is not locked (#1654)

Signed-off-by: Petar Tonev <[email protected]>

* prepare for release

Signed-off-by: Petar Tonev <[email protected]>

* prepare stable release

Signed-off-by: Petar Tonev <[email protected]>

* GRPC improvements (#1656)

* Release/v2.28.0 (#1655)

* testing configurations and plugins for babel

Signed-off-by: ochikov <[email protected]>

* bump up version

Signed-off-by: ochikov <[email protected]>

* babel options and exports

Signed-off-by: ochikov <[email protected]>

* options for babel and for properly building the SDK

Signed-off-by: ochikov <[email protected]>

* Fix/issue with encode decode (#1647)

* refactor and add integration tests

Signed-off-by: ochikov <[email protected]>

* fix linter

Signed-off-by: ochikov <[email protected]>

* add ds store ignore

Signed-off-by: ochikov <[email protected]>

* remove the max attempts from commonJs tests

Signed-off-by: ochikov <[email protected]>

* change the mainnet topicId subscription in TopicMessageQuery integration test

Signed-off-by: ochikov <[email protected]>

---------

Signed-off-by: ochikov <[email protected]>

* fix exact version of grpc librart (#1652)

Signed-off-by: ochikov <[email protected]>

* remove ping all from the integration test env setup (#1650)

Signed-off-by: ochikov <[email protected]>

* changelog and version updated

Signed-off-by: ochikov <[email protected]>

* fix getting a random node when the list is not locked (#1654)

Signed-off-by: Petar Tonev <[email protected]>

* prepare for release

Signed-off-by: Petar Tonev <[email protected]>

* prepare stable release

Signed-off-by: Petar Tonev <[email protected]>

---------

Signed-off-by: ochikov <[email protected]>
Signed-off-by: Petar Tonev <[email protected]>
Co-authored-by: ochikov <[email protected]>
Co-authored-by: Ognyan Chikov <[email protected]>

* initial approach

Signed-off-by: Petar Tonev <[email protected]>

* improve grpc calls

Signed-off-by: Petar Tonev <[email protected]>

---------

Signed-off-by: ochikov <[email protected]>
Signed-off-by: Petar Tonev <[email protected]>
Co-authored-by: ochikov <[email protected]>
Co-authored-by: Ognyan Chikov <[email protected]>

* prepare for release

Signed-off-by: Petar Tonev <[email protected]>

* prepare for release

Signed-off-by: Petar Tonev <[email protected]>

---------

Signed-off-by: ochikov <[email protected]>
Signed-off-by: Petar Tonev <[email protected]>
Co-authored-by: ochikov <[email protected]>
Co-authored-by: Ognyan Chikov <[email protected]>
  • Loading branch information
3 people authored Jun 30, 2023
1 parent 3ecd5cd commit 395c6e0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## v2.29.0

## What's Changed
* GRPC improvements by @petreze in https://github.com/hashgraph/hedera-sdk-js/pull/1656
* Update the addressbook on SDK build by @petreze in https://github.com/hashgraph/hedera-sdk-js/pull/1658

## v2.29.0-beta.1

## What's Changed
* GRPC improvements by @petreze in https://github.com/hashgraph/hedera-sdk-js/pull/1656

## v2.28.0

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/sdk",
"version": "2.28.0",
"version": "2.29.0",
"description": "Hedera™ Hashgraph SDK",
"types": "./lib/index.d.ts",
"main": "./lib/index.cjs",
Expand Down
51 changes: 27 additions & 24 deletions src/channel/NodeChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@ export default class NodeChannel extends Channel {
// https://github.com/grpc/grpc-node/issues/1593
// https://github.com/grpc/grpc-node/issues/1545
// https://github.com/grpc/grpc/issues/13163
"grpc.keepalive_timeout_ms": 1,
"grpc.keepalive_timeout_ms": 10000,
"grpc.keepalive_permit_without_calls": 1,
"grpc.enable_retries": 0,
};
} else {
security = credentials.createInsecure();
options = {
"grpc.keepalive_timeout_ms": 10000,
"grpc.keepalive_permit_without_calls": 1,
"grpc.enable_retries": 0,
};
}

/**
Expand All @@ -86,32 +92,29 @@ export default class NodeChannel extends Channel {
*/
_createUnaryClient(serviceName) {
return (method, requestData, callback) => {
if (this._client.getChannel().getConnectivityState(false) == 4) {
callback(new GrpcServicesError(GrpcStatus.Unavailable));
return;
}
const deadline = new Date();
const milliseconds = this.maxExecutionTime
? this.maxExecutionTime
: 10000;
deadline.setMilliseconds(deadline.getMilliseconds() + milliseconds);

let received = false;

setTimeout(() => {
if (!received) {
this._client.close();
this._client.waitForReady(deadline, (err) => {
if (err) {
callback(new GrpcServicesError(GrpcStatus.Timeout));
} else {
this._client.makeUnaryRequest(
`/proto.${serviceName}/${method.name}`,
(value) => value,
(value) => {
return value;
},
Buffer.from(requestData),
(e, r) => {
callback(e, r);
}
);
}
}, this.maxExecutionTime);

this._client.makeUnaryRequest(
`/proto.${serviceName}/${method.name}`,
(value) => value,
(value) => {
received = true;
return value;
},
Buffer.from(requestData),
(e, r) => {
callback(e, r);
}
);
});
};
}
}

0 comments on commit 395c6e0

Please sign in to comment.