1、升级rust
~# rustup update stable
~# rustc --version
rustc 1.79.0 (129f3b996 2024-06-10)
2、拉取0.18.5代码
~# wget https://github.com/ordinals/ord/archive/refs/tags/0.18.5.tar.gz
~# tar -xf 0.18.5.tar.gz
~# cd ord-0.18.5
~# cargo build --release
3、启动server
报错
~# /data/ord/bin/ord --cookie-file=/data/btc/btcdata/.cookie --bitcoin-rpc-url=127.0.0.1:8045 server
error: failed to open index: Manual upgrade required. Expected file format version 2, but file is version 1
报错是因为老的ord数据版本比现在版本低,所以就需要删除或者备份原来的数据,再重新同步
~# cd /root/.local/share/ord/
~/.local/share/ord# ls
index.redb
~/.local/share/ord# mv index.redb index.redb_bak
~/.local/share/ord# cd
~# /data/ord/bin/ord --cookie-file=/data/btc/btcdata/.cookie --bitcoin-rpc-url=127.0.0.1:8045 server
注:这次版本升级后调用btc-rpc参数改了
原来的-rpc-url需要改成–bitcoin-rpc-url