Skip to content
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

SIMD-0192: Relax Transaction Constraints - Account Resolution #192

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apfitzge
Copy link
Contributor

@apfitzge apfitzge commented Nov 6, 2024

No description provided.

@apfitzge apfitzge force-pushed the transaction_account_resolution branch from 04f3dd3 to 7ed2ca5 Compare November 6, 2024 20:17
@apfitzge apfitzge changed the title SIMD-XXXX: Relax Transaction Constraints - Account Resolution SIMD-0192: Relax Transaction Constraints - Account Resolution Nov 6, 2024
@ptaffet-jump
Copy link
Contributor

I like the idea!

All account table indices specified in the transaction must be less than the number of active addresses in the address lookup table.

This one gives me a bit of pause because of the potential race between extending an address lookup table and using the new indices. Right now, the warmup is only one slot, which means the following scenario is possible:

  1. User extends a table in Transaction A.
  2. Transaction A lands in slot x, and the user sees that.
  3. The validator switches forks so that slot x+1's parent is not x, and the table extension gets "rolled back"
  4. The user submits Transaction B using the new indices
  5. Transaction B gets included in slot x+1, marked as a Runtime Transaction Error
  6. The user eventually notices that Transaction A didn't confirm and re-sends it.
  7. The user can't re-send transaction B because it already landed on chain as a Runtime Transaction Error

This isn't horrible, and the user can deal with it in several ways (resigning and re-sending Transaction B, making Transaction B's recent blockhash slot x, waiting until slot x is optimistically confirmed or rooted).

I just think this case needs to be thought out a bit.

@apfitzge
Copy link
Contributor Author

I like the idea!

All account table indices specified in the transaction must be less than the number of active addresses in the address lookup table.

This one gives me a bit of pause because of the potential race between extending an address lookup table and using the new indices. Right now, the warmup is only one slot, which means the following scenario is possible:

1. User extends a table in `Transaction A`.

2. `Transaction A` lands in slot `x`, and the user sees that.

3. The validator switches forks so that slot `x+1`'s parent is not `x`, and the table extension gets "rolled back"

4. The user submits `Transaction B` using the new indices

5. `Transaction B` gets included in slot `x+1`, marked as a `Runtime Transaction Error`

6. The user eventually notices that `Transaction A` didn't confirm and re-sends it.

7. The user can't re-send transaction B because it already landed on chain as a `Runtime Transaction Error`

This isn't horrible, and the user can deal with it in several ways (resigning and re-sending Transaction B, making Transaction B's recent blockhash slot x, waiting until slot x is optimistically confirmed or rooted).

I just think this case needs to be thought out a bit.

It's a good point, but I don't view the case as substantially different than the race between any state on Solana wrt fork changes.
If someone places a limit order, and I go to take it, but my tx ends up on a different fork than the original LO, my transaction will fail and I'd have to re-sign to send the same tx again if the LO ends up on the other fork.

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.

2 participants