diff --git a/functional-tests/poetry.lock b/functional-tests/poetry.lock index 35e8c8e85..c0783ac64 100644 --- a/functional-tests/poetry.lock +++ b/functional-tests/poetry.lock @@ -1810,29 +1810,29 @@ test = ["hypothesis (==5.19.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "ruff" -version = "0.8.4" +version = "0.9.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60"}, - {file = "ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac"}, - {file = "ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8"}, - {file = "ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835"}, - {file = "ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d"}, - {file = "ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08"}, - {file = "ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8"}, + {file = "ruff-0.9.4-py3-none-linux_armv6l.whl", hash = "sha256:64e73d25b954f71ff100bb70f39f1ee09e880728efb4250c632ceed4e4cdf706"}, + {file = "ruff-0.9.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6ce6743ed64d9afab4fafeaea70d3631b4d4b28b592db21a5c2d1f0ef52934bf"}, + {file = "ruff-0.9.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:54499fb08408e32b57360f6f9de7157a5fec24ad79cb3f42ef2c3f3f728dfe2b"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37c892540108314a6f01f105040b5106aeb829fa5fb0561d2dcaf71485021137"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:de9edf2ce4b9ddf43fd93e20ef635a900e25f622f87ed6e3047a664d0e8f810e"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87c90c32357c74f11deb7fbb065126d91771b207bf9bfaaee01277ca59b574ec"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:56acd6c694da3695a7461cc55775f3a409c3815ac467279dfa126061d84b314b"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0c93e7d47ed951b9394cf352d6695b31498e68fd5782d6cbc282425655f687a"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1d4c8772670aecf037d1bf7a07c39106574d143b26cfe5ed1787d2f31e800214"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfc5f1d7afeda8d5d37660eeca6d389b142d7f2b5a1ab659d9214ebd0e025231"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:faa935fc00ae854d8b638c16a5f1ce881bc3f67446957dd6f2af440a5fc8526b"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a6c634fc6f5a0ceae1ab3e13c58183978185d131a29c425e4eaa9f40afe1e6d6"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:433dedf6ddfdec7f1ac7575ec1eb9844fa60c4c8c2f8887a070672b8d353d34c"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d612dbd0f3a919a8cc1d12037168bfa536862066808960e0cc901404b77968f0"}, + {file = "ruff-0.9.4-py3-none-win32.whl", hash = "sha256:db1192ddda2200671f9ef61d9597fcef89d934f5d1705e571a93a67fb13a4402"}, + {file = "ruff-0.9.4-py3-none-win_amd64.whl", hash = "sha256:05bebf4cdbe3ef75430d26c375773978950bbf4ee3c95ccb5448940dc092408e"}, + {file = "ruff-0.9.4-py3-none-win_arm64.whl", hash = "sha256:585792f1e81509e38ac5123492f8875fbc36f3ede8185af0a26df348e5154f41"}, + {file = "ruff-0.9.4.tar.gz", hash = "sha256:6907ee3529244bb0ed066683e075f09285b38dd5b4039370df6ff06041ca19e7"}, ] [[package]] @@ -2275,4 +2275,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "d08844150f47655a7ebbcc9d368a6b95073b833035efad067d75908b51188ecd" +content-hash = "1a9aa4b2ae0cf48e85e2f6679edfab6fcbc95ed88cbb360fce24a566dd35e4d4" diff --git a/functional-tests/pyproject.toml b/functional-tests/pyproject.toml index f8ec97f24..6e52dc0ca 100644 --- a/functional-tests/pyproject.toml +++ b/functional-tests/pyproject.toml @@ -14,7 +14,7 @@ web3 = "^7.7.0" py-solc-x = "^2.0.3" [tool.poetry.group.dev.dependencies] -ruff = "0.8.4" +ruff = "0.9.4" maturin = "1.8.1" [tool.ruff] diff --git a/functional-tests/tests/bridge/bridge_deposit_happy.py b/functional-tests/tests/bridge/bridge_deposit_happy.py index b36195446..2d0d55f5c 100644 --- a/functional-tests/tests/bridge/bridge_deposit_happy.py +++ b/functional-tests/tests/bridge/bridge_deposit_happy.py @@ -170,6 +170,6 @@ def test_deposit( assert new_balance > original_balance, "balance did not increase" # Make sure that the balance is the default deposit amount of BTC in Strata "wei" - assert new_balance - original_balance == rollup_deposit_amount * ( - 10**10 - ), "balance is not the default rollup_deposit_amount" + assert new_balance - original_balance == rollup_deposit_amount * (10**10), ( + "balance is not the default rollup_deposit_amount" + ) diff --git a/functional-tests/tests/bridge/bridge_deposit_reclaim.py b/functional-tests/tests/bridge/bridge_deposit_reclaim.py index 0e1266eec..8c449779e 100644 --- a/functional-tests/tests/bridge/bridge_deposit_reclaim.py +++ b/functional-tests/tests/bridge/bridge_deposit_reclaim.py @@ -90,7 +90,7 @@ def main(self, ctx: flexitest.RunContext): blocks_to_generate = DEFAULT_TAKEBACK_TIMEOUT // chunks self.debug(f"Generating {DEFAULT_TAKEBACK_TIMEOUT} blocks in {chunks} chunks") for i in range(chunks): - self.debug(f"Generating {blocks_to_generate} blocks in chunk {i+1}/{chunks}") + self.debug(f"Generating {blocks_to_generate} blocks in chunk {i + 1}/{chunks}") btcrpc.proxy.generatetoaddress(blocks_to_generate, UNSPENDABLE_ADDRESS) # Make sure that the BTC refund address has the expected balance diff --git a/functional-tests/tests/bridge/bridge_deposit_reclaim_drt_seen.py b/functional-tests/tests/bridge/bridge_deposit_reclaim_drt_seen.py index b40f892a6..922455974 100644 --- a/functional-tests/tests/bridge/bridge_deposit_reclaim_drt_seen.py +++ b/functional-tests/tests/bridge/bridge_deposit_reclaim_drt_seen.py @@ -86,7 +86,7 @@ def main(self, ctx: flexitest.RunContext): blocks_to_generate = DEFAULT_TAKEBACK_TIMEOUT // chunks self.debug(f"Generating {DEFAULT_TAKEBACK_TIMEOUT} blocks in {chunks} chunks") for i in range(chunks): - self.debug(f"Generating {blocks_to_generate} blocks in chunk {i+1}/{chunks}") + self.debug(f"Generating {blocks_to_generate} blocks in chunk {i + 1}/{chunks}") btcrpc.proxy.generatetoaddress(blocks_to_generate, UNSPENDABLE_ADDRESS) # Make sure that the BTC refund address has the expected balance diff --git a/functional-tests/tests/bridge/bridge_duties.py b/functional-tests/tests/bridge/bridge_duties.py index 868a1d18e..2935c067a 100644 --- a/functional-tests/tests/bridge/bridge_duties.py +++ b/functional-tests/tests/bridge/bridge_duties.py @@ -99,6 +99,6 @@ def sorting_key(x) -> str: assert len(duties) == len(expected_duties), "num duties must match" assert duties == expected_duties, "duties in response should match expected ones" assert duties_resp["start_index"] == start_index, "start index must match" - assert ( - duties_resp["stop_index"] > start_index - ), "stop_index must be greater than start_index" + assert duties_resp["stop_index"] > start_index, ( + "stop_index must be greater than start_index" + ) diff --git a/functional-tests/tests/btcio/btcio_inscriber.py b/functional-tests/tests/btcio/btcio_inscriber.py index fee7d9ab6..81733c895 100644 --- a/functional-tests/tests/btcio/btcio_inscriber.py +++ b/functional-tests/tests/btcio/btcio_inscriber.py @@ -29,8 +29,8 @@ def main(self, ctx: flexitest.RunContext): blobdata = "2c4253d512da5bb4223f10e8e6017ede69cc63d6e6126916f4b68a1830b7f805" tx = submit_da_blob(btcrpc, seqrpc, blobdata) - assert any( - [blobdata in w.hex() for w in tx.inputs[0].witnesses] - ), "Tx should have submitted blobdata in its witness" + assert any([blobdata in w.hex() for w in tx.inputs[0].witnesses]), ( + "Tx should have submitted blobdata in its witness" + ) return True diff --git a/functional-tests/tests/btcio/btcio_read.py b/functional-tests/tests/btcio/btcio_read.py index d70108c82..c05b34f17 100644 --- a/functional-tests/tests/btcio/btcio_read.py +++ b/functional-tests/tests/btcio/btcio_read.py @@ -35,11 +35,11 @@ def main(self, ctx: flexitest.RunContext): cur_time = l1stat["last_update"] // 1000 # check if height on bitcoin is same as, it is seen in sequencer - self.debug(f'L1 stat curr height: {l1stat["cur_height"]}') - self.debug(f'Received from bitcoin: {received_block["height"]}') - assert ( - l1stat["cur_height"] == received_block["height"] - ), "sequencer height doesn't match the bitcoin node height" + self.debug(f"L1 stat curr height: {l1stat['cur_height']}") + self.debug(f"Received from bitcoin: {received_block['height']}") + assert l1stat["cur_height"] == received_block["height"], ( + "sequencer height doesn't match the bitcoin node height" + ) # generate 2 more btc blocks generate_n_blocks(btcrpc, 2) diff --git a/functional-tests/tests/client_status.py b/functional-tests/tests/client_status.py index 859863d3d..3f3658780 100644 --- a/functional-tests/tests/client_status.py +++ b/functional-tests/tests/client_status.py @@ -21,10 +21,10 @@ def main(self, ctx: flexitest.RunContext): ) proto_ver = seqrpc.strata_protocolVersion() - self.debug(f"protocol version { proto_ver}") + self.debug(f"protocol version {proto_ver}") assert proto_ver == 1, "query protocol version" client_status = seqrpc.strata_clientStatus() - self.debug(f"client status { client_status}") + self.debug(f"client status {client_status}") return True diff --git a/functional-tests/tests/sync/sync_genesis.py b/functional-tests/tests/sync/sync_genesis.py index 37cef37c3..77d4c2269 100644 --- a/functional-tests/tests/sync/sync_genesis.py +++ b/functional-tests/tests/sync/sync_genesis.py @@ -49,7 +49,7 @@ def main(self, ctx: flexitest.RunContext): stat = seqrpc.strata_clientStatus() tip_slot = stat["chain_tip_slot"] tip_blkid = stat["chain_tip"] - self.debug(f"cur tip slot {tip_slot} blkid { tip_blkid}") + self.debug(f"cur tip slot {tip_slot} blkid {tip_blkid}") assert tip_slot >= last_slot, "cur slot went backwards" assert tip_slot > last_slot, "seem to not be making progress" last_slot = tip_slot diff --git a/functional-tests/utils/utils.py b/functional-tests/utils/utils.py index 420f991a1..7ee7fc314 100644 --- a/functional-tests/utils/utils.py +++ b/functional-tests/utils/utils.py @@ -172,9 +172,9 @@ def check_nth_checkpoint_finalized( timeout=3, ) - assert ( - syncstat["finalized_block_id"] != batch_info["l2_blockid"] - ), "Checkpoint block should not yet finalize" + assert syncstat["finalized_block_id"] != batch_info["l2_blockid"], ( + "Checkpoint block should not yet finalize" + ) assert batch_info["idx"] == idx checkpoint_info_next = seqrpc.strata_getCheckpointInfo(idx + 1) assert checkpoint_info_next is None, f"There should be no checkpoint info for {idx + 1} index" @@ -576,9 +576,9 @@ def confirm_btc_withdrawal( debug_fn(f"BTC final balance: {btc_balance}") debug_fn(f"Expected final balance: {original_balance + expected_increase}") - assert ( - btc_balance == original_balance + expected_increase - ), "BTC balance after withdrawal is not as expected" + assert btc_balance == original_balance + expected_increase, ( + "BTC balance after withdrawal is not as expected" + ) def check_initial_eth_balance(rethrpc, address, debug_fn=print):