Skip to content

Commit c5e6a78

Browse files
committed
update
1 parent 3c5495f commit c5e6a78

2 files changed

Lines changed: 36 additions & 39 deletions

File tree

.github/setup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ mkdir -p ~/.bitcoin
55
echo "rpcconnect=165.22.121.70" >> ~/.bitcoin/bitcoin.conf
66
echo "rpcuser=btrustbuildersrpc" >> ~/.bitcoin/bitcoin.conf
77
echo "rpcpassword=btrustbuilderspass" >> ~/.bitcoin/bitcoin.conf
8-
echo $(bitcoin-cli getblockchaininfo)

.github/workflows/main.yml

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,30 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@v4 # Check out the repository code
1515

16-
- name: Setup Bitcoin Core
16+
- name: Setup, Get Block & Verify Submissions
1717
run: |
18+
# Setup Bitcoin Core
1819
sudo bash .github/setup.sh
1920
20-
- name: Get latest block in signet mode
21-
run: |
22-
bitcoin-cli getblockhash 243833
23-
24-
- name: 01.sh - Verify Hash Block
25-
run: |
26-
chmod +x submission/01.sh
27-
HASH=$(submission/01.sh)
28-
if [[ "$HASH" == "000000b024f11595795f0be5974229f786df389c8b92e92b61890e9e3c6b8d8a" ]]; then
29-
echo "✅ Success: Verify Hash Block passed!"
30-
else
31-
echo "❌ Error: Verify Hash Block failed!"
32-
exit 1
33-
fi
34-
35-
- name: 02.sh - Verify Input Count
36-
run: |
21+
# Verify block is accessible
22+
echo "Fetching block chain info..."
23+
bitcoin-cli getblockchaininfo
24+
25+
# Verify block is accessible
26+
echo "Fetching block hash for height 243833..."
27+
bitcoin-cli -signet getblockhash 243833
28+
29+
# Run and verify 01.sh
30+
chmod +x submission/01.sh
31+
HASH=$(submission/01.sh)
32+
if [[ "$HASH" == "000000b024f11595795f0be5974229f786df389c8b92e92b61890e9e3c6b8d8a" ]]; then
33+
echo "✅ Success: Verify Hash Block passed!"
34+
else
35+
echo "❌ Error: Verify Hash Block failed!"
36+
exit 1
37+
fi
38+
39+
# 02.sh - Verify Input Count
3740
chmod +x submission/02.sh
3841
COUNT=$(submission/02.sh)
3942
if [[ "$COUNT" == "442" ]]; then
@@ -43,8 +46,7 @@ jobs:
4346
exit 1
4447
fi
4548

46-
- name: 03.sh - Verify Transaction
47-
run: |
49+
# 03.sh - Verify Transaction
4850
chmod +x submission/03.sh
4951
TX=$(submission/03.sh)
5052
EXPECTED=0e302b600d32b86c3362647f422e5605165a1e5c89c760d0d972e102f390c84e
@@ -54,9 +56,8 @@ jobs:
5456
echo "❌ Error: Transaction verification failed!"
5557
exit 1
5658
fi
57-
58-
- name: 04.sh - Verify Public Key Signer
59-
run: |
59+
60+
# 04.sh - Verify Public Key Signer
6061
chmod +x submission/04.sh
6162
PUBKEY=$(submission/04.sh)
6263
EXPECTED_OUTPUT=02c6c9306ade30f9711c9503cdaa94094efc025acb9be7845acc49e1cb475952c6
@@ -67,30 +68,27 @@ jobs:
6768
exit 1
6869
fi
6970

70-
- name: 05.sh - Verify TX Fee
71-
run: |
71+
# 05.sh - Verify TX Fee
7272
chmod +x submission/05.sh
7373
FEE=$(submission/05.sh)
7474
if [[ "$FEE" == "696" ]]; then
75-
echo "✅ Success: TX Fee verification passed!"
75+
echo "✅ Success: TX Fee (05.sh) verification passed!"
7676
else
77-
echo "❌ Error: TX Fee verification failed!"
77+
echo "❌ Error: TX Fee (05.sh) verification failed!"
7878
exit 1
7979
fi
80-
81-
- name: 06.sh - Verify TX Fee
82-
run: |
80+
81+
# 06.sh - Verify TX Fee (again)
8382
chmod +x submission/06.sh
8483
FEE=$(submission/06.sh)
8584
if [[ "$FEE" == "696" ]]; then
86-
echo "✅ Success: TX Fee verification passed!"
85+
echo "✅ Success: TX Fee (06.sh) verification passed!"
8786
else
88-
echo "❌ Error: TX Fee verification failed!"
87+
echo "❌ Error: TX Fee (06.sh) verification failed!"
8988
exit 1
9089
fi
91-
92-
- name: 07.sh - Verify Coinbase TX
93-
run: |
90+
91+
# 07.sh - Verify Coinbase TX
9492
chmod +x submission/07.sh
9593
COINBASE=$(submission/07.sh)
9694
EXPECTED_OUTPUT=7ab200e41b53d974f757535c01a715aae6b1322a30753c1d2b0ea201500bc060
@@ -100,9 +98,8 @@ jobs:
10098
echo "❌ Error: Coinbase TX verification failed!"
10199
exit 1
102100
fi
103-
104-
- name: 08.sh - Verify TX Block Height
105-
run: |
101+
102+
# 08.sh - Verify TX Block Height
106103
chmod +x submission/08.sh
107104
HEIGHT=$(submission/08.sh)
108105
if [[ "$HEIGHT" == "243859" ]]; then
@@ -111,3 +108,4 @@ jobs:
111108
echo "❌ Error: TX Block Height verification failed!"
112109
exit 1
113110
fi
111+

0 commit comments

Comments
 (0)