Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

WIP - Extending the Spawn Transaction to support Self Spawn #468

Closed
YaronWittenstein opened this issue Dec 21, 2021 · 0 comments
Closed
Labels
AA Related to the Accounts Abstraction simple-coin-iteration-4 svm svm-core SVM core change

Comments

@YaronWittenstein
Copy link
Contributor

YaronWittenstein commented Dec 21, 2021

Depends on: #247 #467 #466

This issue extends the Spawn Transaction behavior to support the Self-Spawn mode.

Running verify as part of the Self-Spawn.

This one is a bit tricky to get right. We want to execute the verify while the Principal is in Pending State.
It means it has no Storage yet and no Template attached to it.

run(`Template Address`, `svm_verify`, `Principal`, `verifydata`, `immutable storage`, `initial nonce`)

When this issue is implemented, the Immutable Storage won't exist yet.
(it's left for the `Simple Coin Iteration #4).

While writing this

The amount field can be ignored (since it's a self-funding)

However, we still need to

Pseudo code:

if Principal is Active {
  * run the default flow (as today)
}
else if Principal is Pending {
  //
  * Set `Account Template` to the one given at the `Spawn Transaction` (the `Template` field)
  * Mark as Active
  * run the `verify` ???
  * run the default flow (as today)
}
else {
  // Prinicipal doesn't exist
  panic()
}
@YaronWittenstein YaronWittenstein added AA Related to the Accounts Abstraction simple-coin-iteration-4 svm svm-core SVM core change labels Dec 21, 2021
@YaronWittenstein YaronWittenstein changed the title Extending the Spawn Transaction to support Self Spawn WIP - Extending the Spawn Transaction to support Self Spawn Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AA Related to the Accounts Abstraction simple-coin-iteration-4 svm svm-core SVM core change
Projects
None yet
Development

No branches or pull requests

1 participant