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

Fix node run error and improve docker compose #3

Merged
merged 6 commits into from
Dec 5, 2022

Conversation

AlexiaChen
Copy link

之前用Docker compose运行4 validators的本地节点网络,节点内部的crisis模块的日志报出 keeper.Keeper.AssetInvariants的错误,

还提示:

CRITICAL please submit the following transaction:
   tx crisis invariant-borken bank total-supply

然后我发现了是SDK的这个模块的BUG,但是没追究其原因,我又看了下,感觉go.mod里面的sdk版本是包含了这些Fixs的

但是我本机,不在容器里面编译就可以在ubuntu 20.04的环境里面运行,所以我把Dockerfile里面的golang版本和ubuntu的版本都升级到跟我本机编译开发环境保持一致,

最后运行docker compose的时候,节点就没有报错了,并且4个validators节点正常出块,并且同一高度的block的hash是一致的。

其实Dockerfile还可以优化,直接把golang的alpine Linux版本删除,在ubuntu上构建项目,他们文昌链为什么会这样做,用Alpine Linux编译,然后拷贝到ubuntu上,是因为golang的官方Docker镜像就是推荐用Alpine Linux的镜像版本,而且他们想用musl编译项目,让irita的二进制全静态,不依赖任何动态库,所以Dockerfile里面又要下载muslc的静态库.a文件之类的,搞得很烦人。

其实完全不必这么麻烦,都容器运行了,动态静态无所谓,所以可以考虑改天优化掉。

@AlexiaChen AlexiaChen self-assigned this Dec 5, 2022
@sulijia sulijia merged commit 9e14a33 into develop-release-3.2.4 Dec 5, 2022
@AlexiaChen AlexiaChen deleted the test-doc-base-v3 branch December 5, 2022 01:24
@AlexiaChen AlexiaChen restored the test-doc-base-v3 branch December 5, 2022 01:25
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