From cc891dcdebca3570d1e9c395d5ec971a2a010ea5 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 2 Jan 2024 12:05:52 -0800 Subject: [PATCH 1/3] Clean up justfile (#2939) --- Vagrantfile | 17 ---------- benchmark/checkout | 17 ---------- benchmark/run | 13 ------- justfile | 84 +++------------------------------------------- 4 files changed, 4 insertions(+), 127 deletions(-) delete mode 100644 Vagrantfile delete mode 100755 benchmark/checkout delete mode 100755 benchmark/run diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index e84a2a1906..0000000000 --- a/Vagrantfile +++ /dev/null @@ -1,17 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.box = "debian/bullseye64" - - config.vm.provider "virtualbox" do |v| - v.memory = 1024 * 4 - end - - config.vm.network "private_network", ip: "192.168.56.4" - - config.vm.provision "shell" do |s| - s.inline = "" - Dir.glob("#{Dir.home}/.ssh/*.pub").each do |path| - key = File.read(path).strip - s.inline << "echo '#{key}' >> /root/.ssh/authorized_keys\n" - end - end -end diff --git a/benchmark/checkout b/benchmark/checkout deleted file mode 100755 index 1bf921fda1..0000000000 --- a/benchmark/checkout +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -REV=$1 - -if [[ ! -d ord ]]; then - git clone https://github.com/ordinals/ord.git -fi - -cd ord - -git fetch --all --prune -git checkout master -git reset --hard origin/master -git checkout `git rev-parse origin/$REV` -./benchmark/run diff --git a/benchmark/run b/benchmark/run deleted file mode 100755 index e26f0ba35e..0000000000 --- a/benchmark/run +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -systemctl stop ord-dev - -rm -rf /var/lib/ord-dev - -journalctl --unit ord-dev --rotate - -journalctl --unit ord-dev --vacuum-time 1s - -./bin/update-dev-server diff --git a/justfile b/justfile index 5bb8fb1dd3..71da16a57d 100644 --- a/justfile +++ b/justfile @@ -27,9 +27,9 @@ deploy branch remote chain domain: deploy-mainnet-alpha branch='master' remote='ordinals/ord': (deploy branch remote 'main' 'alpha.ordinals.net') -deploy-mainnet-balance branch='master' remote='ordinals/ord': (deploy branch remote 'main' 'balance.ordinals.net') +deploy-mainnet-bravo branch='master' remote='ordinals/ord': (deploy branch remote 'main' 'bravo.ordinals.net') -deploy-mainnet-stability branch='master' remote='ordinals/ord': (deploy branch remote 'main' 'stability.ordinals.net') +deploy-mainnet-charlie branch='master' remote='ordinals/ord': (deploy branch remote 'main' 'charlie.ordinals.net') deploy-regtest branch='master' remote='ordinals/ord': (deploy branch remote 'regtest' 'regtest.ordinals.net') @@ -56,35 +56,9 @@ install-personal-key key='~/.ssh/id_ed25519.pub': ssh-copy-id -i '{{ key }}' root@$server.ordinals.net done -save-ord-dev-state domain='ordinals-dev.com': - $EDITOR ./deploy/save-ord-dev-state - scp ./deploy/save-ord-dev-state root@{{domain}}:~ - ssh root@{{domain}} "./save-ord-dev-state" - -log unit='ord' domain='ordinals.net': +log unit='ord' domain='alpha.ordinals.net': ssh root@{{domain}} 'journalctl -fu {{unit}}' -test-deploy: - ssh-keygen -f ~/.ssh/known_hosts -R 192.168.56.4 - vagrant up - ssh-keyscan 192.168.56.4 >> ~/.ssh/known_hosts - rsync -avz \ - --delete \ - --exclude .git \ - --exclude target \ - --exclude .vagrant \ - --exclude index.redb \ - . root@192.168.56.4:ord - ssh root@192.168.56.4 'cd ord && ./deploy/setup' - -time-tests: - cargo +nightly test -- -Z unstable-options --report-time - -profile-tests: - cargo +nightly test -- -Z unstable-options --report-time \ - | sed -n 's/^test \(.*\) ... ok <\(.*\)s>/\2 \1/p' | sort -n \ - | tee test-times.txt - fuzz: #!/usr/bin/env bash set -euxo pipefail @@ -96,9 +70,6 @@ fuzz: cargo +nightly fuzz run varint-encode -- -max_total_time=60 done -decode txid: - bitcoin-cli getrawtransaction {{txid}} | xxd -r -p - | cargo run decode - open: open http://localhost @@ -155,63 +126,16 @@ update-modern-normalize: https://raw.githubusercontent.com/sindresorhus/modern-normalize/main/modern-normalize.css \ > static/modern-normalize.css -download-log unit='ord' host='ordinals.net': +download-log unit='ord' host='alpha.ordinals.net': ssh root@{{host}} 'mkdir -p tmp && journalctl -u {{unit}} > tmp/{{unit}}.log' rsync --progress --compress root@{{host}}:tmp/{{unit}}.log tmp/{{unit}}.log -download-index unit='ord' host='ordinals.net': - rsync --progress --compress root@{{host}}:/var/lib/{{unit}}/index.redb tmp/{{unit}}.index.redb - graph log: ./bin/graph $1 flamegraph dir=`git branch --show-current`: ./bin/flamegraph $1 -benchmark index height-limit: - ./bin/benchmark $1 $2 - -benchmark-revision rev: - ssh root@ordinals.net 'mkdir -p benchmark \ - && apt-get update --yes \ - && apt-get upgrade --yes \ - && apt-get install --yes git rsync' - rsync -avz benchmark/checkout root@ordinals.net:benchmark/checkout - ssh root@ordinals.net 'cd benchmark && ./checkout {{rev}}' - -benchmark-branch branch: - #/usr/bin/env bash - # rm -f master.redb - rm -f {{branch}}.redb - # git checkout master - # cargo build --release - # time ./target/release/ord --index master.redb index update - # ll master.redb - git checkout {{branch}} - cargo build --release - time ./target/release/ord --index {{branch}}.redb index update - ll {{branch}}.redb - -build-snapshots: - #!/usr/bin/env bash - set -euxo pipefail - rm -rf tmp/snapshots - mkdir -p tmp/snapshots - cargo build --release - cp ./target/release/ord tmp/snapshots - cd tmp/snapshots - for start in {0..750000..50000}; do - height_limit=$((start+50000)) - if [[ -f $start.redb ]]; then - cp -c $start.redb index.redb - fi - a=`date +%s` - time ./ord --data-dir . --height-limit $height_limit index - b=`date +%s` - mv index.redb $height_limit.redb - printf "$height_limit\t$((b - a))\n" >> time.txt - done - serve-docs: build-docs open http://127.0.0.1:8080 python3 -m http.server --directory docs/build/html --bind 127.0.0.1 8080 From c1fa74ff48c8fe71350c4870c0ea427ac3a709d7 Mon Sep 17 00:00:00 2001 From: raph Date: Wed, 3 Jan 2024 19:41:13 +0100 Subject: [PATCH 2/3] Fix wallet create (#2943) --- src/subcommand/wallet.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/subcommand/wallet.rs b/src/subcommand/wallet.rs index 4423626fae..64641d4383 100644 --- a/src/subcommand/wallet.rs +++ b/src/subcommand/wallet.rs @@ -158,11 +158,17 @@ pub(crate) fn get_change_address(client: &Client, chain: Chain) -> Result Result { - let client = check_version(options.bitcoin_rpc_client(None)?)?; + check_version(options.bitcoin_rpc_client(None)?)?.create_wallet( + &wallet, + None, + Some(true), + None, + None, + )?; - let network = options.chain().network(); + let client = options.bitcoin_rpc_client(Some(wallet))?; - client.create_wallet(&wallet, None, Some(true), None, None)?; + let network = options.chain().network(); let secp = Secp256k1::new(); From 9f19a9e054884b3475ddacd0786d278c11f26515 Mon Sep 17 00:00:00 2001 From: raph Date: Wed, 3 Jan 2024 19:50:32 +0100 Subject: [PATCH 3/3] Release 0.14.1 (#2946) --- CHANGELOG.md | 9 +++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23bf0389e5..cef3bb6103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Changelog ========= +[0.14.1](https://github.com/ordinals/ord/releases/tag/0.14.1) - 2023-01-03 +-------------------------------------------------------------------------- + +### Fixed +- Fix wallet create (#2943) + +## Misc +- Clean up justfile (#2939) + [0.14.0](https://github.com/ordinals/ord/releases/tag/0.14.0) - 2023-01-02 -------------------------------------------------------------------------- diff --git a/Cargo.lock b/Cargo.lock index 6a5b2601ee..25ff414367 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2148,7 +2148,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ord" -version = "0.14.0" +version = "0.14.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 73e052e40e..293755d3e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ord" description = "◉ Ordinal wallet and block explorer" -version = "0.14.0" +version = "0.14.1" license = "CC0-1.0" edition = "2021" autotests = false