Skip to content

Conversation

@tnowacki
Copy link
Contributor

Description

  • Initial check in of static PTB rewrite
  • Main AST translation passes are complete
  • TODOs remain around linking and execution

Test plan

  • Currently unused

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@tnowacki tnowacki requested a review from a team May 28, 2025 22:50
@tnowacki tnowacki requested a review from joyqvq as a code owner May 28, 2025 22:50
@tnowacki tnowacki temporarily deployed to sui-typescript-aws-kms-test-env May 28, 2025 22:50 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented May 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 6:27pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jun 4, 2025 6:27pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jun 4, 2025 6:27pm

@@ -0,0 +1,78 @@
// Copyright (c) Mysten Labs, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not reuse the compiler's span library?

Not that I am particularly concerned, just curious.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiler's Spanned<T> is a Loc + T where Loc is the byte offset/file hash etc. whereas this is a u16 + T so even though they have the same name they are quite different.

IMO this points to possibly renaming this to something a bit better. Possibly Indexed<T> or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I just named it spanned because of compiler reasons. I thought about Indexed but really hated it because it felt like some sort of mapping or database feeling word, being "indexed". Maybe I am over thinking it though

@@ -0,0 +1,60 @@
// Copyright (c) Mysten Labs, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little confused about the naming -- in what sense is this static? Not trying to 🚲 🏠 too hard, just understand the idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is is "static" in the static typing sense. I think once there is an execution version cut though, this will get renamed to programmable_transactions. So happy to just _v2 it if y'all prefer

Copy link
Contributor

@cgswords cgswords left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code mostly LGTM. I am sure as this matures we will all get more-comfortable with it and any small concerns I have now will go away. I think we should have @tzakian also look through it just to make sure.

Copy link
Contributor

@tzakian tzakian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments as there are two main things to look at in typing, but otherwise I think good enough to land for now. I'll want to take a couple more in-depth passes over this before we would enable it anywhere, but that can be done while working on it -- for now I think this is a good starting point to jump off from.

vec![]
}
T::Command_::SplitCoins(_, coin, amounts) => {
// TODO should we just call a Move function?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note if we plan on doing this that it will have some ramifications for linkage analysis (they'll be small/easy but just something worth noting possibly).

@@ -0,0 +1,78 @@
// Copyright (c) Mysten Labs, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiler's Spanned<T> is a Loc + T where Loc is the byte offset/file hash etc. whereas this is a u16 + T so even though they have the same name they are quite different.

IMO this points to possibly renaming this to something a bit better. Possibly Indexed<T> or something like that?

@tnowacki tnowacki temporarily deployed to sui-typescript-aws-kms-test-env June 4, 2025 18:24 — with GitHub Actions Inactive
@tnowacki tnowacki enabled auto-merge (squash) June 4, 2025 18:52
@tnowacki tnowacki merged commit 9eec963 into MystenLabs:main Jun 4, 2025
49 checks passed
@tnowacki tnowacki deleted the static-ptb branch June 4, 2025 21:41
damirka pushed a commit that referenced this pull request Jul 17, 2025
## Description 

- Initial check in of static PTB rewrite 
- Main AST translation passes are complete 
- TODOs remain around linking and execution

## Test plan 

- Currently unused

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
TheMrAI added a commit to iotaledger/iota that referenced this pull request Jul 31, 2025
…kage linkage (#8046)

# Description of change

Add additional signature and linkage checks.

## Links to any relevant issues

fixes #8034 

- Also partially pulled in changes from
MystenLabs/sui#22362 for the used
`InvalidLinkage` error, but no changes regarding `iota-rest-api` as it
all will get refactored/renamed in
MystenLabs/sui#20435.
- Omitted changed touching **static-ptb** as those only get introduced
in: MystenLabs/sui#22256

## How the change has been tested

- [ ] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have checked that new and existing unit tests pass locally with
my changes

### Release Notes

- [x] Protocol: Adds a new protocol config options to enable additional
signature and linkage checks.
- [ ] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants