Skip to content

Commit

Permalink
fix: address nits
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Jun 23, 2023
1 parent ebd8ad0 commit 339b4cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions l1-contracts/src/core/Rollup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract Rollup is IRollup {
* @param _l2Block - The L2Block data, formatted as outlined in `Decoder.sol`
*/
function process(bytes memory _proof, bytes calldata _l2Block) external override(IRollup) {
_constrainGlobals(_l2Block, VERSION);
_constrainGlobals(_l2Block);
(
uint256 l2BlockNumber,
bytes32 oldStateHash,
Expand Down Expand Up @@ -76,7 +76,7 @@ contract Rollup is IRollup {
emit L2BlockProcessed(l2BlockNumber);
}

function _constrainGlobals(bytes calldata _l2Block, uint256 _version) internal view {
function _constrainGlobals(bytes calldata _l2Block) internal view {
// @todo issue #830 Constrain timestamp

uint256 chainId;
Expand All @@ -91,8 +91,8 @@ contract Rollup is IRollup {
revert Errors.Rollup__InvalidChainId(chainId, block.chainid);
}

if (version != _version) {
revert Errors.Rollup__InvalidVersion(version, _version);
if (version != VERSION) {
revert Errors.Rollup__InvalidVersion(version, VERSION);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ export class AztecRPCServer implements AztecRPCClient {
throw new Error(`Public entrypoints are not allowed`);
}

// Is simulating it messing it up?
const tx = await account.simulateAndProve(authedTxRequest, undefined);
await this.db.addTx(new TxDao(await tx.getTxHash(), undefined, undefined, account.getAddress(), to, undefined, ''));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ describe('sequencer/solo_block_builder', () => {
describe('mock simulator', () => {
beforeEach(() => {
// Create instance to test
builder = new SoloBlockBuilder(builderDb, vks, simulator, prover, Fr.ZERO, Fr.ZERO);
builder = new SoloBlockBuilder(builderDb, vks, simulator, prover, chainId, version);
});

it('builds an L2 block using mock simulator', async () => {
Expand Down Expand Up @@ -293,7 +293,7 @@ describe('sequencer/solo_block_builder', () => {
beforeEach(async () => {
const simulator = await WasmRollupCircuitSimulator.new();
const prover = new EmptyRollupProver();
builder = new SoloBlockBuilder(builderDb, vks, simulator, prover, Fr.ZERO, Fr.ZERO);
builder = new SoloBlockBuilder(builderDb, vks, simulator, prover, chainId, version);
});

const makeContractDeployProcessedTx = async (seed = 0x1) => {
Expand Down Expand Up @@ -388,7 +388,7 @@ describe('sequencer/solo_block_builder', () => {
it('e2e_zk_token edge case regression test on nullifier values', async () => {
const simulator = await WasmRollupCircuitSimulator.new();
const prover = new EmptyRollupProver();
builder = new SoloBlockBuilder(builderDb, vks, simulator, prover, Fr.ZERO, Fr.ZERO);
builder = new SoloBlockBuilder(builderDb, vks, simulator, prover, chainId, version);
// update the starting tree
const updateVals = Array(16).fill(0n);
updateVals[0] = 19777494491628650244807463906174285795660759352776418619064841306523677458742n;
Expand Down

0 comments on commit 339b4cb

Please sign in to comment.