Browse Source

Update Ordinals to v0.18.2 (#1057)

main
Nathan Fretz 9 months ago
committed by GitHub
parent
commit
70f855eff4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      ordinals/docker-compose.yml
  2. 41
      ordinals/hooks/pre-start
  3. 9
      ordinals/umbrel-app.yml

5
ordinals/docker-compose.yml

@ -8,10 +8,11 @@ services:
PROXY_AUTH_ADD: "false"
ord:
image: mayankchhabra/ord:0.18.1@sha256:9cc88552cca2b59ed6417790ec1b43f4dbfaf0c9ea3fdf79bf055dcd6dcb60b8
image: nmfretz/ord:0.18.2@sha256:9f9445ae39df02c31ccf5e604f2539f148ccbd38703e717e1208b08583b9d406
# This needs to run as root
# user: "1000:1000"
restart: on-failure
stop_grace_period: 15m30s
command: "ord server --http"
volumes:
- ${APP_DATA_DIR}/data/ord:/var/lib/ord
@ -25,6 +26,6 @@ services:
ORD_BITCOIN_RPC_URL: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}"
ORD_CHAIN: "${APP_BITCOIN_NETWORK}"
# First-inscription-height may not be needed in the future. It would be nice to remove it so that other chains like testnet are not impacted.
ORD_FIRST_INSCRIPTION_HEIGHT: "767430"
# ORD_FIRST_INSCRIPTION_HEIGHT: "767430"
ORD_INDEX_RUNES: "true"
# TODO: consider index-sats

41
ordinals/hooks/pre-start

@ -37,7 +37,48 @@ if [[ ! -f "${APP_DATA_DIR}/AT_LEAST_0-18-1" ]]; then
touch "${APP_DATA_DIR}/AT_LEAST_0-18-1"
fi
# migrate all wallet database files to ord/wallets, ord/testnet3/wallets, ord/regtest/wallets, and ord/signet/wallets for pre-0.18.2 versions: https://github.com/ordinals/ord/releases/tag/0.18.2
# the default unnamed wallet from `ord wallet create` is called ord.redb, but users can create named wallets as <anything>.redb
# we assume that all .redb files except index.redb are wallet database files
# for installs post 0.18.2, the AT_LEAST_0-18-2 file will be harmlessly created
if [[ ! -f "${APP_DATA_DIR}/AT_LEAST_0-18-2" ]]; then
echo "AT_LEAST_0-18-2 not found, proceeding with wallet database migration if necessary..."
# declare bitcoin network directories
declare -a dirs=("" "/testnet3" "/regtest" "/signet")
for dir in "${dirs[@]}"; do
dir_path="${ORDINALS_DATA_DIR}${dir}"
echo "Checking directory: ${dir_path}"
if [[ -d "${dir_path}" ]]; then
echo "${dir_path} exists."
files_to_move=() # an array to store wallet database files to migrate
# Iterate over .redb files that are not index.redb
for file in "${dir_path}"/*.redb; do
if [[ -f "${file}" && "$(basename "${file}")" != "index.redb" ]]; then
files_to_move+=("${file}")
echo "Adding ${file} to move list."
fi
done
# We only create the wallets directory if there are files to move. This mimics the behavior of ord 0.18.2, which only creates the wallets directory when a wallet database is created.
if [[ ${#files_to_move[@]} -gt 0 ]]; then
mkdir -p "${dir_path}/wallets"
echo "Creating wallets directory in ${dir_path}/wallets"
for file in "${files_to_move[@]}"; do
echo "Moving ${file} to ${dir_path}/wallets/"
mv "${file}" "${dir_path}/wallets/"
done
else
echo "No wallet files to move in ${dir_path}."
fi
else
echo "${dir_path} does not exist, skipping."
fi
done
touch "${APP_DATA_DIR}/AT_LEAST_0-18-2"
echo "Wallet database migration complete, flag file created."
else
echo "Migration flag file already exists, skipping wallet database migration."
fi

9
ordinals/umbrel-app.yml

@ -2,7 +2,7 @@ manifestVersion: 1
id: ordinals
category: bitcoin
name: Ordinals
version: "0.18.1"
version: "0.18.2"
tagline: Run your own index, block explorer, and command-line wallet for Ordinals
description: >
Run your own index, block explorer, and command-line wallet for Ordinals. The app automatically connects to your Bitcoin node on umbrelOS for trustless operation. Simply install the app and wait for Ordinals to index inscriptions and runes.
@ -16,10 +16,13 @@ description: >
Disclaimer: The Ordinals app does not control, filter, or moderate the content hosted on the Bitcoin blockchain. Consequently, you may come across NSFW (Not Safe For Work), objectionable, or unlawful material while using the app.
releaseNotes: >-
🚨 This update will automatically perform a full re-index of the ord database to prepare for upcoming runes.
🚨 This update will automatically migrate existing wallet databases to the new ord 0.18.2 file structure. Simply update the app, and the rest is taken care of — no manual migration required!
Ord 0.18.1 brings several crucial bug fixes and improvements related to runes. Full release notes can be found at: https://github.com/ordinals/ord/releases
⏳ If ord is currently indexing, it may take a few minutes to safely shut down before updating. Please be patient during this process.
Full release notes can be found at: https://github.com/ordinals/ord/releases
developer: Casey Rodarmor
website: https://ordinals.com/
dependencies:

Loading…
Cancel
Save