Skip to content

Commit

Permalink
fix(core): workaround for batching issue in V9
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasmpw committed Sep 11, 2024
1 parent 35ea42b commit 5835b14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## v0.7.2 (Unreleased)

### Fixed

#### **arch3-core**

- make `connectToRpcClient` use 0.37.x version of Tendermint for both 0.37.x and 0.38.x
RPC Clients as a workaround for a bug in batching requests in Archway V9 ([#121])

## v0.7.1 (2024-07-08)

### Added
Expand Down
10 changes: 6 additions & 4 deletions packages/arch3-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ export async function connectToRpcClient(rpcClient: RpcClient): Promise<CometCli
const tendermint37Client = await Tendermint37Client.create(rpcClient);
const version = (await tendermint37Client.status()).nodeInfo.version;

if (version.startsWith('0.37.')) {
// HACK: Force Tendermint37Client on 0.38.x versions, remove when client batching issue is fixed
if (version.startsWith('0.37.') || version.startsWith('0.38.')) {
return tendermint37Client;
}

tendermint37Client.disconnect();

if (version.startsWith('0.38.')) {
return await Comet38Client.create(rpcClient);
}
// if (version.startsWith('0.38.')) {
// console.log('VERRRRR2222',version)
// return await Comet38Client.create(rpcClient);
// }

return await Tendermint34Client.create(rpcClient);
}

0 comments on commit 5835b14

Please sign in to comment.