Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
5e998b27
Unverified
Commit
5e998b27
authored
Aug 10, 2023
by
inphi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting; assertEq
parent
28046fb1
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
96 deletions
+96
-96
CommonTest.t.sol
packages/contracts-bedrock/test/CommonTest.t.sol
+12
-20
MIPS.t.sol
packages/contracts-bedrock/test/MIPS.t.sol
+84
-76
No files found.
packages/contracts-bedrock/test/CommonTest.t.sol
View file @
5e998b27
...
@@ -679,31 +679,26 @@ contract FFIInterface is Test {
...
@@ -679,31 +679,26 @@ contract FFIInterface is Test {
return abi.decode(vm.ffi(cmds), (bytes32, bytes, bytes, bytes[]));
return abi.decode(vm.ffi(cmds), (bytes32, bytes, bytes, bytes[]));
}
}
function getCannonMemoryProof(uint32 pc, uint32 insn)
function getCannonMemoryProof(uint32 pc, uint32 insn) external returns (bytes32, bytes memory) {
external
returns (
bytes32,
bytes memory
) {
string[] memory cmds = new string[](4);
string[] memory cmds = new string[](4);
cmds[0] = "scripts/differential-testing/differential-testing";
cmds[0] = "scripts/differential-testing/differential-testing";
cmds[1] = "cannonMemoryProof";
cmds[1] = "cannonMemoryProof";
cmds[2] = vm.toString(pc);
cmds[2] = vm.toString(pc);
cmds[3] = vm.toString(insn);
cmds[3] = vm.toString(insn);
bytes memory result = vm.ffi(cmds);
bytes memory result = vm.ffi(cmds);
(
(bytes32 memRoot, bytes memory proof) = abi.decode(result, (bytes32, bytes));
bytes32 memRoot,
bytes memory proof
) = abi.decode(result, (bytes32, bytes));
return (memRoot, proof);
return (memRoot, proof);
}
}
function getCannonMemoryProof(uint32 pc, uint32 insn, uint32 memAddr, uint32 memVal)
function getCannonMemoryProof(
uint32 pc,
uint32 insn,
uint32 memAddr,
uint32 memVal
)
external
external
returns (
returns (bytes32, bytes memory)
bytes32,
{
bytes memory
) {
string[] memory cmds = new string[](6);
string[] memory cmds = new string[](6);
cmds[0] = "scripts/differential-testing/differential-testing";
cmds[0] = "scripts/differential-testing/differential-testing";
cmds[1] = "cannonMemoryProof";
cmds[1] = "cannonMemoryProof";
...
@@ -712,10 +707,7 @@ contract FFIInterface is Test {
...
@@ -712,10 +707,7 @@ contract FFIInterface is Test {
cmds[4] = vm.toString(memAddr);
cmds[4] = vm.toString(memAddr);
cmds[5] = vm.toString(memVal);
cmds[5] = vm.toString(memVal);
bytes memory result = vm.ffi(cmds);
bytes memory result = vm.ffi(cmds);
(
(bytes32 memRoot, bytes memory proof) = abi.decode(result, (bytes32, bytes));
bytes32 memRoot,
bytes memory proof
) = abi.decode(result, (bytes32, bytes));
return (memRoot, proof);
return (memRoot, proof);
}
}
}
}
...
...
packages/contracts-bedrock/test/MIPS.t.sol
View file @
5e998b27
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment