tendermint-node
tendermint-node copied to clipboard
Newest version 5.2.0 breaks lotion-js
After updating to the 5.2.0 version, my lotion app broke. When I start it, it throws the following
(node:5741) UnhandledPromiseRejectionWarning: RangeError: index out of range: 229 + 14532 > 343
at indexOutOfRange (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/protobufjs/src/reader.js:13:12)
at BufferReader.read_bytes [as bytes] (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/protobufjs/src/reader.js:306:15)
at Function.decode (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/abci/types.js:8235:53)
at Function.decode (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/abci/types.js:2114:56)
at Function.decode (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/abci/types.js:256:71)
at Connection.maybeReadNextMessage (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/abci/src/connection.js:55:27)
at Connection.onData (/Users/david/Documents/FIIT/DP/color-chain/test/node_modules/abci/src/connection.js:32:10)
at Socket.emit (events.js:316:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
My machine is macOS 10.15.2 with Node v13.10.1
Minimal reproduction: Basic lotion app
const lotion = require('lotion');
const app = lotion({
initialState: {},
peers: [],
logTendermint: true,
p2pPort: 26658,
rpcPort: 26657,
});
app.start().then((info) => {
console.log(JSON.stringify(info, null, 2));
});
When I manually changed version of tendermint-node in package-lock.json to 5.1.4 it worked again.