-
Notifications
You must be signed in to change notification settings - Fork 165
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
Unit tests for hash computations #1942
Comments
Will like to take care of this one! |
assigned! |
You can just pick any txs (of each type) on Voyager then take their hash and the tx data that are used as inputs for the tx hash computation. For example, to compute a invoke tx hash you'd need these data: dojo/crates/katana/primitives/src/utils/transaction.rs Lines 187 to 194 in 5a7ecd8
starknet docs for extra reference: https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/transactions/ |
hi @glihm, I would love to work on this |
hey @Jonatan-Chaverri because there hasn't been any progress so far, i will be assigning this to @g4titanx instead. |
okay, thanks |
hi @kariy do you know of a faster way to search for versions of txs on voyager? i am having zero-luck finding a v3 declare type. i mean, since it's a v3 it should be among the latest txs. but even the latest txs dont use v3 |
good question, tbh im also not sure. both starkscan and voyager doesn't seem to allow filtering by tx version. i looked around the pathfinder repo for this, and maybe we can just copy the tx data for declare v3 from them https://github.com/eqlabs/pathfinder/blob/a133f157bda062187d99129367a0b18182476470/crates/common/src/transaction.rs#L1083. |
yeah, we could. i entered the hash on voyager, there is no record of it tho. |
based on the test cases, it seems to be a tx from SN_GOERLI chain (which is now deprecated). lets just use that one. |
we just need to use chain id for SN_GOERLI when we compute the hash |
alright then |
how do i reference the SN_GOERLI tho, it's not part of the chain id enum here |
replied on the PR, basically lets use Katana's own type for chain id, instead of starknet-rs's. |
okay. |
completed #2216 |
Write unit tests for all the hash computation functions in this module like so:
dojo/crates/katana/primitives/src/utils/transaction.rs
Lines 318 to 323 in 5a7ecd8
The tests should use actual values from the live network (eg mainnet).
We need unit tests for:
The text was updated successfully, but these errors were encountered: