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

chore: upgrade to cosmos-sdk v1.16.1-sdk-v0.46.13 #2115

Merged
merged 5 commits into from
Jul 24, 2023

Commits on Jul 17, 2023

  1. Configuration menu
    Copy the full SHA
    fd0fc18 View commit details
    Browse the repository at this point in the history
  2. chore: update common pipeline to v0.2.2 (celestiaorg#2086)

    hello team!
    
    This PR uses the latest version of the common pipeline, this one:
    [v0.2.2](https://github.com/celestiaorg/.github/releases/tag/v0.2.2)
    
    Please, merge after the approval, I cannot do it from my side :)
    
    Thanks in advance! 🚀
    
    Jose Ramon Mañes
    
    Signed-off-by: Jose Ramon Mañes <[email protected]>
    tty47 authored and rootulp committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    3637b81 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. refactor: use SecondsPerYear (celestiaorg#2043)

    Closes celestiaorg#2040
    
    ---------
    
    Co-authored-by: Rootul P <[email protected]>
    SurajAnand88 and rootulp committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    61c4ffc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97790fa View commit details
    Browse the repository at this point in the history
  3. fix: int overflow for 32 bit machines (celestiaorg#2135)

    Closes celestiaorg#2129
    
    celestiaorg#2121 didn't actually
    fix the issue because the expression
    
    ```go
    NanosecondsPerYear = int64(NanosecondsPerSecond * SecondsPerYear)
    ```
    was multiplying two `int`s together prior to the cast to `int64`. Since
    the product of those two `int`s overflows an `int32`, the value would
    overflow prior to the cast.
    
    The fix proposed in this PR converts SecondsPerYear to an `int64`. Now
    the expression multiplies an `int` and `int64` so the product is an
    `int64` which won't overflow.
    
    ## Testing
    
    I added this to the Makefile
    
    ```go
    ## build-arm: Build the celestia-appd binary into the ./build directory. Target the linux OS and ARM (32-bit) architecture.
    build-arm: mod
    	@cd ./cmd/celestia-appd
    	@mkdir -p build/
    	@Goos=linux GOARCH=arm go build $(BUILD_FLAGS) -o build/ ./cmd/celestia-appd
    	@go mod tidy -compat=1.20
    .PHONY: build-arm
    ```
    
    Before
    
    ```shell
    $ make build-arm
    --> Updating go.mod
    # github.com/celestiaorg/celestia-app/x/mint/types
    x/mint/types/constants.go:15:29: NanosecondsPerSecond * SecondsPerYear (constant 31556952000000000 of type int) overflows int
    make: *** [build-arm] Error 1
    ```
    
    After
    
    ```shell
    $ make build-arm
    --> Updating go.mod
    ```
    rootulp committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    722f958 View commit details
    Browse the repository at this point in the history