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

Support WASM stargate queries #309

Merged
merged 12 commits into from
Jul 24, 2023
Merged

Support WASM stargate queries #309

merged 12 commits into from
Jul 24, 2023

Conversation

nghuyenthevinh2000
Copy link
Contributor

@nghuyenthevinh2000 nghuyenthevinh2000 commented Jul 19, 2023

Summary of changes

Enable stargate query through cosmwasm. This will allow Deps to be <Empty>

Code on Rust side: classic-terra/classic-bindings#1

  • test stargate query through contract
  • test upgrade

@nghuyenthevinh2000 nghuyenthevinh2000 self-assigned this Jul 19, 2023
@nghuyenthevinh2000 nghuyenthevinh2000 added the backport/v2.1.x PR scheduled for inclusion in the v2.1's next stable release label Jul 21, 2023
@inon-man
Copy link
Collaborator

inon-man commented Jul 21, 2023

Since there is no need to set the soft-fork and half height separately, I think it would be better to update only the minor version and recommend it to the public infrastructure providers.

I have already confirmed that state breaking does not occur on the mainnet, so I will conduct a final test after conducting additional source code refactoring.

@inon-man inon-man self-requested a review July 21, 2023 09:58
@inon-man inon-man added the enhancement New feature or request label Jul 21, 2023
@inon-man inon-man changed the title Enable wasm stargate Support WASM stargate queries Jul 21, 2023
for i := 0; i < numInputs; i++ {
rate := float64(int64(rand.Float64()*base)) / base
rate := float64(int64(r.Float64()*base)) / base

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
for i := 0; i < numInputs; i++ {
rate := float64(int64(rand.Float64()*base)) / base
rate := float64(int64(r.Float64()*base)) / base

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
@@ -23,17 +23,17 @@

base := math.Pow10(OracleDecPrecision)

rand.Seed(int64(time.Now().Nanosecond()))
numInputs := 10 + (rand.Int() % 100)
r := rand.New(rand.NewSource(int64(time.Now().Nanosecond())))

Check warning

Code scanning / CodeQL

Calling the system time

Calling the system time may be a possible source of non-determinism
@inon-man inon-man requested a review from alchemist-ti July 21, 2023 20:00
@inon-man inon-man force-pushed the enable-wasm-stargate branch from 5c90abe to 76ea3a9 Compare July 21, 2023 21:06
@inon-man inon-man force-pushed the enable-wasm-stargate branch from b8d0aab to f4667f7 Compare July 21, 2023 21:09
Copy link
Collaborator

@inon-man inon-man left a comment

Choose a reason for hiding this comment

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

LGTM. I bumped go version to 1.20 as well.

@alchemist-ti alchemist-ti removed the request for review from chengwenxi July 24, 2023 06:44
@nghuyenthevinh2000 nghuyenthevinh2000 merged commit 63acef9 into main Jul 24, 2023
@nghuyenthevinh2000 nghuyenthevinh2000 deleted the enable-wasm-stargate branch July 24, 2023 11:38
mergify bot pushed a commit that referenced this pull request Jul 24, 2023
Co-authored-by: Inon Man <[email protected]>
(cherry picked from commit 63acef9)
nghuyenthevinh2000 added a commit that referenced this pull request Jul 24, 2023
nghuyenthevinh2000 added a commit that referenced this pull request Aug 2, 2023
@nghuyenthevinh2000 nghuyenthevinh2000 added this to the v2.2.0 milestone Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v2.1.x PR scheduled for inclusion in the v2.1's next stable release enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants