Skip to content

Commit

Permalink
update outdated content (#825)
Browse files Browse the repository at this point in the history
* update outdated content

* Update accounts.md

---------

Co-authored-by: darwintree <17946284+darwintree@users.noreply.github.com>
  • Loading branch information
Pana and darwintree authored Dec 20, 2024
1 parent f17b91e commit 17b70d2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
5 changes: 3 additions & 2 deletions docs/core/core-space-basics/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ curl --data '{"jsonrpc":"2.0","method":"cfx_getAccount","params":["cfx:type.cont

The global state of Conflux is composed of individual account states, each of which is an address-state pair (key pair).

A Conflux account state includes five parts:
A Conflux account state includes four parts:

- ```Basic state``` is the basic state of the account.
- ```Storage state``` is a key/value database or storage space that can be used to store custom states or data of smart contracts.
- ```Code information``` is the code information of the smart contract account. It includes the contract codes and the ```address``` of the account that paid the fee for the storage space occupied by the codes.
- ```Staking deposit list``` is the list of Staking operations of the accounts (it will be removed in the next Hardfork).
- ```Staking vote lock list``` is the list of lock operations performed by the account to participate in DAO voting.

> ```Staking deposit list``` is already **removed** in the v2.4.0 Hardfork, which is the list of Staking operations of the account.
The basic status of the account consists of eight fields as follows:

- ```Nonce``` is a counter to keep track of the number of transactions sent by an account. It is also used to ensure that each transaction can only be executed once. For contract accounts, this value indicates the number of ```contracts created by this contract```.
Expand Down
8 changes: 4 additions & 4 deletions docs/core/core-space-basics/vm-difference.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ The 1820 registry is a contract that stores the addresses of other contracts tha

## Opcode

* The `BLOCKHASH` opcode can only take `NUMBER-1` as input. (Unlike Ethereum, which takes any integer in `NUMBER-256` to `NUMBER-1` as input). This is the **only break opcode**.
Before v2.4.0 the `BLOCKHASH` opcode can only take `NUMBER-1` as input. (Unlike Ethereum, which takes any integer in `NUMBER-256` to `NUMBER-1` as input). Which means the Solidity built-in function `blockhash` can only take `block.number - 1` as input.

Which means the Solidity built-in function `blockhash` can only take `block.number - 1` as input.
After v2.4.0 it is fully compatible with Ethereum with an advanced input range up to 65536 blocks (implemented by [CIP-133](https://github.com/Conflux-Chain/CIPs/blob/master/CIPs/cip-133.md)).

## Block Gas Limit

The block gas limit is fixed at 30000000.
The block gas limit is 30 million before v2.4.0 and 60 million gas after v2.4.0.

## block.number

Expand All @@ -52,4 +52,4 @@ Core Space has some built-in [internal contracts](./internal-contracts/) that ar
## Gas

1. Gas used and refund: Conflux requires less gas in `SSTORE` operation but no longer refunds resetting storage and contract destruction.
2. Gas Fee Refund: In Ethereum, if a transaction's gas limit exceeds the actual gas cost, the remaining gas is fully refunded. In contrast, Conflux refunds a maximum of 1/4 of the **gas limit**. Setting an excessively high gas limit in Conflux can lead to additional transaction fee costs. However, no extra fees are incurred if the gas limit is set to less than 4/3 of the actual cost. Therefore, providing an accurate gas estimate for a transaction is crucial for optimizing transaction fees.
2. Gas Fee Refund: In Ethereum, if a transaction's gas limit exceeds the actual gas cost, the remaining gas is fully refunded. In contrast, Conflux refunds a **maximum of 1/4** of the **gas limit**. Setting an excessively high gas limit in Conflux can lead to additional transaction fee costs. However, no extra fees are incurred if the gas limit is set to less than 4/3 of the actual cost. Therefore, providing an accurate gas estimate for a transaction is crucial for optimizing transaction fees.
20 changes: 10 additions & 10 deletions docs/espace/build/evm-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Contract max code size is `49152` double as Ethereum

## Transaction Gas limit

Only the block whose block height is a multiple of `5` can pack Ethereum type transaction. The total gas limit of these transaction cannot exceed half of the block gas limit (15,000,000).
Only blocks whose height is a multiple of `5` can include Ethereum-type transactions. The total gas limit of these transactions cannot exceed half of the block gas limit, which is 15 million gas before v2.4.0 and 30 million gas after v2.4.0.

## EVM Precompiles

Expand All @@ -79,15 +79,15 @@ All standard precompiles are supported.

Address | ID | Name | Spec | Status | Version
------- | ----------- | ------------------------------------ | -------------- | ------ |------
0x01 | `ECRecover` | ECDSA public key recovery | [Yellow Paper] | ✅ |
0x02 | `SHA256` | SHA-2 256-bit hash function | [Yellow Paper] | ✅ |
0x03 | `RIPEMD160` | RIPEMD 160-bit hash function | [Yellow Paper] | ✅ |
0x04 | `Identity` | Identity function | [Yellow Paper] | ✅ |
0x05 | `ModExp` | Big integer modular exponentiation | [EIP-198] | ✅ |
0x06 | `BN128Add` | Elliptic curve addition | [EIP-196] | ✅ |
0x07 | `BN128Mul` | Elliptic curve scalar multiplication | [EIP-196] | ✅ |
0x08 | `BN128Pair` | Elliptic curve pairing check | [EIP-197] | ✅ |
0x09 | `Blake2F` | BLAKE2b `F` compression function | [EIP-152] | ✅ |
0x01 | `ECRecover` | ECDSA public key recovery | [Yellow Paper] | ✅ |
0x02 | `SHA256` | SHA-2 256-bit hash function | [Yellow Paper] | ✅ |
0x03 | `RIPEMD160` | RIPEMD 160-bit hash function | [Yellow Paper] | ✅ |
0x04 | `Identity` | Identity function | [Yellow Paper] | ✅ |
0x05 | `ModExp` | Big integer modular exponentiation | [EIP-198] | ✅ |
0x06 | `BN128Add` | Elliptic curve addition | [EIP-196] | ✅ |
0x07 | `BN128Mul` | Elliptic curve scalar multiplication | [EIP-196] | ✅ |
0x08 | `BN128Pair` | Elliptic curve pairing check | [EIP-197] | ✅ |
0x09 | `Blake2F` | BLAKE2b `F` compression function | [EIP-152] | ✅ |
0x0a | `PointEvaluation`| Verify p(z) = y given commitment that corresponds to the polynomial p(x) and a KZG proof| [EIP-4844] | ✅ | V2.4.0

[Yellow Paper]: https://ethereum.github.io/yellowpaper/paper.pdf
Expand Down
1 change: 1 addition & 0 deletions docs/espace/build/jsonrpc-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import TabItem from '@theme/TabItem';
| debug_traceTransaction || Supported at v2.4.0 |
| debug_traceBlockByHash || Supported at v2.4.0 |
| debug_traceBlockByNumber || Supported at v2.4.0 |
| debug_traceCall || Supported at v2.4.1 |
| net_listening || |
| net_peerCount || |
| eth_compileLLL || |
Expand Down

0 comments on commit 17b70d2

Please sign in to comment.