Skip to content

Bump Injective test tube to v1.20.0#64

Open
jbernal87 wants to merge 3 commits into
devfrom
f/v1.20.0
Open

Bump Injective test tube to v1.20.0#64
jbernal87 wants to merge 3 commits into
devfrom
f/v1.20.0

Conversation

@jbernal87

@jbernal87 jbernal87 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores

    • Released version 1.20.0 with updated dependencies across the test tooling and related components (including injective-core v1.20.0, injective-std v1.20.0, injective-cosmwasm v0.3.7, and test-tube v2.0.11).
  • Bug Fixes / Tests

    • Updated integration-test payloads and assertions for newer protocol/parameter fields (exchange cross-margin, oracle Pyth Pro params, auction error messaging).
  • Refactor

    • Streamlined test environment app configuration (new config constructor, improved tracing) and adjusted runner/build output formatting.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Releases injective-test-tube v1.20.0 and test-tube v2.0.11. Updates Go module replacements to injective-core@v1.20.0 and cosmossdk.io/*@inj.10``. Replaces the AppOptions-based test bootstrap with a new `NewAppConfigWithFlagHome` function. Adds new `injective-std` 1.20.0 fields to exchange and oracle tests. Modernises Rust format strings throughout.

Changes

injective-test-tube v1.20.0 Release

Layer / File(s) Summary
Crate version bumps and changelog
packages/injective-test-tube/CHANGELOG.md, packages/test-tube/Cargo.toml, packages/injective-test-tube/Cargo.toml
Bumps test-tube to 2.0.11 and injective-test-tube to 1.20.0; pins injective-std=1.20.0, injective-cosmwasm=0.3.7, test-tube-inj=2.0.11; records the release in CHANGELOG with dependency bump and fix bullets.
Go module dependency and replace-directive updates
packages/injective-test-tube/libinjectivetesttube/go.mod
Repositions go-ethereum v1.15.7, bumps metrics/v2 to beta.9, removes slim-sprig v3.0.0, and updates all replace directives to injective-core@v1.20.0, cosmossdk.io/*@inj.10``, cometbft to rollback pin, dropping the `hyperlane-cosmos` entry.
Test bootstrap: AppOptions → AppConfig API
packages/injective-test-tube/libinjectivetesttube/testenv/setup.go
Removes AppOptions map type, Get method, and NewAppOptionsWithFlagHome; adds NewAppConfigWithFlagHome that clones the default app config and sets FlagHome/FlagTrace; wires it into NewInjectiveApp.
Test field additions for injective-std 1.20.0
packages/injective-test-tube/src/module/exchange.rs, packages/injective-test-tube/src/module/oracle.rs
Adds cross_margin_eligible: false to MsgInstantPerpetualMarketLaunch in the exchange test; extends the oracle MsgUpdateParams with four new Pyth Pro and SEDA fields to match the updated schema.
Rust format string modernisation
packages/injective-test-tube/build.rs, packages/test-tube/src/runner/app.rs, packages/test-tube/src/runner/result.rs, packages/injective-test-tube/src/module/auction.rs
Converts format!, panic!, and assert! calls from positional {} or {:?} plus trailing argument syntax to inline captured-variable syntax ({lib_name}, {e:?}, {code}, {closing_time}).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop, hop! The version's new,
From .19 to .20 we flew!
AppOptions gone, AppConfig's here,
Cross-margin fields and Pyth Pro, oh dear!
Format strings trimmed, nice and neat —
Another release, oh what a feat! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the changeset: bumping the Injective test tube package to version 1.20.0 with coordinated dependency updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch f/v1.20.0

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security

socket-security Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​injective-cosmwasm@​0.3.6 ⏵ 0.3.710010093 +4100100
Updatedcargo/​injective-std@​1.19.0 ⏵ 1.20.010010093100100

View full report

@socket-security

socket-security Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: golang github.com/InjectiveLabs/metrics/v2 is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?golang/github.com/InjectiveLabs/metrics/v2@v2.0.0-beta.9

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/github.com/InjectiveLabs/metrics/v2@v2.0.0-beta.9. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@jbernal87 jbernal87 marked this pull request as ready for review June 15, 2026 19:39
Comment thread packages/injective-test-tube/Cargo.toml Outdated
serde_json = "1.0.85"
sha3 = { version = "0.10.8" }
test-tube-inj = { version = "2.0.10" }
test-tube-inj = { version = "2.0.11", path = "../test-tube" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why path addition? better to remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/injective-test-tube/build.rs`:
- Line 19: The code uses Rust's inline format string syntax (like {variable})
which requires Rust 1.58.0 or later, but the project has no declared MSRV. To
fix this across all four affected locations
(packages/injective-test-tube/build.rs:19,
packages/test-tube/src/runner/app.rs:384,
packages/test-tube/src/runner/result.rs:242, and
packages/injective-test-tube/src/module/auction.rs:104), add rust-version =
"1.58" to the workspace Cargo.toml file. Alternatively, if earlier Rust version
compatibility is required, revert the inline format string syntax at all four
locations back to explicit syntax (e.g., format!("{}", variable) instead of
format!("{variable}")). Choose one approach and apply it consistently across all
affected files to resolve the compatibility gap.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92ec4d98-1637-4c2e-b5e5-9d330060e8ec

📥 Commits

Reviewing files that changed from the base of the PR and between 06dacad and 9cdd75f.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • packages/injective-test-tube/libinjectivetesttube/go.sum is excluded by !**/*.sum
📒 Files selected for processing (11)
  • packages/injective-test-tube/CHANGELOG.md
  • packages/injective-test-tube/Cargo.toml
  • packages/injective-test-tube/build.rs
  • packages/injective-test-tube/libinjectivetesttube/go.mod
  • packages/injective-test-tube/libinjectivetesttube/testenv/setup.go
  • packages/injective-test-tube/src/module/auction.rs
  • packages/injective-test-tube/src/module/exchange.rs
  • packages/injective-test-tube/src/module/oracle.rs
  • packages/test-tube/Cargo.toml
  • packages/test-tube/src/runner/app.rs
  • packages/test-tube/src/runner/result.rs

.join("libinjectivetesttube.docrs.h")
} else {
out_dir.join(format!("lib{}.h", lib_name))
out_dir.join(format!("lib{lib_name}.h"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for MSRV declarations in project Cargo.toml files

echo "=== Checking for explicit MSRV declarations ==="
fd -t f -name "Cargo.toml" -path "*/packages/*" | xargs grep -H "rust-version" || echo "No explicit rust-version field found"

echo ""
echo "=== Checking for rust-toolchain files ==="
fd -t f -name "rust-toolchain*" || echo "No rust-toolchain files found"

echo ""
echo "=== Checking workspace Cargo.toml ==="
if [ -f "Cargo.toml" ]; then grep -A 5 "\[workspace\]" Cargo.toml | grep -i "rust\|version" || echo "No workspace-level MSRV"; fi

Repository: InjectiveLabs/test-tube

Length of output: 768


🏁 Script executed:

#!/bin/bash
# Verify the inline format syntax patterns in all four files

echo "=== File 1: packages/injective-test-tube/build.rs (line 19) ==="
sed -n '15,25p' packages/injective-test-tube/build.rs

echo ""
echo "=== File 2: packages/test-tube/src/runner/app.rs (line 384) ==="
sed -n '380,390p' packages/test-tube/src/runner/app.rs

echo ""
echo "=== File 3: packages/test-tube/src/runner/result.rs (line 242) ==="
sed -n '238,248p' packages/test-tube/src/runner/result.rs

echo ""
echo "=== File 4: packages/injective-test-tube/src/module/auction.rs (line 104) ==="
sed -n '100,110p' packages/injective-test-tube/src/module/auction.rs

echo ""
echo "=== Checking root Cargo.toml for package-level MSRV ==="
head -30 Cargo.toml | grep -E "rust|version"

Repository: InjectiveLabs/test-tube

Length of output: 2034


🌐 Web query:

Rust inline format string syntax minimum supported version requirement

💡 Result:

Rust's support for implicit named arguments within format strings (often referred to colloquially as "inline format strings" or f-string-like syntax, such as format!("Hello, {name}")) was stabilized in Rust 1.58.0, released on January 13, 2022 [1][2]. Prior to this version, developers were required to explicitly bind variables if they wanted to use them by name, such as format!("Hello, {name}", name = name). The introduction of this feature allows the macro to implicitly capture local variables with the same name as the identifier provided in the curly braces [3][2]. It is important to note that these are not true "f-strings" in the sense of some other programming languages (which often evaluate arbitrary expressions within the string at runtime). In Rust, the format string must still be a string literal, and the macro operates at compile-time to validate the format string against the provided arguments [4][1]. The feature simply provides syntactic sugar to reduce boilerplate when capturing local variables [3][2]. Subsequent compiler improvements, such as the one implemented in Rust 1.67, further optimized this system by allowing the compiler to flatten or inline literal arguments into the format string during compilation, which can improve performance and help with certain macro-related optimizations [5][6].

Citations:


Declare project MSRV to match Rust 1.58.0+ requirement for inline format syntax.

All four affected files use Rust's inline format string syntax ({variable} and {variable:?}), which requires Rust 1.58.0 or later. The project currently has no declared MSRV, which creates a compilation compatibility gap. Either add rust-version = "1.58" to the workspace Cargo.toml or revert to explicit format syntax (format!("{}", variable)) for compatibility with earlier Rust versions.

Affected files:

  • packages/injective-test-tube/build.rs:19
  • packages/test-tube/src/runner/app.rs:384
  • packages/test-tube/src/runner/result.rs:242
  • packages/injective-test-tube/src/module/auction.rs:104
📍 Affects 4 files
  • packages/injective-test-tube/build.rs#L19-L19 (this comment)
  • packages/test-tube/src/runner/app.rs#L384-L384
  • packages/test-tube/src/runner/result.rs#L242-L242
  • packages/injective-test-tube/src/module/auction.rs#L104-L104
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/injective-test-tube/build.rs` at line 19, The code uses Rust's
inline format string syntax (like {variable}) which requires Rust 1.58.0 or
later, but the project has no declared MSRV. To fix this across all four
affected locations (packages/injective-test-tube/build.rs:19,
packages/test-tube/src/runner/app.rs:384,
packages/test-tube/src/runner/result.rs:242, and
packages/injective-test-tube/src/module/auction.rs:104), add rust-version =
"1.58" to the workspace Cargo.toml file. Alternatively, if earlier Rust version
compatibility is required, revert the inline format string syntax at all four
locations back to explicit syntax (e.g., format!("{}", variable) instead of
format!("{variable}")). Choose one approach and apply it consistently across all
affected files to resolve the compatibility gap.

@jbernal87 jbernal87 requested a review from gorgos June 15, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants