-
Notifications
You must be signed in to change notification settings - Fork 291
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
fix: replace force insert in TS #643
Conversation
6922b36
to
19850ab
Compare
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.
Overall changes look good, have some minor comments. Mainly around the 0x${string}
casting stuff. I think we can solve it somewhat with the toString method on Fr
// getting the 32 byte hex string representation of the content | ||
const contentString: `0x{String}` = `0x${content.toBuffer().toString('hex')}` as `0x{String}`; | ||
// Using the 0 value for the secretHash. | ||
const zeroString: `0x{String}` = `0x${fr(0).toBuffer().toString('hex')}` as `0x{String}`; |
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.
fr(0) -> Fr.ZERO
Also rename var to secretHash
?
}; | ||
|
||
it(`Build ${numberOfConsecutiveBlocks} blocks of 4 bloated txs building on each other`, async () => { | ||
const stateInRollup_ = await rollup.read.rollupStateHash(); | ||
expect(hexStringToBuffer(stateInRollup_.toString())).toEqual(Buffer.alloc(32, 0)); | ||
|
||
const blockNumber = await publicClient.getBlockNumber(); | ||
const recipientAddress = AztecAddress.fromString( | ||
'0x1647b194c649f5dd01d7c832f89b0f496043c9150797923ea89e93d5ac619a93', |
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.
where is this from? maybe leave a comment?
expect(inboxLogs).toHaveLength(l1ToL2Messages.length * (i + 1)); | ||
for (let j = 0; j < NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP; j++) { | ||
const event = inboxLogs[j + i * NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP].args; | ||
expect(event.content).toEqual(`0x${l1ToL2Content[j].toBuffer().toString('hex')}`); |
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.
Interesting i would expect .toString('hex')
to automatically add 0x
9de5254
to
d756d1f
Compare
Description
Fixes #613 and #630.
typescript
implementation of force insertion into inboxsolidity
implementation of force insertion into inboxChecklist: