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

make rosetta-data command is broken #12772

Closed
larry0x opened this issue Jul 28, 2022 · 2 comments · Fixed by #13103
Closed

make rosetta-data command is broken #12772

larry0x opened this issue Jul 28, 2022 · 2 comments · Fixed by #13103
Assignees
Labels
C:Rosetta Issues and PR related to Rosetta

Comments

@larry0x
Copy link
Contributor

larry0x commented Jul 28, 2022

Summary of Bug

the make rosetta-data command is broken with the following error:

$ make rosetta-data          
                    
Makefile:76: RocksDB support is disabled; to build and test with RocksDB support, set ENABLE_ROCKSDB=true
docker container rm data_dir_build
data_dir_build
docker build -t rosetta-ci:latest -f contrib/rosetta/rosetta-ci/Dockerfile .
[+] Building 2.7s (25/25) FINISHED                                                                                                      
 => [internal] load build definition from Dockerfile                                                                               0.2s
 => => transferring dockerfile: 37B                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                  0.2s
 => => transferring context: 34B                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                   1.6s
 => [internal] load metadata for docker.io/library/golang:1.18-alpine                                                              1.6s
 => [build 1/8] FROM docker.io/library/golang:1.18-alpine@sha256:af22f4a8328063faee4b28da1b1bbccccb6f3ccaa0a07006f9d3aa2da43d18c2  0.1s
 => => resolve docker.io/library/golang:1.18-alpine@sha256:af22f4a8328063faee4b28da1b1bbccccb6f3ccaa0a07006f9d3aa2da43d18c2        0.1s
 => [internal] load build context                                                                                                  0.3s
 => => transferring context: 337.19kB                                                                                              0.2s
 => [stage-1  1/11] FROM docker.io/library/alpine@sha256:7580ece7963bfa863801466c0a488f11c86f85d9988051a9f9c68cb27f6b7872          0.0s
 => CACHED [stage-1  2/11] RUN apk add gcc git libc-dev python3 --no-cache                                                         0.0s
 => CACHED [build 2/8] RUN apk add --no-cache tar git                                                                              0.0s
 => CACHED [build 3/8] WORKDIR /node                                                                                               0.0s
 => CACHED [build 4/8] COPY ./contrib/rosetta/rosetta-ci/data.tar.gz data.tar.gz                                                   0.0s
 => CACHED [build 5/8] RUN tar -zxvf data.tar.gz -C .                                                                              0.0s
 => CACHED [build 6/8] WORKDIR /simd                                                                                               0.0s
 => CACHED [build 7/8] COPY . ./                                                                                                   0.0s
 => CACHED [build 8/8] RUN go build -o simd ./simapp/simd/                                                                         0.0s
 => CACHED [stage-1  3/11] COPY --from=build /simd/simd /bin/simd                                                                  0.0s
 => CACHED [stage-1  4/11] WORKDIR /rosetta                                                                                        0.0s
 => CACHED [stage-1  5/11] COPY ./contrib/rosetta/configuration ./                                                                 0.0s
 => CACHED [stage-1  6/11] RUN chmod +x run_tests.sh                                                                               0.0s
 => CACHED [stage-1  7/11] RUN chmod +x send_funds.sh                                                                              0.0s
 => CACHED [stage-1  8/11] RUN chmod +x faucet.py                                                                                  0.0s
 => CACHED [stage-1  9/11] COPY --from=build /node/root /root/                                                                     0.0s
 => CACHED [stage-1 10/11] WORKDIR /root/.simapp                                                                                   0.0s
 => CACHED [stage-1 11/11] RUN chmod -R 0777 ./                                                                                    0.0s
 => exporting to image                                                                                                             0.2s
 => => exporting layers                                                                                                            0.0s
 => => writing image sha256:201b35d590e73821eb3aac8fb3c9c7836585a9949f24d48d5685207427c8d0dd                                       0.0s
 => => naming to docker.io/library/rosetta-ci:latest                                                                               0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
docker run --name data_dir_build -t rosetta-ci:latest sh /rosetta/data.sh
clearing /root/.simapp
initting new chain
panic: could not create directory "data": mkdir data: no such file or directory

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/simapp.SimApp.RegisterUpgradeHandlers({0xc00087a300, 0xc0004275d8, {0x2af0490, 0xc00043ae80}, {0x2ae3468, 0xc0005f1c00}, {0x2adb868, 0xc0001193f8}, 0x0, {{0x2ac1cf8, ...}, ...}, ...})
        /simd/simapp/upgrades.go:26 +0x445
github.com/cosmos/cosmos-sdk/simapp.NewSimApp({0x2ad83e0, 0xc0009c2380}, {0x2ae5f10, 0xc0001e55c0}, {0x0, 0x0}, 0x90?, {0x2abed60?, 0x3b70618}, {0x0, ...})
        /simd/simapp/app.go:280 +0x995
github.com/cosmos/cosmos-sdk/simapp/simd/cmd.NewRootCmd()
        /simd/simapp/simd/cmd/root.go:45 +0x2ec
main.main()
        /simd/simapp/simd/main.go:13 +0x19
make: *** [rosetta-data] Error 2

what i know:

  • the panic happens during simd init, at this particular line of code in the x/upgrade module:

    err := tmos.EnsureDir(upgradeInfoFileDir, os.ModePerm)

  • the command works on v0.46.0, but breaks at the latest main branch (2bec9d2)

  • if i compile simd and just run simd init on my computer (i.e. not inside the docker container used for make rosetta-data), the initialization works properly

  • the breaking must have come from one of the PRs that was merged in the last two days, because the bug goes away as soon as i git reset --hard those commits

Version

2bec9d2

Steps to Reproduce

git clone https://github.com/cosmos/cosmos-sdk.git
cd cosmos-sdk
git checkout main
make rosetta-data
@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 29, 2022

It's frustrating that no one maintains Rosetta in the core team and we have to essentially maintain and deal with the tech debt it incurs. I would love to see Rosetta completely removed from the SDK and into its own module/repo.

Thoughts @marbar3778?

@tac0turtle
Copy link
Member

@jleni and the team at zondax will be picking up maintenance of rosetta. We should redo tests and make it work against a version of the sdk and not master as it causes issues.

@tac0turtle tac0turtle added the C:Rosetta Issues and PR related to Rosetta label Aug 10, 2022
@julienrbrt julienrbrt assigned julienrbrt and unassigned julienrbrt Aug 20, 2022
@julienrbrt julienrbrt moved this to 📝 Todo in Cosmos-SDK Aug 30, 2022
@kocubinski kocubinski self-assigned this Aug 30, 2022
Repository owner moved this from 📝 Todo to 👏 Done in Cosmos-SDK Aug 30, 2022
@tac0turtle tac0turtle removed this from Cosmos-SDK Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Rosetta Issues and PR related to Rosetta
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants