-
Notifications
You must be signed in to change notification settings - Fork 303
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
feat: txe native world state #11226
base: master
Are you sure you want to change the base?
feat: txe native world state #11226
Conversation
22175df
to
60872a1
Compare
60872a1
to
ca367f4
Compare
await (this.typedOracle as TXE).addNullifiers(addressFromSingle(contractAddress), fromArray(nullifiers)); | ||
return toForeignCallResult([]); | ||
} | ||
// async addNullifiers(contractAddress: ForeignCallSingle, _length: ForeignCallSingle, nullifiers: ForeignCallArray) { |
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.
Unused?
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.
Yep !
); | ||
await this.txe.addPublicDataWrites([new PublicDataWrite(computePublicDataTreeLeafSlot(contract, slot), newValue)]); | ||
|
||
// await this.merkleDb.batchInsert( |
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.
Unused?
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.
➕
73bebfa
to
e91fd71
Compare
53eafb8
to
cd760ae
Compare
@@ -239,10 +261,14 @@ export class TXE implements TypedOracle { | |||
sideEffectsCounter = this.sideEffectCounter, | |||
isStaticCall = false, | |||
) { | |||
const db = await this.#getTreesAt(blockNumber); | |||
const previousBlockState = await this.#getTreesAt(blockNumber - 1); | |||
if (blockNumber >= this.blockNumber) { |
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.
Mmm, this is weird. Shouldn't we issue an error or something if someone tries to ask for stuff in the future?
header.state = await db.getStateReference(); | ||
header.globalVariables.blockNumber = new Fr(blockNumber); | ||
if (blockNumber === 1) { | ||
throw new Error('This is dickered'); |
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.
wait wat
cd760ae
to
57e5cf4
Compare
57e5cf4
to
d05b12d
Compare
Please see this PR. Decided to start fresh as there was a bunch of conflicts after coming back from hols.