Conversation
4c63763 to
9e39e98
Compare
|
With anza-xyz/pinocchio#349 in progress, was able to remove the shim! 🎊 |
1fc9658 to
add440f
Compare
|
Update: going to investigate p-token style fixtures approach to testing both binaries |
| cargo $(nightly) test --features mollusk-svm/fuzz --manifest-path program/Cargo.toml \ | ||
| --test create_always \ | ||
| --test create_idempotent \ | ||
| --test create_shared && \ |
There was a problem hiding this comment.
Found this to be the way we can do conformance testing only on the code paths that have been migrated so far. It also serves a dual purpose as think it's helpful to break down large test files into smaller scoped ones.
c0474ab to
1190109
Compare
|
|
||
| harness | ||
| .ctx | ||
| .process_and_validate_instruction(&instruction, &[Check::err(ProgramError::IllegalOwner)]); |
There was a problem hiding this comment.
nit: This error is a bit misleading, since the owner is correct. Maybe is_valid_existing_ata_for_idempotent needs to return specific errors depending of which assert failed. But I do see that the processor is not complete, so maybe is something that you will address later.
There was a problem hiding this comment.
You're right. It's a strange case. From the caller's perspective they submitted a valid wallet/mint/token-program and the ATA address has a token program owned account sitting there (but with invalid data).
This error is inherited from the current program. Wouldn't changing it break conformance?
There was a problem hiding this comment.
Ah, I see, if unpack fails in the original program (which will in this case), it will then reach the ProgramError::IllegalOwner error. You are right, we can't change that. So this is correct, it is replicating the same behaviour.
a6ba167 to
2cc4432
Compare
febo
left a comment
There was a problem hiding this comment.
Looks good! I think it only needs a rebase.
|
|
||
| harness | ||
| .ctx | ||
| .process_and_validate_instruction(&instruction, &[Check::err(ProgramError::IllegalOwner)]); |
There was a problem hiding this comment.
Ah, I see, if unpack fails in the original program (which will in this case), it will then reach the ProgramError::IllegalOwner error. You are right, we can't change that. So this is correct, it is replicating the same behaviour.
2cc4432 to
6453e8d
Compare
This PR adds the first portion of the Pinocchio
create_associated_token_accountflow covering the idempotent w/ existing ATA case.Also integrates mollusk fixtures to serve as conformance testing between old and new programs.