Conversation
|
@bitwalker I've tried to use Besides that, I've been thinking about the target audience for the testing harness, and I think it might be too opinionated for the end users. Meaning that they would have to familiarize themselves with Miden client API anyway when they will be writing their off-chain code. And now we are forcing them to also learn an opinionated framework to write their tests instead of just letting them use the already familiar Miden client API that they've used in their off-chain code. |
|
@greenhat To be clear, the testing harness in the integration test suite is for internal use only, the public test harness would almost certainly look different, and likely incorporate the efforts by the node and client teams in terms of describing test setup/scenarios. If the |
ea2f2db to
6996cc8
Compare
08244c5 to
2627bb1
Compare
2627bb1 to
c3db78a
Compare
c3db78a to
0429792
Compare
1b4e5b1 to
b4a1e66
Compare
317dd61 to
801f39e
Compare
5c6265c to
b95f38a
Compare
|
@bobbinth @bitwalker @partylikeits1983 However, I found that In the upcoming type signatures and automated Rust bindings generation we need to differentiate words from multiple felts and encode the words in reverse order in the Rust bindings. |
I'm assuming you mean SHA, Blake, and Keccak hashing procedures here, right? If so, this was done originally and never fixed. We actually have an issue for this (0xMiden/miden-vm#571) but it's been open quite some time ago. We could change the order of inputs for these procedures and the internally just reverse them again. This would avoid rewriting the entire procedures at the expense of 10 - 15 cycles (I think). |
setting for the note script
The testnet integration test infrastructure was creating accounts without storing their authentication keys in the keystore, causing signature generation failures during transaction execution. This commit: - Adds a FilesystemKeyStore instance to the Scenario struct - Passes the keystore to create_account function - Stores the authentication key (RpoFalcon512) in the keystore before adding the account to the client
until #622 is implemented
ed8c1ea to
bf112a5
Compare
29aa8d3 to
bba2ceb
Compare
|
@bitwalker This PR has been going on for quite some time. I want to do the remaining part of the basic-wallet test (note creation) in a new PR after I do the tx script compilation. I cleaned up and polished this PR, and it's ready for review. |
|
I tried to clean up the commits, but since there was a lot of back and forth on some features, it's still a mess. We can merge it via the |
| uuid = { version = "1.10", features = ["v4"] } | ||
|
|
||
| # For accessing the test builder from the main integration tests | ||
| miden-integration-tests = { path = "../integration" } |
There was a problem hiding this comment.
Maybe we should move shared test code like that into a midenc-testing crate, and then share it between miden-integration-tests (which we should probably rename to `midenc-integration-tests) and this crate?
Having this crate depend on miden-integration-tests sort of defeats the point of splitting it out into its own crate IMO.
There was a problem hiding this comment.
Good point! I agree.
| @@ -0,0 +1,38 @@ | |||
| [package] | |||
| name = "miden-integration-node-tests" | |||
There was a problem hiding this comment.
Let's name this midenc-integration-network-tests, since the tests aren't really testing the node (which the name kind of implies), instead we're testing programs against a local version of the network (i.e. testnet)
We should use the midenc- prefix for any compiler crates, even if they aren't published, since the miden- prefix is heavily used by other parts of the project, and it helps us to avoid naming conflicts, and provides a bit more context for where the crate fits. Ideally we'd namespace all Miden crates better than we do now, but that ship has mostly already sailed, the compiler is really the only one that has been consistent about using its own prefix.
There was a problem hiding this comment.
Let's name this
midenc-integration-network-tests, since the tests aren't really testing the node (which the name kind of implies), instead we're testing programs against a local version of the network (i.e. testnet)
I agree the name is a bit misleading. When I see the network in the name I'm thinking of the tests that are relying on the external services. Also, testnet means for me the "official" instance of the chain running by the creators for the testing purposes. So when I bootstrap the local node in my test I'm creating the new instance of the chain on every test run. For some reason "local node" describes it for me the best. How about midenc-integration-local-chain-tests?
bitwalker
left a comment
There was a problem hiding this comment.
Looks good overall! I didn't do a deep dive into the node setup code, but from a quick skim I didn't see anything that seemed like it needs to be addressed in this PR. At some point I'd like to walk through how it works with you so that I have a better understanding of it, but the broad strokes make sense.
I'm marking this approved, but have a couple of nits I'd like to address. I'll leave it up to you whether it is easier to do them in this PR, or open a follow-on PR that makes them. Your call.
|
I'd like to merge it as is. I made #629 to address the comments in the next PR. |
Close #554
Ref #544
This PR:
miden-integration-node-testscrate with a counter contract test (complete) and basic wallet and p2id note tests running against a local node; the tests are using the same node instance with the first test starting the node and the last one killing it; the local node is bootstrapped on each run;Scenariotesting harness for the testnet;