Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ynohtna92 committed Dec 3, 2023
2 parents 4b8b2d5 + 0b4d7af commit 5a8b8c6
Show file tree
Hide file tree
Showing 27 changed files with 650 additions and 95 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Changelog
=========

[0.12.3](https://github.com/ordinals/ord/releases/tag/0.12.3) - 2023-12-01
--------------------------------------------------------------------------

### Added
- Add `ord balances` to show rune balances (#2782)

### Fixed
- Fix preview test (#2795)
- Fix reinscriptions charm (#2793)
- Fix fee calculation for batch inscribe on same sat (#2785)

### Misc
- Add `audit-cache` binary to audit Cloudflare caching (#2787)
- Fix typos (#2791)
- Add total bytes and proportion to database info (#2783)

[0.12.2](https://github.com/ordinals/ord/releases/tag/0.12.2) - 2023-11-29
--------------------------------------------------------------------------

Expand Down
45 changes: 32 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ord-litecoin"
description = "◉ Ordinal wallet and block explorer for litecoin"
version = "0.12.2"
version = "0.12.3"
license = "CC0-1.0"
edition = "2021"
autotests = false
Expand All @@ -15,7 +15,7 @@ copyright = "The Ord Maintainers"
maintainer = "The Ord Maintainers"

[workspace]
members = [".", "test-bitcoincore-rpc"]
members = [".", "test-bitcoincore-rpc", "crates/*"]

[dependencies]
anyhow = { version = "1.0.56", features = ["backtrace"] }
Expand Down
9 changes: 9 additions & 0 deletions crates/audit-cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "audit-cache"
version = "0.0.0"
edition = "2021"
publish = false

[dependencies]
colored = "2.0.4"
reqwest = { version = "0.11.22", features = ["blocking"] }
88 changes: 88 additions & 0 deletions crates/audit-cache/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
use {
colored::Colorize,
reqwest::{blocking::get, StatusCode},
std::process,
};

const ENDPOINTS: &[(&str, StatusCode, &str)] = &[
// PNG content is cached
(
"/content/6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0",
StatusCode::OK,
"HIT",
),
// HTML content is cached
(
"/content/114c5c87c4d0a7facb2b4bf515a4ad385182c076a5cfcc2982bf2df103ec0fffi0",
StatusCode::OK,
"HIT",
),
// content respopnses that aren't found aren't cached
(
"/content/6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i1",
StatusCode::NOT_FOUND,
"BYPASS",
),
// HTML previews are cached
(
"/preview/114c5c87c4d0a7facb2b4bf515a4ad385182c076a5cfcc2982bf2df103ec0fffi0",
StatusCode::OK,
"HIT",
),
// non-HTML previews are not cached
(
"/preview/6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0",
StatusCode::OK,
"BYPASS",
),
("/static/index.css", StatusCode::OK, "HIT"),
("/static/index.js", StatusCode::OK, "HIT"),
("/sat/FOO", StatusCode::BAD_REQUEST, "HIT"),
("/", StatusCode::OK, "BYPASS"),
("/blockheight", StatusCode::OK, "BYPASS"),
];

fn main() {
eprint!("Warming up the cache");

for (endpoint, expected_status_code, _expected_cache_status) in ENDPOINTS {
let response = get(format!("https://ordinals.com{endpoint}")).unwrap();

assert_eq!(response.status(), *expected_status_code);

eprint!(".");
}

eprintln!();

let mut failures = 0;

for (endpoint, expected_status_code, expected_cache_status) in ENDPOINTS {
eprint!("GET {endpoint}");

let response = get(format!("https://ordinals.com{endpoint}")).unwrap();

let status_code = response.status();

eprint!(" {}", status_code.as_u16());

assert_eq!(response.status(), *expected_status_code);

let cache_status = response.headers().get("cf-cache-status").unwrap();

let pass = cache_status == expected_cache_status;

if pass {
eprintln!(" {}", cache_status.to_str().unwrap().green());
} else {
eprintln!(" {}", cache_status.to_str().unwrap().red());
}

failures += u32::from(!pass);
}

if failures > 0 {
eprintln!("{failures} failures");
process::exit(1);
}
}
2 changes: 1 addition & 1 deletion docs/src/bounty/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sat 0, the first sat to be mined is `nvtdijuwxlp` and the name of sat
2,099,999,997,689,999, the last sat to be mined, is `a`.

The bounty is open for submissions until block 840000—the first block after the
fourth halvening. Submissions included in block 840000 or later will not be
fourth halving. Submissions included in block 840000 or later will not be
considered.

Both parts use [frequency.tsv](frequency.tsv), a list of words and the number
Expand Down
6 changes: 3 additions & 3 deletions docs/src/guides/explorer.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Ordinal Explorer
================

The `ord` binary includes a block explorer. We host a instance of the block
The `ord` binary includes a block explorer. We host an instance of the block
explorer on mainnet at [ordinals.com](https://ordinals.com), and on signet at
[signet.ordinals.com](https://signet.ordinals.com).

Expand Down Expand Up @@ -43,7 +43,7 @@ transaction:

### Outputs

Transaction outputs can searched by outpoint, for example, the only output of
Transaction outputs can be searched by outpoint, for example, the only output of
the genesis block coinbase transaction:

[4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0](https://ordinals.com/search/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0)
Expand Down Expand Up @@ -78,7 +78,7 @@ JSON-API

You can run `ord server` with the `--enable-json-api` flag to access endpoints that
return JSON instead of HTML if you set the HTTP `Accept: application/json`
header. The structure of theses objects closely follows
header. The structure of these objects closely follows
what is shown in the HTML. These endpoints are:

- `/inscription/<INSCRIPTION_ID>`
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/inscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ See the pending transaction with:
ord wallet transactions
```

Once the send transaction confirms, you can can confirm receipt by running:
Once the send transaction confirms, you can confirm receipt by running:

```
ord wallet inscriptions
Expand Down
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,6 @@ convert-logo-to-favicon:

update-mdbook-theme:
curl https://raw.githubusercontent.com/rust-lang/mdBook/v0.4.35/src/theme/index.hbs > docs/theme/index.hbs

audit-cache:
cargo run --package audit-cache
Loading

0 comments on commit 5a8b8c6

Please sign in to comment.