Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add db-sync checks for conway param update proposals [ CIP-080 -> CIP 083 ] #2414

Merged
merged 7 commits into from
Jul 9, 2024

Conversation

ArturWieczorek
Copy link
Collaborator

Add db-sync checks for conway param update proposals [ CIP-080 -> CIP 083 ]

@ArturWieczorek
Copy link
Collaborator Author

ArturWieczorek commented May 8, 2024

Existing tests in file are passing (ran several times):

[nix-shell:~/Downloads/CIPsTests/cardano-node-tests](artur/cip-tests)$ pytest -sk "test_pparam_update" cardano_node_tests/
=============================================================================================================================================== test session starts ================================================================================================================================================
platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.5.0 -- /nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/bin/python3.10
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/artur/Downloads/CIPsTests/cardano-node-tests/.hypothesis/examples'))
metadata: {'Python': '3.10.12', 'Platform': 'Linux-5.15.0-106-generic-x86_64-with-glibc2.37', 'Packages': {'pytest': '7.4.4', 'pluggy': '1.5.0'}, 'Plugins': {'allure-pytest': '2.13.5', 'hypothesis': '6.100.2', 'html': '3.2.0', 'metadata': '3.1.1', 'order': '1.2.1', 'select': '0.1.2', 'xdist': '3.3.1'}, 'cardano-node': '8.10.0', 'cardano-node rev': '04e060e6d86a5791c00aa518b2cee025384be28b', 'cardano-node ghc': 'ghc-8.10', 'cardano-cli': '8.22.0.0', 'cardano-cli rev': '04e060e6d86a5791c00aa518b2cee025384be28b', 'cardano-cli ghc': 'ghc-8.10', 'CLUSTER_ERA': 'conway', 'TX_ERA': '', 'COMMAND_ERA': 'conway', 'SCRIPTS_DIRNAME': 'conway_fast', 'ENABLE_P2P': 'False', 'MIXED_P2P': 'False', 'NUM_POOLS': '3', 'DB_BACKEND': '', 'HAS_CC': 'True', 'cardano-node-tests rev': 'ad6b634c9e05db763c3705e1805ab8b0c10bc390', 'cardano-node-tests url': 'https://github.com/IntersectMBO/cardano-node-tests/tree/ad6b634c9e05db763c3705e1805ab8b0c10bc390', 'CARDANO_NODE_SOCKET_PATH': '/home/artur/Downloads/CIPsTests/cardano-node-tests/dev_workdir/state-cluster0/bft1.socket', 'cardano-cli exe': '/nix/store/r716z228al13457i2k2wlgflr9l0ldpg-cardano-cli-exe-cardano-cli-8.22.0.0/bin/cardano-cli', 'cardano-node exe': '/nix/store/yi869ay2900bv7bwq3qz6hsz0rlnhnw7-cardano-node-exe-cardano-node-8.10.0/bin/cardano-node', 'cardano-submit-api exe': '/nix/store/cx62sjxfw8n8y09x6w56xq1171f9llpl-cardano-submit-api-exe-cardano-submit-api-8.10.0/bin/cardano-submit-api', 'network magic': 42, 'HAS_DBSYNC': 'True', 'db-sync': '13.2.0.1', 'db-sync rev': '3ac426d9f7cf252d5a20a02c60d4988a43dbb3f2', 'db-sync ghc': 'ghc-8.10', 'db-sync exe': '/nix/store/5p7spghmzkfamjgidjsli8kr9fjqhix9-cardano-db-sync-exe-cardano-db-sync-13.2.0.1/bin/cardano-db-sync'}
rootdir: /home/artur/Downloads/CIPsTests/cardano-node-tests
configfile: pyproject.toml
plugins: allure-pytest-2.13.5, hypothesis-6.100.2, html-3.2.0, metadata-3.1.1, order-1.2.1, select-0.1.2, xdist-3.3.1
collected 1354 items / 1352 deselected / 2 selected                                                                                                                                                                                                                                                                

cardano_node_tests/tests/tests_conway/test_pparam_update.py::TestPParamUpdate::test_pparam_update@long 
-------------------------------------------------------------------------------------------------------------------------------------------------- live log setup --------------------------------------------------------------------------------------------------------------------------------------------------
INFO     cardano_node_tests.tests.conftest:conftest.py:188 Changed CWD to '/home/artur/Downloads/CIPsTests/cardano-node-tests/dev_workdir/tmp/pytest-of-artur/pytest-13'.
-------------------------------------------------------------------------------------------------------------------------------------------------- live log call ---------------------------------------------------------------------------------------------------------------------------------------------------
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 38.20 sec for slot no 91005.
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 50.20 sec for slot no 92025.
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 188.40 sec for slot no 93025.
PASSED
cardano_node_tests/tests/tests_conway/test_pparam_update.py::TestPParamData::test_pparam_keys PASSED
------------------------------------------------------------------------------------------------------------------------------------------------ live log teardown -------------------------------------------------------------------------------------------------------------------------------------------------
INFO     cardano_node_tests.utils.dbsync_conn:dbsync_conn.py:34 Closing connection to db-sync database dbsync0.


================================================================================================================================== 2 passed, 1352 deselected in 542.59s (0:09:02) ==================================================================================================================================

Clear errors reporting at the end of tests so CLI checks flow is not "broken" by sudden cardano-db-sync error.
Example:

>           raise AssertionError("\n".join(db_errors_final))
E           AssertionError: db-sync economic params update error: Unexpected parameter proposal values in db-sync:
E           Param value for monetary_expand_rate: 0.007334086780499855. Expected: {'denominator': 457453, 'numerator': 3355}
E           db-sync technical params update error: Unexpected parameter proposal values in db-sync:
E           Cost model mismatch for 123. Expected: {'PlutusV1': [205665, 812, 1, 1, 1000, 571, 0, 1, 1000, 24177, 4, 1, 1000, 32, 117366, 10475, 4, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 100, 100, 23000, 100, 19537, 32, 175354, 32, 46417, 4, 221973, 511, 0, 1, 89141, 32, 497525, 14068, 4, 2, 196500, 453240, 220, 0, 1, 1, 1000, 28662, 4, 2, 245000, 216773, 62, 1, 1060367, 12586, 1, 208512, 421, 1, 187000, 1000, 52998, 1, 80436, 32, 43249, 32, 1000, 32, 80556, 1, 57667, 4, 1000, 10, 197145, 156, 1, 197145, 156, 1, 204924, 473, 1, 208896, 511, 1, 52467, 32, 64832, 32, 65493, 32, 22558, 32, 16563, 32, 76511, 32, 196500, 453240, 220, 0, 1, 1, 69522, 11687, 0, 1, 60091, 32, 196500, 453240, 220, 0, 1, 1, 196500, 453240, 220, 0, 1, 1, 806990, 30482, 4, 1927926, 82523, 4, 265318, 0, 4, 0, 85931, 32, 205665, 812, 1, 1, 41182, 32, 212342, 32, 31220, 32, 32696, 32, 43357, 32, 32247, 32, 38314, 32, 9462713, 1021, 11], 'PlutusV2': [205665, 812, 1, 1, 1000, 571, 0, 1, 1000, 24177, 4, 1, 1000, 32, 117366, 10475, 4, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 100, 100, 23000, 100, 19537, 32, 175354, 32, 46417, 4, 221973, 511, 0, 1, 89141, 32, 497525, 14068, 4, 2, 196500, 453240, 220, 0, 1, 1, 1000, 28662, 4, 2, 245000, 216773, 62, 1, 1060367, 12586, 1, 208512, 421, 1, 187000, 1000, 52998, 1, 80436, 32, 43249, 32, 1000, 32, 80556, 1, 57667, 4, 1000, 10, 197145, 156, 1, 197145, 156, 1, 204924, 473, 1, 208896, 511, 1, 52467, 32, 64832, 32, 65493, 32, 22558, 32, 16563, 32, 76511, 32, 196500, 453240, 220, 0, 1, 1, 69522, 11687, 0, 1, 60091, 32, 196500, 453240, 220, 0, 1, 1, 196500, 453240, 220, 0, 1, 1, 1159724, 392670, 0, 2, 806990, 30482, 4, 1927926, 82523, 4, 265318, 0, 4, 0, 85931, 32, 205665, 812, 1, 1, 41182, 32, 212342, 32, 31220, 32, 32696, 32, 43357, 32, 32247, 32, 38314, 32, 35892428, 11, 9462713, 1021, 11, 38887044, 32947, 11]}
E           Param value for influence: 0.333660159997423. Expected: {'denominator': 993391, 'numerator': 331455}
E           db-sync governance params update error: Unexpected parameter proposal values in db-sync:
E           Param value for dvt_committee_no_confidence: 0.5827009675575704. Expected: {'denominator': 593143, 'numerator': 345625}
E           Param value for dvt_committee_normal: 0.5240203890784084. Expected: {'denominator': 379615, 'numerator': 198926}
E           Param value for pvt_committee_normal: 0.5568196767004745. Expected: {'denominator': 767771, 'numerator': 427510}
E           Param value for pvtpp_security_group: 0.5616314792733395. Expected: {'denominator': 712850, 'numerator': 400359}

@ArturWieczorek ArturWieczorek force-pushed the artur/cip-tests branch 10 times, most recently from 4100d8b to 5af2633 Compare May 9, 2024 00:13
@ArturWieczorek
Copy link
Collaborator Author

Tests for Conway Era passed 🟢 (with exception of CC ones - which is expected at this moment).
testrun-report.html.tar.gz

cardano_node_tests/utils/dbsync_utils.py Show resolved Hide resolved
cardano_node_tests/utils/dbsync_utils.py Show resolved Hide resolved
cardano_node_tests/utils/dbsync_utils.py Outdated Show resolved Hide resolved
cardano_node_tests/utils/dbsync_utils.py Outdated Show resolved Hide resolved
cardano_node_tests/utils/dbsync_utils.py Show resolved Hide resolved
cardano_node_tests/utils/dbsync_utils.py Outdated Show resolved Hide resolved
cardano_node_tests/utils/dbsync_utils.py Outdated Show resolved Hide resolved
@ArturWieczorek ArturWieczorek force-pushed the artur/cip-tests branch 2 times, most recently from 4d73069 to b2b31e3 Compare June 24, 2024 17:10
@ArturWieczorek
Copy link
Collaborator Author

ArturWieczorek commented Jul 2, 2024

Local Tests passed:

[nix-shell:~/Downloads/Treasury_Withdrawals/cardano-node-tests](artur/cip-tests)$ pytest -sk "test_pparam_update" cardano_node_tests/
======================================================================================================================= test session starts =======================================================================================================================
platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.5.0 -- /nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/bin/python3.10
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/artur/Downloads/Treasury_Withdrawals/cardano-node-tests/.hypothesis/examples'))
metadata: {'Python': '3.10.12', 'Platform': 'Linux-5.15.0-113-generic-x86_64-with-glibc2.37', 'Packages': {'pytest': '7.4.4', 'pluggy': '1.5.0'}, 'Plugins': {'allure-pytest': '2.13.5', 'hypothesis': '6.100.2', 'html': '3.2.0', 'metadata': '3.1.1', 'order': '1.2.1', 'select': '0.1.2', 'xdist': '3.3.1'}, 'cardano-node': '8.12.1', 'cardano-node rev': '06943b66e634fc9eb83ddb376ed3508003dbb607', 'cardano-node ghc': 'ghc-8.10', 'cardano-cli': '8.24.0.0', 'cardano-cli rev': '06943b66e634fc9eb83ddb376ed3508003dbb607', 'cardano-cli ghc': 'ghc-8.10', 'CLUSTER_ERA': 'conway', 'TX_ERA': '', 'COMMAND_ERA': 'conway', 'SCRIPTS_DIRNAME': 'conway_fast', 'ENABLE_P2P': 'False', 'MIXED_P2P': 'False', 'NUM_POOLS': '3', 'DB_BACKEND': '', 'HAS_CC': 'True', 'cardano-node-tests rev': '36e7b5d18ae4094bdd788aa07799771333416498', 'cardano-node-tests url': 'https://github.com/IntersectMBO/cardano-node-tests/tree/36e7b5d18ae4094bdd788aa07799771333416498', 'CARDANO_NODE_SOCKET_PATH': '/home/artur/Downloads/Treasury_Withdrawals/cardano-node-tests/dev_workdir/state-cluster0/bft1.socket', 'cardano-cli exe': '/nix/store/52kb3arhansrzggmp2gqxf6h92dfbm04-cardano-cli-exe-cardano-cli-8.24.0.0/bin/cardano-cli', 'cardano-node exe': '/nix/store/2wjw5197lryp4lpymd4zygvlxs4f967x-cardano-node-exe-cardano-node-8.12.1/bin/cardano-node', 'cardano-submit-api exe': '/nix/store/ix9066vs9bia5nvwqf22qa12f1lzqnsp-cardano-submit-api-exe-cardano-submit-api-8.12.0/bin/cardano-submit-api', 'network magic': 42, 'HAS_DBSYNC': 'True', 'db-sync': '13.2.0.1', 'db-sync rev': 'cd10a2bf3849da5eb605ca0e92056990fb92b61d', 'db-sync ghc': 'ghc-8.10', 'db-sync exe': '/nix/store/lv0z3q20mfaldqq70wp51ipr8yasggcp-cardano-db-sync-exe-cardano-db-sync-13.2.0.1/bin/cardano-db-sync'}
rootdir: /home/artur/Downloads/Treasury_Withdrawals/cardano-node-tests
configfile: pyproject.toml
plugins: allure-pytest-2.13.5, hypothesis-6.100.2, html-3.2.0, metadata-3.1.1, order-1.2.1, select-0.1.2, xdist-3.3.1
collected 1421 items / 1419 deselected / 2 selected                                                                                                                                                                                                               

cardano_node_tests/tests/tests_conway/test_pparam_update.py::TestPParamUpdate::test_pparam_update@long 
------------------------------------------------------------------------------------------------------------------------- live log setup --------------------------------------------------------------------------------------------------------------------------
INFO     cardano_node_tests.tests.conftest:conftest.py:188 Changed CWD to '/home/artur/Downloads/Treasury_Withdrawals/cardano-node-tests/dev_workdir/tmp/pytest-of-artur/pytest-0'.
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 58.00 sec for slot no 1025.
-------------------------------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------------------------------
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 40.40 sec for slot no 2005.
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 126.20 sec for slot no 3025.
INFO     cardano_clusterlib.clusterlib_klass:clusterlib_klass.py:372 Waiting for 194.60 sec for slot no 4025.
PASSED
cardano_node_tests/tests/tests_conway/test_pparam_update.py::TestPParamData::test_pparam_keys PASSED
------------------------------------------------------------------------------------------------------------------------ live log teardown ------------------------------------------------------------------------------------------------------------------------
INFO     cardano_node_tests.utils.dbsync_conn:dbsync_conn.py:34 Closing connection to db-sync database dbsync0.


========================================================================================================= 2 passed, 1419 deselected in 691.20s (0:11:31) ==========================================================================================================

Conway Nightly CC Tests: ✔️
https://github.com/IntersectMBO/cardano-node-tests/actions/runs/9776536114

Nightly DB-Sync Tests: ✔️
https://github.com/IntersectMBO/cardano-node-tests/actions/runs/9778845427

@ArturWieczorek ArturWieczorek merged commit 2392bad into master Jul 9, 2024
3 checks passed
@ArturWieczorek ArturWieczorek deleted the artur/cip-tests branch July 9, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants