Skip to content

Commit

Permalink
Update/v27.1 (#148)
Browse files Browse the repository at this point in the history
* Update Bitcoin to 27.1

* update github actions to include sha256 sum

* update release notes

* update dir for host declaration

* look for config.yaml in home dir

* remove reindex_chainstate file on start

* Update repo name in manifest.yaml

* message reindex-chainstate is prohibited on pruned nodes

* copy and format edits

* readme update

* Update install target to include the hostname

---------

Co-authored-by: Mariusz Kogen <[email protected]>
  • Loading branch information
Dominion5254 and k0gen authored Jun 20, 2024
1 parent 509274a commit c995ed1
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/workflows/buildService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
make
PACKAGE_ID=$(yq -oy ".id" manifest.*)
echo "package_id=$PACKAGE_ID" >> $GITHUB_ENV
printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n"
shell: bash

- name: Upload .s9pk
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/releaseService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- name: Generate sha256 checksum
run: |
PACKAGE_ID=${{ env.package_id }}
printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n"
sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256
shell: bash

Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ else
endif
@start-sdk pack

install:
ifeq (,$(wildcard ./start9/config.yaml))
@echo; echo "You must define \"host: http://server-name.local\" in ./start9/config.yaml config file first"; echo
else
start-cli package install $(PKG_ID).s9pk
endif
install:
@if [ ! -f ~/.embassy/config.yaml ]; then echo "You must define \"host: http://server-name.local\" in ~/.embassy/config.yaml config file first."; exit 1; fi
@echo "\nInstalling to $$(grep -v '^#' ~/.embassy/config.yaml | cut -d'/' -f3) ...\n"
@[ -f $(PKG_ID).s9pk ] || ( $(MAKE) && echo "\nInstalling to $$(grep -v '^#' ~/.embassy/config.yaml | cut -d'/' -f3) ...\n" )
@start-cli package install $(PKG_ID).s9pk

docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh manager/target/aarch64-unknown-linux-musl/release/bitcoind-manager manifest.yaml check-rpc.sh check-synced.sh actions/*
ifeq ($(ARCH),x86_64)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Install the following system dependencies to build this project by following the

- [docker](https://docs.docker.com/get-docker)
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/)
- [rust-musl-cross](https://github.com/Start9Labs/rust-musl-cross)
- [yq](https://mikefarah.gitbook.io/yq)
- [rust](https://rustup.rs)
- [start-sdk](https://github.com/Start9Labs/start-os/tree/sdk)
Expand All @@ -35,8 +34,8 @@ Install the following system dependencies to build this project by following the
Clone the project locally. Note the submodule link to the original project(s).

```
git clone [email protected]:Start9Labs/bitcoind-wrapper.git
cd bitcoind-wrapper
git clone [email protected]:Start9Labs/bitcoind-startos.git
cd bitcoind-startos
git submodule update --init
```

Expand Down
18 changes: 16 additions & 2 deletions actions/reindex_chainstate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -e

touch /root/.bitcoin/requires.reindex_chainstate
action_result_running=" {
\"version\": \"0\",
\"message\": \"Bitcoin Core restarting in reindex chainstate mode\",
Expand All @@ -17,4 +16,19 @@ action_result_stopped=" {
\"copyable\": false,
\"qr\": false
}"
bitcoin-cli -rpcconnect=bitcoind.embassy stop >/dev/null 2>/dev/null && echo $action_result_running || echo $action_result_stopped
action_result_pruned=" {
\"version\": \"0\",
\"message\": \"Bitcoin Core does not allow reindex-chainstate for pruned nodes. If the Chainstate is corrupted on a pruned node the entire blockchain will need to be re-downloaded from genesis with the 'Reindex Blockchain' action\",
\"value\": null,
\"copyable\": false,
\"qr\": false
}"

pruned=$(yq e '.advanced.pruning.mode' /root/.bitcoin/start9/config.yaml)

if [ "$pruned" != "disabled" ]; then
echo $action_result_pruned
else
touch /root/.bitcoin/requires.reindex_chainstate
bitcoin-cli -rpcconnect=bitcoind.embassy stop >/dev/null 2>/dev/null && echo $action_result_running || echo $action_result_stopped
fi
2 changes: 1 addition & 1 deletion bitcoin
Submodule bitcoin updated 78 files
+5 −2 build-aux/m4/l_atomic.m4
+2 −2 ci/test/00_setup_env_s390x.sh
+1 −1 configure.ac
+22 −22 contrib/windeploy/win-codesign.cert
+1 −1 depends/packages/boost.mk
+1 −1 depends/packages/miniupnpc.mk
+3 −0 depends/packages/qt.mk
+31 −0 depends/patches/qt/zlib-timebits64.patch
+14 −0 doc/build-osx.md
+3 −3 doc/man/bitcoin-cli.1
+3 −3 doc/man/bitcoin-qt.1
+3 −3 doc/man/bitcoin-tx.1
+3 −3 doc/man/bitcoin-util.1
+3 −3 doc/man/bitcoin-wallet.1
+3 −3 doc/man/bitcoind.1
+38 −141 doc/release-notes.md
+217 −0 doc/release-notes/release-notes-27.0.md
+1 −1 src/Makefile.test.include
+1 −1 src/core_read.cpp
+7 −0 src/crypto/sha256_sse4.cpp
+1 −1 src/index/base.cpp
+1 −1 src/kernel/chainparams.cpp
+1 −1 src/net.cpp
+1 −86 src/qt/locale/bitcoin_ar.ts
+24 −24 src/qt/locale/bitcoin_az.ts
+24 −24 src/qt/locale/[email protected]
+12 −0 src/qt/locale/bitcoin_be.ts
+5 −1 src/qt/locale/bitcoin_bg.ts
+134 −18 src/qt/locale/bitcoin_ca.ts
+10 −0 src/qt/locale/bitcoin_cs.ts
+43 −2 src/qt/locale/bitcoin_da.ts
+6 −10 src/qt/locale/bitcoin_de.ts
+13 −1 src/qt/locale/bitcoin_de_CH.ts
+197 −4 src/qt/locale/bitcoin_el.ts
+18 −14 src/qt/locale/bitcoin_eo.ts
+13 −13 src/qt/locale/bitcoin_es.ts
+21 −18 src/qt/locale/bitcoin_es_CO.ts
+937 −518 src/qt/locale/bitcoin_es_DO.ts
+1,380 −487 src/qt/locale/bitcoin_es_SV.ts
+999 −488 src/qt/locale/bitcoin_es_VE.ts
+71 −0 src/qt/locale/bitcoin_fa.ts
+506 −4 src/qt/locale/bitcoin_fi.ts
+4 −0 src/qt/locale/bitcoin_fo.ts
+56 −37 src/qt/locale/bitcoin_fr.ts
+9 −0 src/qt/locale/bitcoin_ga.ts
+9 −0 src/qt/locale/bitcoin_ga_IE.ts
+63 −1 src/qt/locale/bitcoin_gl.ts
+47 −1 src/qt/locale/bitcoin_gl_ES.ts
+2,801 −159 src/qt/locale/bitcoin_gu.ts
+8 −0 src/qt/locale/bitcoin_hu.ts
+80 −0 src/qt/locale/bitcoin_id.ts
+48 −0 src/qt/locale/bitcoin_ja.ts
+28 −28 src/qt/locale/bitcoin_la.ts
+4 −0 src/qt/locale/bitcoin_ms.ts
+31 −0 src/qt/locale/bitcoin_my.ts
+48 −0 src/qt/locale/bitcoin_nl.ts
+176 −0 src/qt/locale/bitcoin_pl.ts
+734 −550 src/qt/locale/bitcoin_pt.ts
+3 −3 src/qt/locale/bitcoin_pt_BR.ts
+247 −1 src/qt/locale/bitcoin_ro.ts
+21 −0 src/qt/locale/bitcoin_sr.ts
+21 −0 src/qt/locale/[email protected]
+21 −0 src/qt/locale/[email protected]
+25 −1 src/qt/locale/bitcoin_sv.ts
+78 −0 src/qt/locale/bitcoin_tr.ts
+5 −1 src/qt/optionsdialog.cpp
+6 −7 src/qt/walletmodel.cpp
+2 −2 src/rpc/blockchain.cpp
+5 −2 src/rpc/node.cpp
+1 −1 src/script/sign.cpp
+6 −0 src/test/net_peer_connection_tests.cpp
+1 −0 src/test/rpc_tests.cpp
+24 −0 src/test/script_tests.cpp
+1 −1 src/univalue/test/object.cpp
+2 −2 test/functional/rpc_psbt.py
+1 −1 test/functional/rpc_signrawtransactionwithkey.py
+1 −1 test/functional/rpc_uptime.py
+1 −1 test/functional/wallet_signrawtransactionwithwallet.py
17 changes: 10 additions & 7 deletions manager/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,18 @@ fn inner_main(reindex: bool, reindex_chainstate: bool) -> Result<(), Box<dyn Err
}
if reindex {
btc_args.push("-reindex".to_owned());
match fs::remove_file("/root/.bitcoin/requires.reindex") {
Ok(()) => (),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => (),
a => a?,
}
} else if reindex_chainstate {
btc_args.push("-reindex-chainstate".to_owned());
match fs::remove_file("/root/.bitcoin/requires.reindex_chainstate") {
Ok(()) => (),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => (),
a => a?,
}
}

std::io::copy(
Expand All @@ -471,13 +481,6 @@ fn inner_main(reindex: bool, reindex_chainstate: bool) -> Result<(), Box<dyn Err
let mut child = std::process::Command::new("bitcoind")
.args(btc_args)
.spawn()?;
if reindex {
match fs::remove_file("/root/.bitcoin/requires.reindex") {
Ok(()) => (),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => (),
a => a?,
}
}
let raw_child = child.id();
*CHILD_PID.lock().unwrap() = Some(raw_child);
let pruned = {
Expand Down
14 changes: 7 additions & 7 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
id: bitcoind
title: "Bitcoin Core"
version: 27.0.0
eos-version: 0.3.4.3
version: 27.1.0
eos-version: 0.3.4.4
release-notes: |
* Update Bitcoin to [v27.0](https://github.com/bitcoin/bitcoin/releases/tag/v27.0)
* Default mempoolfullrbf=1 on fresh installs
* Minor config description improvements
* Update Bitcoin to [v27.1](https://github.com/bitcoin/bitcoin/releases/tag/v27.1)
* Add 'Reindex Chainstate' Action
* Improve config descriptions and instructions
* Notice! If Bitcoin gets stuck in "Stopping" status after the update, the solution is to restart your server. System -> Restart.
license: MIT
wrapper-repo: https://github.com/Start9Labs/bitcoind-wrapper
wrapper-repo: https://github.com/Start9Labs/bitcoind-startos
upstream-repo: https://github.com/bitcoin/bitcoin
support-site: https://github.com/bitcoin/bitcoin/issues
marketing-site: https://bitcoincore.org/
Expand Down Expand Up @@ -153,7 +153,7 @@ actions:
reindex-chainstate:
name: "Reindex Chainstate"
description: "Rebuilds the chainstate database using existing block index data; as the block index is not rebuilt, 'reindex_chainstate' should be strictly faster than 'reindex'. This action should only be used in the case of chainstate corruption; if the blocks stored on disk are corrupted, the 'reindex' action will need to be run instead."
warning: Blocks not stored on disk will be redownloaded in order to rebuild the database. If your node is pruned, this action is equivalent to syncing the node from scratch, so this process could take weeks on low-end hardware.
warning: While faster than 'Reindex', 'Reindex Chainstate' can still take several days or more to complete. Pruned nodes do not allow 'reindex-chainstate'; if you are running a pruned node and suspect chainstate corruption the 'reindex' action (requiring redownloading the entire Blockchain) should be run instead.
allowed-statuses:
- running
- stopped
Expand Down
2 changes: 1 addition & 1 deletion scripts/services/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,5 @@ export const migration: T.ExpectedExports.migration =
),
},
},
"27.0.0"
"27.1.0"
);

0 comments on commit c995ed1

Please sign in to comment.