[telegram] <Sara> Hi! So, they checked the error - it is definitely a connection error, it's set up here in the code of the library (re @exru: According to error logs the problem lays in /lib/queries/index.js:36:20
at Timeout._onTimeout (/var/www/nhterminal/node_modules/iroha-helpers/lib/queries/index.js:36:20)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7))
[telegram] <exru> I've used next code:
npm install is-port-reachable
import isPortReachable from 'is-port-reachable';
result is true (re @Alexander: 1. check port redirection if client and iroha on different VM or in container
[telegram] <exru> exru@524889-cu15907:~$ telnet 127.0.0.1 50051
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
connected too (re @Alexander: 1. check port redirection if client and iroha on different VM or in container
[telegram] <exru> According https://iroha.readthedocs.io/en/main/develop/libraries/javascript.html
I start my script from console node script.mjs
=========
But still:
import isPortReachable from 'is-port-reachable';
console.log(await isPortReachable(50051, {host: 'localhost'})); // ok
[telegram] <exru> But still:
import isPortReachable from 'is-port-reachable';
console.log(await isPortReachable(50051, {host: 'localhost'})); // ok (re @exru: According https://iroha.readthedocs.io/en/main/develop/libraries/javascript.html
Maby error is in here? How I would to start the script?)
[telegram] <Sara> Forwarded from Hyperledger Iroha news: 👀 Very late reminder: community meeting in 10 minutes!
Just enough time to grab a cuppa and join us for Iroha updates: https://zoom.us/my/hyperledger.community.3
Password: 475869
[telegram] <Sara> Forwarded from Hyperledger Iroha news: By the way, if you haven't read it yet, Iroha Team wrote a blogpost about Iroha 2 for Hyperledger: https://www.hyperledger.org/blog/2022/05/19/new-long-term-support-version-of-hyperledger-iroha-creates-on-ramp-for-v2-adoption
Take a look to learn more about why and how we are creating Iroha 2!
[telegram] <Stepan> The bug was fixed by updating the nearest parent package.json file with the following entry:
{
"type": "module",
...} (re @Stepan: #gRPC #nodeJS
Hi. JS script when executed gives an error on import grpc from ('grpc'); "SyntaxError: Cannot use import statement outside a module". how to fix? ...example for the client side is not the most successful and simple, where is the kaizen concept)
it's simple: https://t.me/hyperledgeriroha/23128
and it's not easy anymore:
import grpc from 'grpc'
import {
QueryService_v1Client,
CommandService_v1Client
} from '../iroha-helpers/lib/proto/endpoint_grpc_pb'
import { commands, queries } from 'iroha-helpers'
const IROHA_ADDRESS = 'localhost:50051' ...)
[telegram] <Stepan> do you think such an example of a client script in JS will take off? )
...
var PROTO_PATH = __dirname + '/../../shared_model/endpoint.proto';
var grpc = require('@grpc/grpc-js');
var protoLoader = require('@grpc/proto-loader');
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
{keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true
});
var CommandService_v1= grpc.loadPackageDefinition(packageDefinition).grpc.CommandService_v1;
var commandService = new CommandService_v1(
IROHA_ADDRESS,
grpc.credentials.createInsecure()
) (re @Alexander: shared_model/endpoint.proto)
[telegram] <♌︎ Leo> Makes sense if u only need a few of the iroha APIs and don’t wish to add the iroha-helpers as a dependency. But, if u need a lot more APIs, then you run the of risk reinventing the whole iroha-helpers. (re @Stepan: do you think such an example of a client script in JS will take off? )
...
var PROTO_PATH = __dirname + '/../../shared_model/endpoint.proto';
var grpc = require('@grpc/grpc-js');
var protoLoader = require('@grpc/proto-loader');
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
{keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true
});
var CommandService_v1= grpc.loadPackageDefinition(packageDefinition).grpc.CommandService_v1;
var commandService = new CommandService_v1(
IROHA_ADDRESS,
grpc.credentials.createInsecure()
))
[telegram] <Grouvie> Is Hyperledger Burrow still supported by Iroha or is it suggested to use other solutions to implement smart contract functionality?
The Hyperledger Burrow Github states:
"Hyperledger Burrow has been moved to End of Life status by the original project maintainers."
[telegram] <Sara> Hi So, we discussed this with the team and decided to not remove the code that allows to work with Burrow as for now I do not think there is an alternative (unless @baziorek has something that could help in one of his mentorship projects?). So, you can use the last version of the Burrow but we cannot guarantee it will work well because the project is being closed. (re @Grouvie: Is Hyperledger Burrow still supported by Iroha or is it suggested to use other solutions to implement smart contract functionality?
The Hyperledger Burrow Github states:
"Hyperledger Burrow has been moved to End of Life status by the original project maintainers.")