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

Ord 0.9.0 running service exception #2

Closed
softwarecheng opened this issue Dec 11, 2023 · 3 comments
Closed

Ord 0.9.0 running service exception #2

softwarecheng opened this issue Dec 11, 2023 · 3 comments

Comments

@softwarecheng
Copy link

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 an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Another 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.

@samedcildir
Copy link
Contributor

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.

@softwarecheng
Copy link
Author

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.

@samedcildir
Copy link
Contributor

chain support is in our backlog and will be added with the next update 👍

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

No branches or pull requests

2 participants