package
0.0.0-20230803065340-eb934a0893fc
Repository: https://github.com/sliceledger-blockchain/slice-ledger.git
Documentation: pkg.go.dev

# README

mipsevm

Supported 55 instructions:

'addi', 'addiu', 'addu', 'and', 'andi',
'b', 'beq', 'beqz', 'bgez', 'bgtz', 'blez', 'bltz', 'bne', 'bnez',
'clz', 'divu',
'j', 'jal', 'jalr', 'jr',
'lb', 'lbu', 'lui', 'lw', 'lwr',
'mfhi', 'mflo', 'move', 'movn', 'movz', 'mtlo', 'mul', 'multu',
'negu', 'nop', 'not', 'or', 'ori',
'sb', 'sll', 'sllv', 'slt', 'slti', 'sltiu', 'sltu', 'sra', 'srl', 'srlv', 'subu', 'sw', 'swr', 'sync', 'syscall',
'xor', 'xori'

To run:

  1. Load a program into a state, e.g. using LoadELF.
  2. Patch the program if necessary: e.g. using PatchGo for Go programs, PatchStack for empty initial stack, etc.
  3. Implement the PreimageOracle interface
  4. Instrument the emulator with the state, and pre-image oracle, using NewInstrumentedState
  5. Step through the instrumented state with Step(proof), where proof==true if witness data should be generated. Steps are faster with proof==false.
  6. Optionally repeat the step on-chain by calling MIPS.sol and PreimageOracle.sol, using the above witness data.

# Functions

No description provided by the author
No description provided by the author
LoadContracts loads the Cannon contracts, from op-bindings package.
LoadContractsFromFiles loads the Cannon contracts, from local filesystem.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
No description provided by the author
No description provided by the author
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LoggingWriter is a simple util to wrap a logger, and expose an io Writer interface, for the program running within the VM to write to.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

HexU32 to lazy-format integer attributes for logging.
No description provided by the author