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
d4d32e77
Commit
d4d32e77
authored
Dec 08, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix comments, remove console.log
parent
eb409712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
MIPSMemory.sol
contracts/MIPSMemory.sol
+2
-4
No files found.
contracts/MIPSMemory.sol
View file @
d4d32e77
...
@@ -58,8 +58,8 @@ contract MIPSMemory {
...
@@ -58,8 +58,8 @@ contract MIPSMemory {
largePreimage[msg.sender].len = 0;
largePreimage[msg.sender].len = 0;
}
}
//
TODO:
input 136 bytes, as many times as you'd like
// input 136 bytes, as many times as you'd like
// Uses about
1M gas, 7352
gas/byte
// Uses about
500k gas, 3435
gas/byte
function AddLargePreimageUpdate(bytes calldata dat) public {
function AddLargePreimageUpdate(bytes calldata dat) public {
require(dat.length == 136, "update must be in multiples of 136");
require(dat.length == 136, "update must be in multiples of 136");
// sha3_process_block
// sha3_process_block
...
@@ -83,8 +83,6 @@ contract MIPSMemory {
...
@@ -83,8 +83,6 @@ contract MIPSMemory {
Lib_Keccak256.CTX memory c;
Lib_Keccak256.CTX memory c;
c.A = largePreimageState[msg.sender];
c.A = largePreimageState[msg.sender];
console.log(idat.length);
bytes memory dat = new bytes(136);
bytes memory dat = new bytes(136);
for (uint i = 0; i < idat.length; i++) {
for (uint i = 0; i < idat.length; i++) {
dat[i] = idat[i];
dat[i] = idat[i];
...
...
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