Closed softwarecheng closed 10 months ago
ord version in the project is a slightly modified version of ord 0.9.0 which exports the db changes via files. We used this method instead of writing the whole ord from scratch since we want to work with the exact same rules as main ord wallet. The only changes in the ord code is these file export lines.
After ord finishes indexing some blocks, the main indexer script collects these files and updates the PostgreSQL DB accordingly.
If you run the ord in the project directly, it'll complain about the missing file since it is meant to be run from the main indexer script. I'll update the code to give a better warning when run directly.
To solve the issue, do not run ord directly, instead run the main indexer, which will run the ord indexer periodically.
Thank you for your explanation. Inertial thinking made me think that I would use the server to complete it. While waiting, I made new discoveries that confirmed the logic of explanation(guess the data is obtained through the index command)
cd modules/main_index && node index.js
error: failed to connect to Bitcoin Core RPC at 127.0.0.1:8332/wallet/ord
because: I/O error: No such file or directory (os error 2)
ERROR ON ORD!!!
...
vi index.js(goto line 82):
let ord_index_cmd = ord_binary + " --bitcoin-data-dir " + chain_folder + " --data-dir " + ord_datadir + " --height-limit " + (ord_end_block_height) + " index run"
In addition, if it is convenient, I hope that chain support can be added to env.
Finally, thank your team again for sharing, it's good job.
chain support is in our backlog and will be added with the next update 👍
After compiling and installing ord, run:
export bitcoinDataDir="/var/lib/bitcoind" export bitcoinCookie="$bitcoinDataDir/regtest/.cookie" export ordDataDir="/var/lib/ord" export ordWalletName="ord"
ord --bitcoin-data-dir $bitcoinDataDir --cookie-file $bitcoinCookie --data-dir $ordDataDir --chain regtest --index-sats --enable-json-api server --http
Listening on http://0.0.0.0:80 cmd;0;new_block;0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 thread '' panicked at src/index/updater.rs:326:91:
called
Result::unwrap()
on anErr
value: Os { code: 2, kind: NotFound, message: "No such file or directory" } note: run withRUST_BACKTRACE=1
environment variable to display a backtraceAnother little question is that the ord in the project is 0.9.0. Compared with https://github.com/ordinals/ord/tree/0.9.0, it seems different. I don't know if I made a mistake.