-
Notifications
You must be signed in to change notification settings - Fork 2
Updating the README with the upcoming new API #15
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only had one comment, I think everything else we discussed is covered here 👍🏻
(we also discussed having a CLI for encoding transactions and possibly pre-generating addresses, but I think this is off-topic for this readme)
|
||
Go bindings for [SVM](https://github.com/spacemeshos/svm) | ||
|
||
## Project structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README shouldn't be used only for High-level API
specs. You can leave the existed info as is, at least until we'll do some changes there.
Each `Message` will be accompanied by the `Envelope` to form together a complete binary Transaction. | ||
|
||
In addition to the explicit data sent over-the-wire, there will be implicit fields inferred from it. | ||
One such example, is the `Transaction Id`. For the context of this document, we won't regard these implied fields as part of the Transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plz elaborate on who's side role is it to infer these fields (specifically Transaction Id
), and how.
|
||
- `Deploy Message` - For deploying Templates. | ||
- `Spawn Message` - For Spawning new accounts out of existing Templates. | ||
- `Call Message` - For calling an existing accounts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"For calling an existing accounts." -> "For calling a function on an existing account." ?
|
||
### Deploy Message | ||
|
||
The `Deploy Message` will be generated by the `Template compiler`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate more on that? What exactly is the Template compiler
, how should it be used, etc.
### Deploy Message | ||
|
||
The `Deploy Message` will be generated by the `Template compiler`. | ||
Right now it'll be using the `SVM SDK`, but in the future there might be more ways to achieve that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SVM SDK
-- plz provide a link for more info.
|
||
#### Call | ||
|
||
Performs the actual calling an `Account`. Returns a `CallReceipt` in return. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you didn't include Call
function signature?
### Verify | ||
|
||
Performs the `verify` stage as dictated by the [Account Unification](https://github.com/spacemeshos/SMIPS/issues/49) design. | ||
Since the `verify` flow involves the running Wasm function as done when running a `Call` transaction, the output will be of type `CallReceipt` as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it end up returning only a boolean value?
|
||
### Rewind | ||
|
||
Rewinds the `Global State` to an historical layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate more on the use-case and how should it be used? Also, it's not clear from what SVM
gets its notion of layers.
func Commit(rt Runtime) State | ||
``` | ||
|
||
If the persistence operation failed - then it's an undefined behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it may fail due to internal issues, why isn't it returning an error as well?
### SvmError | ||
|
||
```go | ||
struct SvmError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plz elaborate more on this.
Also, you described other types' fields with a bulleted list. Any reason why it's different here?
In order to streamline things regarding the SVM integration - this API documents in high-level how the
go-svm
new API will look