# Experiment with Lotus ###### tags: `Daily update` `lotus` ## building from source **Setup**: manjaro linux, a distro based in Arch Linux 1. 基于Arch Linux的系统有具体的dependency。安装成功。 2. 遇到问题 `make clean all`, 报错 ``` ... cargo is not installed ``` 找到一个答案 [这个](https://github.com/rust-lang/rustup/issues/2010) ``` rustup uninstall stable rustup install stable reboot ``` 结果是我的电脑的 `$PATH` 环境变量的问题。`~/.bashrc` 里手动改了系统就找到`go`程序了. **Note: 电脑用的Ryzen 5 CPU, 架构是AMD Zen. 所以使用了以下的编译选项** ``` export RUSTFLAGS="-C target-cpu=native -g" export FFI_BUILD_FROM_SOURCE=1 ``` 好像会让lotus跑的更快,要求是AMD Zen或更新,Intel Ice Lake或更新。 3. Now `make clean all` works. 成功运行`sudo make install`. 现在`lotus`, `lotus-miner`和`lotus-worker`程序可以运行。 ## snapshot的导入 1. 下载完毕,sha256 checksum✅ 下载下来有32GB,说明2000epoch里的`messages`+`state`含有不只filfox提到的东西。 3. 开始同步 `lotus daemon --import-snapshot minimal...` 理论上应该开始下载安全proof,实际上先导入chain。 3. 暂时停止了同步 `lotus daemon stop` 在另一个terminal里 ## 运行选项 ``` lotus【global options】command [command options] [arguments...] ``` 注意`-h`放的位置不同代表的意思不同 ``` lotus -h % help on lotus lotus daemon -h % help on lotus command daemon ``` ## Visor 建立 ### build ``` make deps make build ``` ### 搭建timescaledb和grafana环境 1. 试图阅读理解docker-compose.yml去看怎么setup. `build/docker/readme.md` 2. **问题出现**,我想手动安装timescaledb。然而 * visor 需要timescaledb 1.7.x * timescaledb 1.7需要postgresql 12或11. * postgresql官网没有arch linux支持的安装方案。只有ubuntu, debian, SUSE, Red Hat/Rocky/CentOS. Other linux方案是让你通过第三方安装,我觉得这样不稳妥。所以还是探索一下用docker装吧,不行的话就该用云计算装好了。 问了sylvan云计算的申请预算。 3. 先试用docker安装timescale。