package
1.2.0
Repository: https://github.com/meterio/meter-pov.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

Blake2b computes blake2b-256 checksum for given data.
BytesToAddress converts bytes slice into address.
BytesToBytes32 converts bytes slice into Bytes32.
CreateContractAddress to generate contract address according to tx id, clause index and contract creation count.
to compatible with ethereum contract creation count.
CreateAddress2 creates an ethereum address given the address bytes, initial contract code hash and a salt.
GetForkConfig get fork config for given genesis ID.
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MustParseAddress convert string presented address into Address type, panic on error.
MustParseBytes32 convert string presented into Bytes32 type, panic on error.
NewBlake2b return blake2b-256 hash.
ParseAddress convert string presented address into Address type.
ParseBytes32 convert string presented into Bytes32 type.

# Constants

AddressLength length of address in bytes.
total base of 400M MTRG.
yoy 5%, in unit of wei (aka.
21000.
time interval between two consecutive blocks.
Constants of block chain.
Constants of block chain.
Fork Release Version Edision: The initial Basic Release.
Fork Release Version Edision: The initial Basic Release.
around 11/18/2020.
Fork Release Version Edision: The initial Basic Release.
from ethereum.
EIP158 gas table.
InitialGasLimit gas limit value int genesis block.
wrong LastKBlockHeight.
0x52 for mainnet.
Constants of block chain.
Constants of block chain.
Constants of block chain.
pack reward tx with maxinum 200 clauses.
if too many pow blocks need to be packed in kblock, truncate to the last 3000 pow blocks.
(unit: block) if tx delay exceeds this value, no energy can be exchanged.
InitialGasLimit was 10 *1000 *100, only accommodates 476 Txs, block size 61k, so change to 200M.
--------------------- Epoch --------------------------.
Constants of block chain.
Constants of block chain.
smooth with n days, the (last n days's total received MTR) * 1/n will be used as the validator reward for current day.
hard fork from 10 to 1.
every n Epoch move to next auction.
Constants of block chain.
epoch time (normaly 1 pow block takes 1 minutes).
M10 spec 1500W, 25THpython -c "print 2**32 * 1.5 /120/25/1000/1000/1000/1000/10/30 * 1e18".
mainnet effeciency set as 0.053python -c "print 2**32 * 0.053 /120/1000/1000/1000/1000/10/30 * 1e18".
This ceof is based s9 ant miner, 1.323Kw 13.5T hashrate coef 11691855416.9 unit 1e18python -c "print 2**32 * 1.323 /120/13.5/1000/1000/1000/1000/10/30 * 1e18".
powpool coef.
powpool coef.
efficiency w/hash python -c "print 1.323/13.5" = 0.098.
EIP158 gas table.
Constants of block chain.
Constants of block chain.
Tesla: The staking/auction release, Features include:.
Tesla 1.1 Hardfork includes feature updates: 1)bucket update issue fix, bound balance before update bucket 2) allow update for forever bucket 2) correct wrong buckets in Tesla 1.0 due to bucket update issue 3) account lock fix, allow transfer only if (amount + lockedMTRG) < (balance + boundbalance), fix includes native transfer and system contract ERC20 transfer 4)update (total votes / self vote) limit from 10x to 100x.
around 4/16/2021 11:00 AM (Beijing).
around 4/16/2021 11:00 AM (Beijing).
Tesla 1.3 Hardfork includes feature updates: 1) evm upgrade from v1.18.10 to v1.18.14 2) istanbul porting from vechain 3) aggregate autobid 4) fix the contract address issue: if caller is external, use tx nonce + clauseIndex otherwise, caller is internal, use global counter as entropy 5) fix the empty chainid issue.
around 8/24/2021 10:00 AM (Beijing).
4220000.
around 9/1/2021 9:30 AM (Beijing).
Tesla 1.4 Hardfork includes feature updates: 1) contract address schema update, after tesla fork4, contract created by external account should use meter-specific address scheme for created contract: keccak256(txID, clauseIndex, counter) 2) fixed the sync failure at 10963576 (negative total stake balance for stakeholder, should snap to 0 once negative) 3) fixed the sync failure at 13931713 (use caller for contract address creation, should use origin).
Tesla hard fork around 03/22/2021 08:00-09:00 (Beijing Time).
.
0x53 for testnet.
Fork Release Version Edision: The initial Basic Release.
the indicator to adjust target block gas limit.
Constants of block chain.

# Variables

Keys of governance params.
BlocktChainConfig is the chain parameters to run a node on the main network.
start block number support sys-contract.
Genesis hashes to enforce below configs on.
auction reward initial release, is 1000.
1 MTRG settle with 0.5 MTR.
each tx gas is about 0.01 meter.
bowrrower interest rate, initial set as 10%.
consensus committee size, is set to 50.
consensus delegate size, is set to 100.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
The Following Accounts are defined for DFL Community.
minimium require for delegate is 300 mtrg.
coef start with Main.
fade day initial is 550 days.
fade rate initial with 0.5.
Keys of governance params.
30%.
base reward for each validator 0.25.
40% percent of total auciton gain.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
unset or 0 is not do yet, 1 is donw.
Keys.
Keys of governance params.
mtr-erc20, 0x00000000000000006e61746976652d6d74722d65726332302d61646472657373.
mtrg-erc20, 0x000000000000006e61746976652d6d7472672d65726332302d61646472657373.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
Keys of governance params.
0x00000000000000312d73797374656d2d636f6e74726163742d61646472657373.
0x00000000000000322d73797374656d2d636f6e74726163742d61646472657373.
0x00000000000000332d73797374656d2d636f6e74726163742d61646472657373.
0x00000000000000342d73797374656d2d636f6e74726163742d61646472657373.
key set transaction fee address 0x6e73616374696f6e2d6665652d62656e65666963696172792d61646472657373.
Keys of governance params.
Keys of governance params.
NoFork a special config without any forks.
start block number support sys-contract.
start block number support sys-contract.
start block number support sys-contract.
start block number support sys-contract.
start block number support sys-contract.
Keys of governance params.
This account takes 40% of auction gain to distribute to validators in consensus 0x61746f722d62656e656669742d61646472657373.
Keys of governance params.

# Structs

No description provided by the author
ForkConfig config for a fork.

# Type aliases

Address address of account.
Bytes32 array of 32 bytes.