[DO NOT MERGE] feat!: dispatch transition (first pass)#8824
Closed
fcarreiro wants to merge 9 commits into
Closed
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @fcarreiro and the rest of your teammates on |
eb622b7 to
1d84218
Compare
25751b2 to
951c7ba
Compare
1d84218 to
9c2dba2
Compare
951c7ba to
4eb92d8
Compare
9c2dba2 to
89689e0
Compare
4eb92d8 to
86a27d6
Compare
89689e0 to
8c26a59
Compare
86a27d6 to
b7150b9
Compare
8c26a59 to
d37a0fa
Compare
b7150b9 to
6ef1696
Compare
d37a0fa to
c09ef97
Compare
6ef1696 to
b840458
Compare
b840458 to
950159e
Compare
e7d72b8 to
e602516
Compare
b12db30 to
8193546
Compare
c4f547f to
cc5b604
Compare
8193546 to
545dd6a
Compare
cc5b604 to
3af2381
Compare
545dd6a to
7df18de
Compare
Contributor
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
dbanks12
reviewed
Sep 27, 2024
dbanks12
left a comment
Contributor
There was a problem hiding this comment.
I know this isn't ready yet, but I decided to skim anyway because I'm curious. Nice work so far!
Comment on lines
+176
to
+182
| impl <let N: u32> Deserialize<N> for str<N> { | ||
| fn deserialize(fields: [Field; N]) -> Self { | ||
| str<N>::from(fields.map(|value| value as u8)) | ||
| impl <let N: u32> Deserialize<1> for str<31> { | ||
| fn deserialize(fields: [Field; 1]) -> Self { | ||
| fields[0].to_be_bytes().as_str_unchecked() |
Comment on lines
-77
to
+103
| return { | ||
| name: this.functionDao.name, | ||
| args, | ||
| selector: FunctionSelector.fromNameAndParameters(this.functionDao.name, this.functionDao.parameters), | ||
| type: this.functionDao.functionType, | ||
| to: this.contractAddress, | ||
| isStatic: this.functionDao.isStatic, | ||
| returnTypes: this.functionDao.returnTypes, | ||
| }; | ||
| if (this.functionDao.functionType === FunctionType.PUBLIC) { | ||
| // Redirect through dispatch function. | ||
| const originalSelector = FunctionSelector.fromNameAndParameters( | ||
| this.functionDao.name, | ||
| this.functionDao.parameters, | ||
| ); | ||
| const dispatchSelector = FunctionSelector.fromSignature('public_dispatch(Field)'); | ||
| return { | ||
| name: this.functionDao.name, | ||
| args: [originalSelector.toField(), ...args], | ||
| selector: dispatchSelector, | ||
| type: this.functionDao.functionType, | ||
| to: this.contractAddress, | ||
| isStatic: this.functionDao.isStatic, | ||
| returnTypes: this.functionDao.returnTypes, | ||
| }; | ||
| } else { | ||
| return { | ||
| name: this.functionDao.name, | ||
| args, | ||
| selector: FunctionSelector.fromNameAndParameters(this.functionDao.name, this.functionDao.parameters), | ||
| type: this.functionDao.functionType, | ||
| to: this.contractAddress, | ||
| isStatic: this.functionDao.isStatic, | ||
| returnTypes: this.functionDao.returnTypes, | ||
| }; | ||
| } |
75deffc to
6f01fe5
Compare
12857e6 to
6eb5839
Compare
Contributor
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
718cd7c to
71b87ee
Compare
b7f1f4b to
f8b659b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Please read contributing guidelines and remove this line.