Skip to content
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(avm): fix SendL2ToL1Message implementation #4367

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('Accrued Substate', () => {

const journalState = journal.flush();
const expected = values.map(v => v.toFr());
expect(journalState.newLogs).toEqual([expected]);
expect(journalState.newL1Messages).toEqual([expected]);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class EmitUnencryptedLog extends Instruction {
}

export class SendL2ToL1Message extends Instruction {
static type: string = 'EMITUNENCRYPTEDLOG';
static type: string = 'SENDL2TOL1MSG';
static readonly opcode: Opcode = Opcode.SENDL2TOL1MSG;
// Informs (de)serialization. See Instruction.deserialize.
static readonly wireFormat = [OperandType.UINT8, OperandType.UINT8, OperandType.UINT32, OperandType.UINT32];
Expand All @@ -86,7 +86,7 @@ export class SendL2ToL1Message extends Instruction {
}

const msg = machineState.memory.getSlice(this.msgOffset, this.msgSize).map(f => f.toFr());
journal.writeLog(msg);
journal.writeL1Message(msg);

this.incrementPc(machineState);
}
Expand Down
Loading