Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): workaround for batching issue in V9 #121

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
Loading