Skip to content

Commit

Permalink
add protocol differences (#8284)
Browse files Browse the repository at this point in the history
* add protocol differences

* update to relative links
  • Loading branch information
critesjosh authored and yorhodes committed Aug 11, 2021
1 parent 59b32f3 commit 9f201a9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/docs/developer-resources/celo-for-eth-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,24 @@ Celo runs the EVM which means that smart contracts written for Ethereum can easi
[This tutorial](./walkthroughs/hellocontracts.md) goes over how to start an ultralight node that runs locally and use it to deploy a contract to the Alfajores testnet using Truffle.

[This tutorial](./walkthroughs/hello-contract-remote-node.md) goes over how to connect to a remote node and use ContractKit to deploy a contract to Alfajores using Truffle.

## Protocol Differences

### OPCODES & Block headers

Celo does not support the `DIFFICULTY` or `GASLIMIT` opcodes. These fields are also absent from Celo block headers.

### Precompiled Contracts

Celo includes all of the precompiled contracts in Ethereum, but also adds additional contracts. [Here](https://github.com/celo-org/celo-blockchain/blob/v1.3.2/core/vm/contracts.go#L157) is the list of Celo precompiled contracts as of Celo version 1.3.2. You can find the latest updates by selecting the most recent release tag.

### Core Contract Calls

The blockchain client makes some core contract calls at the end of a block, outside of transactions. Many are done on epoch blocks ([epoch rewards](../celo-codebase/protocol/proof-of-stake/epoch-rewards.md), [validator elections](../celo-codebase/protocol/proof-of-stake/validator-elections.md), etc.), but not all. For example, the [gas price minimum](../celo-codebase/protocol/transactions/gas-pricing.md) update can happen on any block.
Logs created by these contract changes are included in a single additional receipt in that block, which references the block hash as its transaction hash, even though there is no transaction with this hash. If no logs were created by such calls in that block, no receipt is added.

### Node management APIs

Celo nodes have a slightly different RPC interface than geth nodes. There are some additional RPC endpoints to help validators manage their nodes, they can be found [here](../validator-guide/proxy.md#rpc-api) and [here](../validator-guide/node-upgrades.md#hotswapping-validator-nodes).

You can find the full list of RPC API endpoints in [this file](https://github.com/celo-org/celo-blockchain/blob/master/internal/web3ext/web3ext.go).

0 comments on commit 9f201a9

Please sign in to comment.