-
Notifications
You must be signed in to change notification settings - Fork 161
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: fix the query for max withdraw #2638
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Go 1.23 is not yet supported by golangci-lint The golangci-lint tool currently uses Go 1.22.1 as specified in its go.mod file. Using Go 1.23 in the workflow could lead to compatibility issues since:
Please update the Go version in the workflow to 1.22 to ensure compatibility with golangci-lint. 🔗 Analysis chainVerify golangci-lint compatibility with Go 1.23 Using an unreleased Go version (1.23) could cause compatibility issues with golangci-lint. Additionally:
Let's check golangci-lint's Go compatibility: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check golangci-lint's supported Go versions
curl -s https://raw.githubusercontent.com/golangci/golangci-lint/master/go.mod | grep -A 1 "go "
Length of output: 390 |
||
cache: true | ||
|
||
- name: golangci-lint main | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Avoid using unreleased Go version for production releases Using Go 1.23 (unreleased) for building release binaries poses significant risks:
Consider maintaining the current stable Go version for production releases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you check again, it is already released There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gsk967, thank you for the clarification. You're absolutely right; Go 1.23 has been released. The update is appropriate. (A curious rabbit tilts its head, ears perked up) ✏️ Learnings added
|
||
cache: true | ||
|
||
- name: Set Env | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
|
||
- name: Install runsim | ||
run: export GO111MODULE="on" && go install github.com/cosmos/tools/cmd/[email protected] | ||
|
@@ -40,7 +40,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
cache: true | ||
- name: Test application non-determinism | ||
if: env.GIT_DIFF | ||
|
@@ -65,7 +65,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
cache: true | ||
- uses: actions/cache@v4 | ||
if: env.GIT_DIFF | ||
|
@@ -95,7 +95,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
cache: true | ||
- uses: actions/cache@v4 | ||
if: env.GIT_DIFF | ||
|
@@ -124,7 +124,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.23" | ||
cache: true | ||
- uses: actions/cache@v4 | ||
if: env.GIT_DIFF | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
# Docker for e2e testing | ||||||
# Creates dynamic binaries, by building from the latest version of umeed | ||||||
|
||||||
FROM golang:1.22-bookworm AS builder | ||||||
FROM golang:1.23-bookworm AS builder | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid Go version in base image The specified Go version "1.23" in the base image is not yet released. The latest stable version is Go 1.22.x. Apply this diff to fix the base image: -FROM golang:1.23-bookworm AS builder
+FROM golang:1.22-bookworm AS builder 📝 Committable suggestion
Suggested change
|
||||||
ARG EXPERIMENTAL=true | ||||||
|
||||||
## Download go module dependencies for umeed | ||||||
|
@@ -18,7 +18,7 @@ RUN if [ "$EXPERIMENTAL" = "true" ] ; then echo "Installing experimental build"; | |||||
RUN make install | ||||||
|
||||||
## Prepare the final clear binary | ||||||
FROM ubuntu:23.04 | ||||||
FROM ubuntu:24.04 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid Ubuntu version in base image Ubuntu 24.04 is not yet released. Consider using Ubuntu 22.04 LTS for better stability and long-term support. Apply this diff to fix the base image: -FROM ubuntu:24.04
+FROM ubuntu:22.04 📝 Committable suggestion
Suggested change
|
||||||
EXPOSE 26656 26657 1317 9090 7171 | ||||||
ENTRYPOINT ["umeed", "start"] | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
# Stage-1: build | ||||||
# We use Debian Bullseye rather then Alpine because Alpine has problem building libwasmvm | ||||||
# - requires to download libwasmvm_muslc from external source. Build with glibc is straightforward. | ||||||
FROM golang:1.22-bookworm AS builder | ||||||
FROM golang:1.23-bookworm AS builder | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid Go version in base image The specified Go version "1.23" in the base image is not yet released. The latest stable version is Go 1.22.x. Apply this diff to fix the base image: -FROM golang:1.23-bookworm AS builder
+FROM golang:1.22-bookworm AS builder 📝 Committable suggestion
Suggested change
|
||||||
|
||||||
WORKDIR /src/ | ||||||
# optimization: if go.sum didn't change, docker will use cached image | ||||||
|
@@ -14,7 +14,7 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=badgerdb make install | |||||
|
||||||
# Stage-2: copy binary and required artifacts to a fresh image | ||||||
# we need to use debian compatible system. | ||||||
FROM ubuntu:23.04 | ||||||
FROM ubuntu:24.04 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid Ubuntu version in base image Ubuntu 24.04 is not yet released. Consider using Ubuntu 22.04 LTS for better stability and long-term support. Apply this diff to fix the base image: -FROM ubuntu:24.04
+FROM ubuntu:22.04 📝 Committable suggestion
Suggested change
|
||||||
EXPOSE 26656 26657 1317 9090 | ||||||
# Run umeed by default, omit entrypoint to ease using container with CLI | ||||||
CMD ["umeed"] | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,9 +308,7 @@ func (q Querier) MaxWithdraw( | |
} else { | ||
// Denom not specified | ||
for _, t := range q.GetAllRegisteredTokens(ctx) { | ||
if !t.Blacklist { | ||
denoms = append(denoms, t.BaseDenom) | ||
} | ||
denoms = append(denoms, t.BaseDenom) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent blacklist filtering between MaxWithdraw and MaxBorrow There's an inconsistency in how blacklisted tokens are handled:
This divergence in behavior needs clarification:
Would you like me to help document this behavioral difference or align the implementations? Also applies to: 391-397 💡 Codebase verification Based on the search results, I can now generate the final response: Blacklist filtering should be maintained in MaxWithdraw The removal of blacklist filtering in
The change introduces inconsistency with the rest of the codebase's treatment of blacklisted tokens and should maintain the blacklist filtering. 🔗 Analysis chainVerify the removal of blacklist filtering The change removes the blacklist filtering for tokens in 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if blacklist filtering is consistently applied across the codebase
# Search for blacklist usage in token filtering
rg -A 5 'Blacklist'
# Search for MaxWithdraw related tests
ast-grep --pattern 'func TestMaxWithdraw($$$)'
Length of output: 19089 |
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid Go version specified
The specified Go version "1.23" is not yet released. The latest stable version is Go 1.22.x. Using an unreleased version will cause CI failures.
Apply this diff to fix the Go version:
📝 Committable suggestion