github.com/MetalBlockchain/subnet-evm@v0.4.9/README.md (about)

     1  # Subnet EVM
     2  
     3  Metal is a network composed of multiple blockchains.
     4  Each blockchain is an instance of a Virtual Machine (VM), much like an object in an object-oriented language is an instance of a class.
     5  That is, the VM defines the behavior of the blockchain.
     6  
     7  Subnet EVM is the Virtual Machine (VM) that defines the Subnet Contract Chains. Subnet EVM is a simplified version of [Coreth VM (C-Chain)](https://github.com/MetalBlockchain/coreth).
     8  
     9  This chain implements the Ethereum Virtual Machine and supports Solidity smart contracts as well as most other Ethereum client functionality.
    10  
    11  ## Building
    12  
    13  The Subnet EVM runs in a separate process from the main MetalGo process and communicates with it over a local gRPC connection.
    14  
    15  ## API
    16  
    17  The Subnet EVM supports the following API namespaces:
    18  
    19  - `eth`
    20  - `personal`
    21  - `txpool`
    22  - `debug`
    23  
    24  Only the `eth` namespace is enabled by default.
    25  
    26  ## Compatibility
    27  
    28  The Subnet EVM is compatible with almost all Ethereum tooling, including Remix, Metamask and Truffle.
    29  
    30  ## Differences Between Subnet EVM and Coreth
    31  
    32  - Added configurable fees and gas limits in genesis
    33  - Merged Metal hardforks into the single "Subnet EVM" hardfork
    34  - Removed Atomic Txs and Shared Memory
    35  - Removed Multicoin Contract and State
    36  
    37  ## Block Format
    38  
    39  To support these changes, there have been a number of changes to the SubnetEVM block format compared to what exists on the C-Chain and Ethereum. Here we list the changes to the block format as compared to Ethereum.
    40  
    41  ### Block Header
    42  
    43  - `BaseFee`: Added by EIP-1559 to represent the base fee of the block (present in Ethereum as of EIP-1559)
    44  - `BlockGasCost`: surcharge for producing a block faster than the target rate
    45  
    46  ## Create an EVM Subnet on a Local Network
    47  
    48  ### Clone Subnet-evm
    49  
    50  First install Go 1.18.1 or later. Follow the instructions [here](https://golang.org/doc/install). You can verify by running `go version`.
    51  
    52  Set `$GOPATH` environment variable properly for Go to look for Go Workspaces. Please read [this](https://go.dev/doc/gopath_code) for details. You can verify by running `echo $GOPATH`.
    53  
    54  As a few software will be installed into `$GOPATH/bin`, please make sure that `$GOPATH/bin` is in your `$PATH`, otherwise, you may get error running the commands below.
    55  
    56  Download the `subnet-evm` repository into your `$GOPATH`:
    57  
    58  ```sh
    59  cd $GOPATH
    60  mkdir -p src/github.com/!metal!blockchain
    61  cd src/github.com/\!metal\!blockchain
    62  git clone git@github.com:MetalBlockchain/subnet-evm.git
    63  cd subnet-evm
    64  ```
    65  
    66  This will clone and checkout to `master` branch.
    67  
    68  ### Run Local Network
    69  
    70  To run a local network, it is recommended to use the [metal-cli](https://github.com/MetalBlockchain/metal-cli) to set up an instance of Subnet-EVM on a local Metal Network.