Skip to content

Commit d00442e

Browse files
authored
Bump up node version and simplify scripts (#407)
* Bump up node version and simplify scripts * remove lines
1 parent 7a3c782 commit d00442e

13 files changed

+51
-56
lines changed

integration-test/docker-compose-chang.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ networks:
99
services:
1010

1111
cardano-node:
12-
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-9.1.0}
12+
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-10.1.3}
1313
platform: linux/amd64
1414
entrypoint: bash
1515
environment:
@@ -35,7 +35,7 @@ services:
3535
max-file: "10"
3636

3737
cardano-pool:
38-
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-9.1.0}
38+
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-10.1.3}
3939
platform: linux/amd64
4040
entrypoint: bash
4141
environment:
@@ -56,14 +56,14 @@ services:
5656
max-file: "10"
5757

5858
ogmios:
59-
image: cardanosolutions/ogmios:v6.8.0
59+
image: cardanosolutions/ogmios:v6.9.0
6060
platform: linux/amd64
6161
environment:
6262
NETWORK: "${NETWORK:-local-alonzo}"
6363

6464
command: [
6565
"--host", "0.0.0.0",
66-
"--node-socket", "/ipc/node.socket",
66+
"--node-socket", "/ipc/pool.socket",
6767
"--node-config", "/code/configs/${NETWORK:-local-alonzo}/config.json",
6868
"--log-level-websocket", "Debug"
6969
]
@@ -85,7 +85,7 @@ services:
8585
NETWORK: "${NETWORK:-local}"
8686

8787
command: [
88-
"--node-socket", "/ipc/node.socket",
88+
"--node-socket", "/ipc/pool.socket",
8989
"--node-config", "/code/configs/${NETWORK:-local-alonzo}/config.json",
9090
"--host", "0.0.0.0",
9191
"--since", "origin",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "Witnessed Tx AlonzoEra",
3+
"description": "Ledger Cddl Format",
4+
"cborHex": "84a50081825820732bfd67e66be8e8288349fcaaa2294973ef6271cc189a239bb431275401b8e500018282583900cc30497f4ff962f4c1dca54cceefe39f86f1d7179668009f8eb71e594828a2dadba97ca9fd0cdc99975899470c219bdc0d828cfa6ddf6d691b00000068c617140082581d60d413c1745d306023e49589e658a7b7a4b4dda165ff5c97d8c8b979bf1b00000068c5f572f7021a00031c89031b00005af3107a4000048382008200581c4828a2dadba97ca9fd0cdc99975899470c219bdc0d828cfa6ddf6d698a03581cc2105401f5b4e8dfcc3b04f7a2722f72a8f6c4b1c00f9b5b8f46dd5e5820d5daee7ab045f90495107b9997b677cf3b469d0f42fcf8528a80510a7d1c270b00190154d81e820001581de04828a2dadba97ca9fd0cdc99975899470c219bdc0d828cfa6ddf6d6981581c4828a2dadba97ca9fd0cdc99975899470c219bdc0d828cfa6ddf6d69818400190bb84400000000f682782768747470733a2f2f746573747374616b65706f6f6c2e636f6d2f6d657461646174612e6a736f6e5820c5c38833176e2d575bd8693e206e3af2e1088e556def86cae9f6c2fc45579f3683028200581c4828a2dadba97ca9fd0cdc99975899470c219bdc0d828cfa6ddf6d69581cc2105401f5b4e8dfcc3b04f7a2722f72a8f6c4b1c00f9b5b8f46dd5ea100838258205edaa384c658c2bd8945ae389edac0a5bd452d0cfd5d1245e3ecd540030d1e3c5840109f3ca65a4173c986e0841f454e49805cda9f091a90e57203307fffadb0f9ed6237c81411cdf25a1122d4ffb16579cf70be41de49305529a03c62e1929e9a028258202f896875fd81ee621cd8ef450c46a4e3c62a7b68ae0cc7b4372c2b02774cf7595840fca096a9180245137d6194e7294c20c31800d397fa1ea5d731224dcf19280c0ea9c1fbab4942b11d00ac1d969fcf64ca417c270a5ae033d19f241c772cf6830e8258208be8339e9f3addfa6810d59e2f072f85e64d4c024c087e0d24f8317c6544f62f58406f9b7ea9bef5613d4dd7bc553daec40a0a2865a29885475d16558a554c565a6f2f8518bc65f6ddb1501aa9f35273956a6749c68bacee7082b6ae18bbf95d8305f5f6"
5+
}

integration-test/run_pool.sh

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,18 @@ echo "$NETWORK"
44
if [ "$NETWORK" = "local-alonzo" ] || [ "$NETWORK" = "local-vasil" ] || [ "$NETWORK" = "local-chang" ]
55
then
66

7-
# Waiting for BFT node to be ready
8-
while [ ! -S /ipc/node.socket ]
9-
do
10-
sleep 0.1
11-
done
7+
# Waiting for BFT node to be ready
8+
while [ ! -S /ipc/node.socket ]
9+
do
10+
sleep 0.1
11+
done
1212

13-
export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
14-
15-
cardano-cli transaction build \
16-
--tx-in 732bfd67e66be8e8288349fcaaa2294973ef6271cc189a239bb431275401b8e5#0 \
17-
--tx-out "$(cat /code/keys/pool/full.addr)"+450000000000 \
18-
--change-address "$(cat /code/tmp_configs/"$NETWORK"/shelley/utxo-keys/payment.addr)" \
19-
--out-file tx.raw \
20-
--testnet-magic 42 \
21-
--certificate-file /code/keys/pool/stake.cert \
22-
--certificate-file /code/keys/pool/pool-registration.cert \
23-
--certificate-file /code/keys/pool/delegation.cert \
24-
--witness-override 3 \
25-
--invalid-hereafter 100000000000000 \
26-
--alonzo-era
27-
28-
cat tx.raw
13+
sleep 5
2914

30-
cardano-cli transaction sign \
31-
--tx-body-file tx.raw \
32-
--signing-key-file /code/tmp_configs/"$NETWORK"/shelley/utxo-keys/utxo1.skey \
33-
--signing-key-file /code/keys/pool/stake.skey \
34-
--signing-key-file /code/keys/pool/cold.skey \
35-
--testnet-magic 42 \
36-
--out-file tx.signed
37-
38-
cat tx.signed
15+
export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
3916

40-
cardano-cli transaction submit \
41-
--tx-file tx.signed \
17+
cardano-cli alonzo transaction submit \
18+
--tx-file /code/keys/pool/pool_registration_tx.signed \
4219
--testnet-magic 42
4320

4421
mkdir -p /data/db
@@ -50,7 +27,7 @@ done
5027
--config /code/tmp_configs/"$NETWORK"/config.json \
5128
--topology /code/keys/pool/topology.json \
5229
--database-path /data/db \
53-
--socket-path /data/db/node.socket \
30+
--socket-path /ipc/pool.socket \
5431
--shelley-kes-key /code/keys/pool/kes.skey \
5532
--shelley-vrf-key /code/keys/pool/vrf.skey \
5633
--shelley-operational-certificate /code/keys/pool/node.cert \

integration-test/run_tests.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,20 @@ export PAYMENT_KEY="$ROOT"/configs/local-chang/shelley/utxo-keys/utxo1.skey
7474
export EXTENDED_PAYMENT_KEY="$ROOT"/keys/extended.skey
7575
export POOL_ID=$(cat "$ROOT"/keys/pool/pool.id)
7676

77-
# Wait for stake pool to start producing blocks
78-
sleep 30
77+
sleep 10
78+
79+
while true; do
80+
response=$(curl -s -H 'Accept: application/json' http://localhost:1337/health)
81+
current_era=$(echo "$response" | jq -r '.currentEra')
82+
83+
if [ "$current_era" == "conway" ]; then
84+
echo "Ogmios is ready! Current era: $current_era"
85+
break
86+
fi
87+
88+
echo -n "."
89+
sleep 2
90+
done
7991

8092
poetry run pytest -m "not (CardanoCLI)" -s -vv -n 4 "$ROOT"/test --cov=pycardano --cov-config=../.coveragerc --cov-report=xml:../coverage.xml
8193

integration-test/test/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""An example that demonstrates low-level construction of a transaction."""
22

33
import os
4+
import time
45

56
import ogmios as python_ogmios
67
from retry import retry

integration-test/test/test_cardano_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TestCardanoCli:
3636
network_magic_number=int(network_magic),
3737
)
3838

39-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
39+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
4040
def test_protocol_param(self):
4141
protocol_param = self.chain_context.protocol_param
4242

integration-test/test/test_certificate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
class TestDelegation(TestBase):
12-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
12+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
1313
def test_stake_delegation(self):
1414
address = Address(
1515
self.payment_key_pair.verification_key.hash(),

integration-test/test/test_certificate_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class TestDelegation(TestBase):
13-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
13+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
1414
def test_stake_delegation(self):
1515
with open("./plutus_scripts/pass_certifying_and_rewarding.plutus", "r") as f:
1616
script_hex = f.read()

integration-test/test/test_min_utxo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
class TestMint(TestBase):
15-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
15+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
1616
@pytest.mark.post_alonzo
1717
def test_min_utxo(self):
1818
address = Address(self.payment_vkey.hash(), network=self.NETWORK)

integration-test/test/test_mint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
class TestMint(TestBase):
15-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
15+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
1616
def test_mint(self):
1717
address = Address(self.payment_vkey.hash(), network=self.NETWORK)
1818

@@ -166,7 +166,7 @@ def load_or_create_key_pair(base_dir, base_name):
166166

167167
self.assert_output(address, nft_to_send)
168168

169-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
169+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
170170
def test_mint_nft_with_script(self):
171171
address = Address(self.payment_vkey.hash(), network=self.NETWORK)
172172

@@ -255,7 +255,7 @@ def test_mint_nft_with_script(self):
255255

256256
self.assert_output(address, nft_output)
257257

258-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
258+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
259259
@pytest.mark.post_alonzo
260260
def test_mint_nft_with_script_plutus_v1(self):
261261
address = Address(self.payment_vkey.hash(), network=self.NETWORK)

integration-test/test/test_ogmios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class TestProtocolParam(TestBase):
7-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
7+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
88
def test_protocol_param_cost_models(self):
99
protocol_param = self.chain_context.protocol_param
1010

integration-test/test/test_plutus.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class HelloWorldRedeemer(PlutusData):
2727

2828

2929
class TestPlutus(TestBase):
30-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
30+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
3131
def test_plutus_v1(self):
3232
# ----------- Giver give ---------------
3333

@@ -110,7 +110,7 @@ def test_plutus_v1(self):
110110

111111
self.assert_output(taker_address, take_output)
112112

113-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
113+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
114114
@pytest.mark.post_alonzo
115115
def test_plutus_v2_datum_hash(self):
116116
# ----------- Giver give ---------------
@@ -185,7 +185,7 @@ def test_plutus_v2_datum_hash(self):
185185

186186
self.assert_output(taker_address, take_output)
187187

188-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
188+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
189189
@pytest.mark.post_alonzo
190190
def test_plutus_v2_inline_script_inline_datum(self):
191191
# ----------- Giver give ---------------
@@ -248,7 +248,7 @@ def test_plutus_v2_inline_script_inline_datum(self):
248248

249249
self.assert_output(taker_address, take_output)
250250

251-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
251+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
252252
@pytest.mark.post_alonzo
253253
def test_plutus_v2_ref_script(self):
254254
# ----------- Create a reference script ---------------
@@ -329,7 +329,7 @@ def test_plutus_v2_ref_script(self):
329329

330330
self.assert_output(taker_address, take_output)
331331

332-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
332+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
333333
@pytest.mark.post_alonzo
334334
def test_transaction_chaining(self):
335335
giver_address = Address(self.payment_vkey.hash(), network=self.NETWORK)
@@ -350,7 +350,7 @@ def test_transaction_chaining(self):
350350
self.chain_context.submit_tx(tx1)
351351
self.chain_context.submit_tx(tx2)
352352

353-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
353+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
354354
@pytest.mark.post_alonzo
355355
def test_get_plutus_script(self):
356356
# ----------- Giver give ---------------
@@ -383,7 +383,7 @@ def test_get_plutus_script(self):
383383

384384
assert utxos[0].output.script == forty_two_script
385385

386-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
386+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
387387
@pytest.mark.post_chang
388388
def test_plutus_v3(self):
389389
# ----------- Giver give ---------------

integration-test/test/test_zero_empty_asset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class TestZeroEmptyAsset(TestBase):
13-
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
13+
@retry(tries=TEST_RETRIES, backoff=1.3, delay=2, jitter=(0, 10))
1414
@pytest.mark.post_chang
1515
def test_submit_zero_and_empty(self):
1616
address = Address(self.payment_vkey.hash(), network=self.NETWORK)

0 commit comments

Comments
 (0)