Closed paceto256 closed 3 years ago
tendermint should be call with abci parameter:
tendermint start --abci grpc
@paceto256 , how did you manage to run the exmaple? I'm trying to start it from the same exact commit, and I'm getting:
➜ js-abci git:(master) ✗ node example/counter.js
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'abci'
Require stack:
- /Users/ppe/Projects/tdmint-app/js-abci/example/counter.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/Users/ppe/Projects/tdmint-app/js-abci/example/counter.js:1:24)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/Users/ppe/Projects/tdmint-app/js-abci/example/counter.js' ]
I've managed to run the example by changing the
let createABCIServer = require('abci')
to
let createABCIServer = require('../src/server')
Starting the tendermint with tendermint start --abci grpc
ends with
2021-11-25T20:03:38+01:00 INFO starting service impl=multiAppConn module=proxy service=multiAppConn
2021-11-25T20:03:38+01:00 INFO starting service connection=query impl=grpcClient module=abci-client service=grpcClient
2021-11-25T20:03:38+01:00 INFO Dialed server. Waiting for echo. addr=tcp://127.0.0.1:26658 connection=query module=abci-client
If someone is looking for a working example of counter.js, then tendermint 0.32.12 worked for me - without introducing any changes, all the messages are correctly processed. Changing counter state via curl or by RpcClient working as well.
Hope it helps save some time for others.
How to reproduce:
node example/counter.js
./build/tendermint start
Swith to the counte.js tab, It breaks with the error: