This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name | Effect | Description | Difficulty | |
---|---|---|---|---|
Snap sync, partial syncing | 30% reduction in hardware requirements | Improve sync time by snap syncing and partially syncing. | 2 | |
Basket of EVM improvements | 50% reduction in hardware requirements | - https://github.com/ledgerwatch/erigon/wiki/TEVM---Transpiled-EVM:-accelerate-EVM-improvement-R&D,-but-learning-from-eWASM - https://github.com/ethereum/evmone - https://eips.ethereum.org/EIPS/eip-2929 | 5 | |
16 core, 32 vthread EVM parallelism | 32x reduction in hardware requirements | Require all transactions in a block to have non-intersecting access lists. Scale gas_limit * n where n is the number of cores available to a verifier. | 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name | Effect | Difficulty | |
---|---|---|---|
eth2 phase 1 initial rollout | 95% L1 gas cost reduction | 15 | |
Later phases...... | Who knows! | Who knows! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name | Effect | Difficulty | |
---|---|---|---|
Zero byte transaction compression | 10% L1 gas cost reduction and 2% L2 gas cost increase | 1 | |
Lookup table compression | 15% L1 gas cost reduction and 2% L1 gas cost increase | 2 | |
Aggregate Transactions | 20% L1 gas cost reduction and 1% L1 gas cost increase | 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ethers } from 'hardhat' | |
import { smockit } from '@eth-optimism/smock' | |
const MyContractFactory = await ethers.getContractFactory('MyContract') | |
// Smockit! | |
const MyMockContract = await smockit(MyContractFactory) | |
MyMockContract.myFunction.will.return.with('Some return value!') | |
console.log(await MyMockContract.myFunction()) // 'Some return value!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.4.22 <0.6.0; | |
contract SimpleConstants { | |
bytes32 public constant A = 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA; | |
bytes public constant B = hex"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; | |
bytes public constant C = hex"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; | |
function getA() public pure returns(bytes32) { | |
return(A); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OwnershipDeprecationWitness: | |
def __init__(self, next_state_update, signature, inclusion_witness): | |
self.next_state_update = next_state_update | |
self.signature = signature | |
self.inclusion_witness = inclusion_witness | |
class OwnershipPredicate: | |
def __init__(self, parent_plasma_contract): | |
self.parent = parent_plasma_contract |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OwnershipRevocationWitness: | |
def __init__(self, next_state_commitment, signature, inclusion_witness): | |
self.next_state_commitment = next_state_commitment | |
self.signature = signature | |
self.inclusion_witness = inclusion_witness | |
class OwnershipPredicate: | |
dispute_duration = 10 | |
def __init__(self, parent_settlement_contract): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function canClaim(commitment: commitment, claimabilityWitness: bytes): | |
return tx.sender == commitment.state.parameters.owner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function claimRedeemed(redeemedClaim: claim): | |
#length of sequential stateIDs claimed = start - end | |
redeemedAmount: uint = redeemedClaim.end - redeemedClaim.start | |
ERC20.transferFrom(self.address, redeemedClaim.state.owner, redeemedAmount) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public isRevoked(stateID: uint, commitment: commitment, revocationWitness: bytes): | |
assert wasCommitted( | |
... revocationWitness.newCommitment, revocationWitness.newCommitmentWitness) | |
assert verifySignature( | |
... revocationWitness.newCommitment) = commitment.state.owner |
NewerOlder