-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1914 from CounterpartyXCP/develop
v10.2.0
- Loading branch information
Showing
136 changed files
with
50,525 additions
and
23,730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
You're about to create pull request on the Counterparty Core codebase! 🎉 As part of this process, please be sure to: | ||
|
||
* [ ] Double-check the spelling and grammar of all strings, code comments, etc. | ||
* [ ] Double-check that all code that needs to be is deterministic | ||
* [ ] Add tests to cover any new features | ||
* [ ] Ensure that the test suite passes with the proposed changes | ||
* [ ] Double-check that all code is deterministic that needs to be | ||
* [ ] Add tests to cover any new or revised logic | ||
* [ ] Ensure that the test suite passes | ||
* [ ] Update the project [release notes](release-notes/) | ||
* [ ] Update the project documentation as appropriate with a corresponding Pull Request in the [Documentation repository](https://github.com/CounterpartyXCP/Documentation) | ||
|
||
... and be sure to label the Pull Request as a "draft" for as long as it is not ready to be merged into `develop`. | ||
* [ ] Update the project documentation, as appropriate, with a corresponding Pull Request in the [Documentation repository](https://github.com/CounterpartyXCP/Documentation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,19 +30,21 @@ docker container prune -f | |
docker rmi counterparty/counterparty:$VERSION || true | ||
|
||
# build the counterparty-core new image | ||
docker build -t counterparty/counterparty:$VERSION . | ||
docker build -t counterparty/counterparty:$VERSION . > build.txt 2>&1 | ||
COUNTERPARTY_RS_CACHED=$(awk '/COPY \.\/counterparty-rs \/counterparty-rs/{getline; print}' build.txt | awk '{print $2}') | ||
cat build.txt | ||
|
||
# re-start containers | ||
docker compose --profile mainnet up -d | ||
docker compose --profile testnet up -d | ||
|
||
# wait for counterparty-core to be ready | ||
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'Ready for queries')" = "" ]; do | ||
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'Catch up complete.')" = "" ]; do | ||
echo "Waiting for counterparty-core mainnet to be ready" | ||
sleep 1 | ||
done | ||
|
||
while [ "$(docker compose logs counterparty-core-testnet 2>&1 | grep 'Ready for queries')" = "" ]; do | ||
while [ "$(docker compose logs counterparty-core-testnet 2>&1 | grep 'Catch up complete.')" = "" ]; do | ||
echo "Waiting for counterparty-core testnet to be ready" | ||
sleep 1 | ||
done | ||
|
@@ -75,7 +77,7 @@ if [ "$response_v1_testnet" -ne 200 ]; then | |
fi | ||
|
||
# check running info with API v2 mainnet | ||
response_v2_mainnet=$(curl http://api:[email protected]:4000/v2/ \ | ||
response_v2_mainnet=$(curl http://localhost:4000/v2/ \ | ||
--write-out '%{http_code}' --silent --output /dev/null) | ||
|
||
if [ "$response_v2_mainnet" -ne 200 ]; then | ||
|
@@ -84,22 +86,49 @@ if [ "$response_v2_mainnet" -ne 200 ]; then | |
fi | ||
|
||
# check running info with API v2 testnet | ||
response_v2_testnet=$(curl http://api:[email protected]:14000/v2/ \ | ||
response_v2_testnet=$(curl http://localhost:14000/v2/ \ | ||
--write-out '%{http_code}' --silent --output /dev/null) | ||
|
||
if [ "$response_v2_mainnet" -ne 200 ]; then | ||
echo "Failed to get API v2 root mainnet" | ||
exit 1 | ||
fi | ||
|
||
# Let's reparse 50 blocks before Dredd and compare hashes tests | ||
CURRENT_HEIGHT=$(curl http://localhost:4000/v2/ --silent | jq '.result.counterparty_height') | ||
REPARSE_FROM=$(($CURRENT_HEIGHT-50)) | ||
|
||
# Stop, reparse and start counterparty-core mainnet | ||
docker compose --profile mainnet stop counterparty-core | ||
docker compose --profile mainnet run counterparty-core reparse $REPARSE_FROM \ | ||
--backend-connect=bitcoind \ | ||
--indexd-connect=addrindexrs \ | ||
--rpc-host=0.0.0.0 \ | ||
--api-host=0.0.0.0 | ||
docker compose --profile mainnet up -d counterparty-core | ||
|
||
# wait for counterparty-core to be ready | ||
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'Catch up complete.')" = "" ]; do | ||
echo "Waiting for counterparty-core mainnet to be ready" | ||
sleep 1 | ||
done | ||
|
||
# Run dredd test | ||
dredd | ||
|
||
previous_counterparty_rs_hash=$(cat ../counterparty_rs_hash) | ||
current_counterparty_rs_hash=$(find counterparty-rs/ -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum | awk '{print $1}') | ||
|
||
|
||
# Run compare hashes test | ||
. "$HOME/.profile" | ||
cd counterparty-core | ||
hatch env prune | ||
|
||
if [ "$COUNTERPARTY_RS_CACHED" != "CACHED" ]; then | ||
echo $current_counterparty_rs_hash > ../counterparty_rs_hash | ||
hatch env prune | ||
fi | ||
|
||
hatch run pytest counterpartycore/test/compare_hashes_test.py --comparehashes | ||
cd .. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ target/ | |
typings/ | ||
pyrightconfig.json | ||
.DS_Store | ||
test_dbs/ | ||
|
||
profile.txt | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.