sui
sui copied to clipboard
[programmable transactions] Added type declarations
- Added type/struct declarations
- Added some basic checks/infrastructure
Nothing here is final. I'm just trying to break things up a bit so they will be easier to land and change in time. I'm not exactly sure how best to block the transaction kind outside of tests without a CFG check. If anyone has suggestions let me know :)
(built on #7791)
EDIT: I also am sticking with the 2D approach as I think it will make things a bit easier when dealing with entry
functions that take a vector of objects as inputs. I can write up a bit more about this if/when we want to discuss it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
explorer | ⬜️ Ignored (Inspect) | Feb 15, 2023 at 1:23AM (UTC) | ||
explorer-storybook | ⬜️ Ignored (Inspect) | Feb 15, 2023 at 1:23AM (UTC) | ||
frenemies | ⬜️ Ignored (Inspect) | Feb 15, 2023 at 1:23AM (UTC) | ||
wallet-adapter | ⬜️ Ignored (Inspect) | Feb 15, 2023 at 1:23AM (UTC) |
I'm not exactly sure how best to block the transaction kind outside of tests without a CFG check.
You can explicitly return an error in the gRPC interface in authority_server.rs
if its one of these txn types.
authority_server
@bmwill, I imagine this would be in handle_transaction
?
What errors do we expect to emit for things that are "too new"? That is, something that would be in some new version of Sui, but is not yet supported?
authority_server
@bmwill, I imagine this would be in
handle_transaction
?What errors do we expect to emit for things that are "too new"? That is, something that would be in some new version of Sui, but is not yet supported?
Sorry I just saw this. Yea in handle txn most likely although we may also want some other checks in other places as well to ensure this would be rejected unless a particular version bump has happened
authority_server
@bmwill, I imagine this would be in
handle_transaction
? What errors do we expect to emit for things that are "too new"? That is, something that would be in some new version of Sui, but is not yet supported?Sorry I just saw this. Yea in handle txn most likely although we may also want some other checks in other places as well to ensure this would be rejected unless a particular version bump has happened
We have the checks in the transaction input checker. This will prevent it from being signed unless cfg(test)
passes. Is there a reason to have a check anywhere else?
I can add one in authority_server
for example, but it feels a bit redundant. Thoughts?
No need to add more if you feel confident with the checks you've added
No need to add more if you feel confident with the checks you've added
I think what we have is fine, it's just not great. And I didn't really understand our planned versioning story before last week. I think the main thing to decide for this PR:
Is there a canonical error for things that are "too new" from a versioning perspective? Right now I just have SuiError::Unknown