Merge pull request #1625 from input-output-hk/wait_for_cost_models
Wait for cost models to appear in db
Wait for cost models to appear in db
pytestmark = pytest.mark.needs_dbsync
@pytest.mark.smoke
class TestDBSync:
"""General db-sync tests."""
reason="needs db-sync version >= 12.0.1",
)
@pytest.mark.testnets
@pytest.mark.smoke
def test_table_names(self, cluster: clusterlib.ClusterLib):
"""Check that all the expected tables are present in db-sync."""
common.get_test_id(cluster)
@allure.link(helpers.get_vcs_link())
@pytest.mark.order(-10)
@pytest.mark.testnets
@pytest.mark.smoke
def test_blocks(self, cluster: clusterlib.ClusterLib): # noqa: C901
"""Check expected values in the `block` table in db-sync."""
# pylint: disable=too-many-branches
"""Check expected values in the `cost_model` table in db-sync."""
common.get_test_id(cluster)
protocol_params = cluster.g_query.get_protocol_params()
db_cost_models = dbsync_queries.query_cost_model()
# wait till next epoch if the cost models are not yet available
if not db_cost_models:
cluster.wait_for_new_epoch(padding_seconds=5)
db_cost_models = dbsync_queries.query_cost_model()
protocol_params = cluster.g_query.get_protocol_params()
pp_cost_models = protocol_params["costModels"]
db_cost_models = dbsync_queries.query_cost_model()
assert (
pp_cost_models["PlutusScriptV1"] == db_cost_models["PlutusV1"]
I don't trust it. Compare these two runs: 1. https://github.com/input-output-hk/cardano-haskell-packages/actions/runs/4532746158/jobs/7984714895 2. https://github.com/input-output-hk/cardano-haskell-packages/actions/runs/4516172089/jobs/7954255360 The second is on the parent commit of the first, the commit itself is a no-op, and yet the derivations they build are not the same! Doing the same locally, I get a) a different derivation, but b) the same derivation for both. I conclude that what the CI is doing is questionable, the cache seems like the most likely source of pollution. I suspect whatever is causing this was also responsible for the no-op PR spending a lot of time building tons of stuff.
* Update readme (cli flags, comment dsl, new format) * Document the comment DSL * Document CLI flags * Mention new split rust/wasm output structure * Remove unsupported section (to handle in issues instead as this tends to get very outdated) * respond to comments + add supported.cddl * minor fixes for comment placement in supported.cddl + remove unsupported optional fixed value from example
Co-authored-by: Sebastien Guillemot <[email protected]>
5018: Use ouroboros-network-0.3.0.2 and ouroboros-network-framework-0.2.0.1 r=dermetfan a=coot Co-authored-by: Marcin Szamotulski <[email protected]> Co-authored-by: Samuel Leathers <[email protected]>
Waiting for a day, at a pace of one block every 20 seconds would generate 4320 blocks which takes forever to be created and processes, even in IO sim. We don't really observe the issue now because we cheat in the way we generate the block. This commit helps preparing for a more realistic block generation.