Skip to content

Commit

Permalink
update readme and dockerfile (ordinals#70)
Browse files Browse the repository at this point in the history
* update readme

* add dockerfile
  • Loading branch information
wanyvic authored Jun 2, 2023
1 parent 2ea0cb2 commit 59b0227
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 61 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM rust:1.69.0-buster as builder

ADD . /ord

RUN cd /ord && cargo build --release --features=rollback

# runtime
FROM debian:buster-slim

COPY --from=builder /ord/target/release/ord /usr/local/bin/

RUN apt-get update && apt-get install ca-certificates -y && rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["ord"]
72 changes: 11 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,13 @@
`ord`
=====

`ord` is an index, block explorer, and command-line wallet. It is experimental
software with no warranty. See [LICENSE](LICENSE) for more details.

Ordinal theory imbues satoshis with numismatic value, allowing them to
be collected and traded as curios.

Ordinal numbers are serial numbers for satoshis, assigned in the order in which
they are mined, and preserved across transactions.

See [the docs](https://docs.ordinals.com) for documentation and guides.

See [the BIP](bip.mediawiki) for a technical description of the assignment and
transfer algorithm.

See [the project board](https://github.com/users/casey/projects/3/) for
currently prioritized issues.

See [milestones](https://github.com/casey/ord/milestones) to get a sense of
where the project is and where it's going.

Join [the Discord server](https://discord.gg/87cjuz4FYg) to chat with fellow
ordinal degenerates.

Wallet
------

`ord` relies on Bitcoin Core for private key management and transaction signing.
This has a number of implications that you must understand in order to use
`ord` wallet commands safely:

- Bitcoin Core is not aware of inscriptions and does not perform sat
control. Using `bitcoin-cli` commands and RPC calls with `ord` wallets may
lead to loss of inscriptions.

- `ord wallet` commands automatically load the `ord` wallet given by the
`--wallet` option, which defaults to 'ord'. Keep in mind that after running
an `ord wallet` command, an `ord` wallet may be loaded.

- Because `ord` has access to your Bitcoin Core wallets, `ord` should not be
used with wallets that contain a material amount of funds. Keep ordinal and
cardinal wallets segregated.

### Pre-alpha wallet migration

Alpha `ord` wallets are not compatible with wallets created by previous
versions of `ord`. To migrate, use `ord wallet send` from the old wallet to
send sats and inscriptions to addresses generated by the new wallet with `ord
wallet receive`.
`ord` forks on [casey's](https://github.com/casey/ord) and adds the [BRC20 Protocol](https://domo-2.gitbook.io/brc-20-experiment/) feature. It can easily call the API, obtaining the BRC20 transaction and tick balance.

Installation
------------

`ord` is written in Rust and can be built from
[source](https://github.com/casey/ord). Pre-built binaries are available on the
[releases page](https://github.com/casey/ord/releases).

You can install the latest pre-built binary from the command line with:

```sh
curl --proto '=https' --tlsv1.2 -fsLS https://ordinals.com/install.sh | bash -s
```
[source](https://github.com/okx/ord).

Once `ord` is installed, you should be able to run `ord --version` on the
command line.
Expand All @@ -84,15 +30,19 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
To build `ord` from source:

```
git clone https://github.com/casey/ord.git
git clone https://github.com/okx/ord.git
cd ord
cargo build --release
cargo build --release --feature=rollback
```

Once built, the `ord` binary can be found at `./target/release/ord`.

`ord` requires `rustc` version 1.67.0 or later. Run `rustc --version` to ensure you have this version. Run `rustup update` to get the latest stable release.

**notice**: casey `ord` does not deal with block reorganization. The database becomes corrupt when a reorganization occurs.

To enable automatic block reorganization, we introduced Redb's savepoint feature, a database backup in the memory. Bitcoin barely reorganizes after six confirmation blocks, and it is possible to make one savepoint every three blocks and keep up to four savepoints so that data can be backed up at least ten heights back. You can add `--feature=rollback` compilation options to activate this feature.

Syncing
-------

Expand Down Expand Up @@ -147,12 +97,12 @@ bitcoin_rpc_pass: bar
Logging
--------
`ord` uses [env_logger](https://docs.rs/env_logger/latest/env_logger/). Set the
`RUST_LOG` environment variable in order to turn on logging. For example, run
`ord` uses [log4rs](https://docs.rs/log4rs/latest/log4rs/) instead of [env_logger](https://docs.rs/env_logger/latest/env_logger/). Set the
`--log-level` argument variable in order to turn on logging. For example, run
the server and show `info`-level log messages and above:

```
$ RUST_LOG=info cargo run server
$ cargo run server --log-level info
```

New Releases
Expand Down

0 comments on commit 59b0227

Please sign in to comment.