Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
adraffy committed Oct 8, 2024
1 parent dd9f62c commit 408dbbc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
12 changes: 5 additions & 7 deletions contracts/GatewayFetcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ library GatewayFetcher {
// verifier execution is only constrainted by stack and gas
// max outputs = 255
// TODO: this could be configurable during constructor?
// memory use doesn't really matter during view construction
// however it does matter
uint256 constant MAX_OPS = 8192;

// thrown if limits above are exceeded
Expand Down Expand Up @@ -283,7 +281,7 @@ library GatewayFetcher {
}
function dup(
GatewayRequest memory r,
uint8 back
uint256 back
) internal pure returns (GatewayRequest memory) {
return r.push(back).addByte(OP_DUP);
}
Expand All @@ -294,7 +292,7 @@ library GatewayFetcher {
}
function swap(
GatewayRequest memory r,
uint8 back
uint256 back
) internal pure returns (GatewayRequest memory) {
return r.push(back).addByte(OP_SWAP);
}
Expand All @@ -306,13 +304,13 @@ library GatewayFetcher {

function pushStack(
GatewayRequest memory r,
uint8 i
uint256 i
) internal pure returns (GatewayRequest memory) {
return r.push(i).addByte(OP_PUSH_STACK);
}
function pushOutput(
GatewayRequest memory r,
uint8 i
uint256 i
) internal pure returns (GatewayRequest memory) {
return r.push(i).addByte(OP_PUSH_OUTPUT);
}
Expand Down Expand Up @@ -446,7 +444,7 @@ library GatewayFetcher {
function evalLoop(
GatewayRequest memory r,
uint8 flags,
uint8 back
uint256 back
) internal pure returns (GatewayRequest memory) {
return r.push(back).addByte(OP_EVAL_LOOP).addByte(flags);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/nitro/NitroVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract NitroVerifier is AbstractVerifier {
GatewayProof memory p = abi.decode(proof, (GatewayProof));
Node memory node = _rollup.getNode(p.nodeNum);
if (p.nodeNum != nodeNum1) {
// it wasn't want we requested
// it wasn't what we requested
Node memory node1 = _rollup.getNode(nodeNum1);
// check if node is between latest and our window
_checkWindow(node1.createdAtBlock, node.createdAtBlock);
Expand Down
2 changes: 1 addition & 1 deletion contracts/nitro/UnfinalizedNitroVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract UnfinalizedNitroVerifier is AbstractVerifier {
bytes32 confirmData = keccak256(
abi.encodePacked(keccak256(p.rlpEncodedBlock), p.sendRoot)
);
require(confirmData == node.confirmData, 'Nitro: confirmData');
require(confirmData == node.confirmData, 'UnfinalizedNitro: confirmData');
RLPReader.RLPItem[] memory v = RLPReader.readList(p.rlpEncodedBlock);
bytes32 stateRoot = RLPReaderExt.strictBytes32FromRLP(v[3]); // see: rlp.ts: encodeRlpBlock()
return
Expand Down
3 changes: 2 additions & 1 deletion scripts/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ import { Contract } from 'ethers/contract';
import { toUnpaddedHex } from '../src/utils.js';

// NOTE: you can use CCIPRewriter to test an existing setup against a local gateway!
// https://adraffy.github.io/ens-normalize.js/test/resolver.html#raffy.linea.eth.nb2hi4dthixs62dpnvss4ylooruxg5dvobuwiltdn5ws65lsm4xq.ccipr.eth
// [raffy] https://adraffy.github.io/ens-normalize.js/test/resolver.html#raffy.eth.nb2hi4dthixs62dpnvss4ylooruxg5dvobuwiltdn5ws62duoryc6.ccipr.eth
// 1. bun serve lineaV1
// 2. https://adraffy.github.io/CCIPRewriter.sol/test/
// 3. enter name: "raffy.linea.eth"
// 4. enter endpoint: "http://localhost:8000"
// 5. click (Resolve)
// 6. https://adraffy.github.io/ens-normalize.js/test/resolver.html#raffy.eth.nb2hi4b2f4xwy33dmfwgq33toq5dqmbqgaxq.ccipr.eth

let prefetch = false;
const args = process.argv.slice(2).filter((x) => {
Expand Down

0 comments on commit 408dbbc

Please sign in to comment.