Giter Site home page Giter Site logo

agoramainnet's People

Contributors

hewison-chris avatar michaelkim20 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

agoramainnet's Issues

Building Scope of Agora Mainnet

Development

  • Changing the amount of staking required to operate the validator from 32 to 40,000 (based on the white paper)
    #7
  • Modifying the functionality given block creation reward to validator (based on white paper)
    #4
  • Adding the ability to issue commons budget
    #6
  • Complement the transaction fee handling function
    #5

What to study
We plan to implement the function of congress voting using smart contracts.

Is there a function to check if the voter is a validator in the smart contract code?(Votera)

The construction of infrastructure

Documentation
Korean, English and Chinese support
https://ethereum.org/en/developers/
https://geth.ethereum.org/
https://docs.prylabs.network/

Booting the network
Create a detailed Mainnet boot plan document.
Plans to increase the number of nodes,, stabilization measures, timing of public participation, and a variety of ways to become a validator

Update Prysm client to pay block fees to validators and Commons Budget as defined in Bosagora whitepaper.

Ethereum burns transaction fees when creating blocks.
Here's what the White Paper on BOSAGORA says.

Transaction Fee: Transaction fees are adjusted flexibly (see Appendix 3). Congress Nodes receive 70%
of the collected transactions fee in a block, and 30% is sent to the Commons Budget. Transaction fees can be
adjusted through the Congress. 

But I don't think it's going to be easy to calculate this.
So I want to implement all of this as a Common's Budget receiving. And we'll have to revise the white paper.

The Beacon chain has a number of implementations.
We use prysm.
https://github.com/zeroone-boa/prysm

The deposit contract should be customized for Bosagora

If 40K Boa is the required accumulated deposit to become a validator then the minimum for each deposit should be high enough to keep the number of required deposits to at most 32. For example, If the minimum deposit is made to be 2K Boa then at most 20 deposits will be required.
Also the contract should not include values in ether. Better to use gwei which is 1/1_000_000_000 BOA.

Boot the Beacon chain

To configure a beacon chain using one node

  • Deploy deposit contract
  • Stake
  • Change the config
  • Documentation

To configure a beacon chain using multi node

  • To study about ENR
  • Documentation

Deploy smart contract for Commons Budget to existing Biznet POA chain.

Before adding the Beacon chain to the Biznet chain the Commons Budget Smart contract should be deployed. The address of this contract then needs to be hardcoded in the client code configuration parameters to create a hard fork. This will enable the funding of the Commons Budget to occur once the Beacon chain is started.

  • Added to local-testnet setup
  • Tested in AWS test environment

Add Beacon chain, explorer, staking launchpad and staking client to BizNet AWS Dev net

To enable dev team and marketing team to access the beacon layer tools we need to setup the environment in AWS BizNet DevNet.
This will enable:

  1. E2E testing of adding new validators and monitoring the rewards etc.
  2. Creating user guides and updating marketing info in pages

Instructions on how to use this network should be documented and shared in slack.

Rebase Agora Prysm branch on upstream v2.1.4

Thanks to @mkykadir for spotting this in Prysm Discord channel:


Node operators and validators are highly encouraged to upgrade to release v2.1.4.

Many bug fixes and improvements have been included in this release. v3 will contain some breaking changes, and will be released within the next few weeks. Using v2.1.4 in the meantime will give you access to a more streamlined user experience. See our documentation to learn how to use v2.1.4 to run a Merge-ready configuration on the Goerli-Prater network pair here https://docs.prylabs.network/docs/vNext/214-rc

Some high-level changes are
- Sepolia testnet configs --sepolia
- Goerli as an alias to Prater and testnet configs --prater or --goerli 
- Fee recipient API for key manager
- YAML config flag support for web3 signer
- Validator registration API for web3 signer
- Flashbots MEV boost support
- Store blind block (i.e block with payload header) instead of full block (i.e. block with payload) for storage efficiency (currently only available when the enable-only-blinded-beacon-blocks feature flag is enabled)
- New Web v2.0 release into Prysm #11007```

Revise the technical content of the White Paper

Modify the technical content of the white paper
The White Paper states that SCP will be used to implement key content.
It explains the introduction and background of the Ethereum Beacon Chain.

Are the current values in the Bosagora Whitepaper for tokenomics sensible?

Are the current values in the Bosagora Whitepaper for tokenomics sensible?

This shows the number of validators possible and the return on investment depending what percentage is staked:

rewards year 1 170,294,400    
       
Initial supply 450,000,000    
       
Stake per validator 40,000.00    
       
% staked staked Number of validators APR
100% 450000000 11,250 37.8432
75% 337500000 8,438 50.4576
50% 225000000 5,625 75.6864
25% 112500000 2,813 151.3728
10% 45000000 1,125 378.432
5% 22500000 563 756.864
1% 4500000 113 3784.32

What is the desired % staked and how many validators do we need to be secure?

Originally posted by @hewison-chris in #30

Include a Prysm client with slashing enabled

See here for a description of how including at least one slasher node will help protect the network safety.

Install it on the network below and document how to install it.

  • PrivateNet
  • DevNet
  • Documentation

Write a white paper on Biznet

The white paper should specifically describe the background of the introduction, design principles, coin issuance plan, swapping method with existing BOA, block creation rewards, and transaction fees.

How should we determine the block creation period?

The Ethereum mainnet has a block creation period of 14 seconds.
And the beacon chain is 12 seconds. There's a two-second difference.

This part is different from our white paper, but I want to follow the Ethereum setting.
Because it might think that they use the most optimal value.

But here's one question.
We need to determine the amount of occurrence per block when Rewards and Commons Budgets are issued
Should we set the block creation period to 12 seconds or 14 seconds?
This changes the amount of rewards and commons budgets to be issued per block.

Rebase our client code on updated upstream projects

We are currently not using the latest updates so we should pull these changes into our client code.
go-ethereum : v1.10.23
prysm : v3.1.0

First we can test in local-testnet and then if ok update agora branches.

Let's not allow Biznet's transaction fees to be incinerated

BizNet is used as a POA.
POA has no reward. Therefore, the fee for the transaction used is no different than being incinerated.
Therefore, we will have to transfer fees for transactions that are incinerated at each block creation to a specific address in order to preserve Circulating Supply.
Why don't we make that address a common budget?
When Agora Mainnet opens, we will transfer the funds to the address of the real Commons Budget.

Add tests to the local-testnet to create transactions and assert correct behavior

To ensure that transactions are handled correctly and fees are paid to Commons Budget and Validators as expected we need some tests.
Some basic tests to start with

  • Transactions are added to the block and BOA account balances are updated correctly when money is transfered
  • 30% Transaction fees are paid to the Commons Budget
  • 70% Transaction fees are paid to the chosen Block proposing Validator

If problems are found then we may have more development work still to do on the explorer and client code.

Research and Report on ETH2.0 Key and ETH2.0 Wallet

https://kb.beaconcha.in/ethereum-2-keys
ETH2 has two keys. The validator key and the withdrawal key. It uses BLS(https://en.wikipedia.org/wiki/Boneh%E2%80%93Lynn%E2%80%93Shacham).
Yesterday, @TrustHenry did some research on the ETH2 key .
In addition, if the withdrawal key and validator key, the withdrawal key and the ETH1 address, the wallet that can be used when withdrawing funds with withdrawal key when Shanghai fork is completed, and these are not ready, we should recommend registering the withdrawal key as ETH1.
If the wallet supporting the key of ETH2.0 cannot be provided, we will have to make sure that the ETH1.0 address is registered with the withdrawal key when generating the validation key.

https://kb.beaconcha.in/ethereum-2-keys
ETH2는 두개의 키가 존재한다. 검증자키와 인출키이다. 이것의 BLS 를 사용한다.
어제 @TrustHenry ETH2 키에 대한 여러가지 조사를 했다.
부가해서 인출키와 검증자키와의 관계, 인출키와 ETH1주소와의 관계, 상하이포크가 완료되었을 때, 인출키로 자금을 인출했을 때, 사용될 수 있는 지갑, 이런것들이 준비되지 못할 경우 우리는 인출키를 등록할 때, ETH1으로 등록하도록 권고해야 할 것이다.
만약 ETH2.0의 키를 지원하는 지갑이 제공할 수 없다면 우리는 검증자키를 생성할 때, 인출키로 ETH1.0주소가 반드시 등록될 수 있도록 하여야 할 것입니다.

Enable block rewards to validators as defined in Bosagora whitepaper.

This is what the White Paper says. Modify this feature according to the white paper.

Confirmation rewards are financial rewards issued and evenly distributed
to the nodes for every confirmed block. As the reward is distributed evenly, if the number of nodes
increases the probability that a node will receive a reward decreases. This reward is relative to the
number of coins frozen in a node. 2.7 billion BOA are issued through Confirmation rewards. Initially
27 BOA are issued per 5 seconds. The reward decreases every -roughly- one year by 6.31% over 128
years. 

This will have to be applied differently depending on the Block Number

The Beacon chain has a number of implementations.
We use prysm.
https://github.com/zeroone-boa/prysm

Implement the congress voting function using smart contracts

We already have Votera implemented in Agora.
It stores ballots in Agora's data payload.
Votera consists of a centralized server and mobile app.
The centralized server has proposal data and pre-evaluation information.
Now we're going to switch this to smart contracts.
We must implement functions and services for proposals, pre-evaluation, voting, counting, and payment of proposed amounts.

  • Proposal
  • Pre-evaluation
  • Vote
  • Ballot counting
  • Payment of the proposed amount
  • Mobile app
  • PC service that shows pre-evaluation, voting progress, and counting results according to the proposal

Create a developer's manual for Biznet

The technical document consists of the following contents.

  • Introduction
  • Concepts
    • Consensus Engine
  • Tools
  • Develop
    • Biznet MainNet.
    • Biznet TestNet.
    • BOA Scan
    • Running Node
    • Install
    • Download Blockchain Snapshot
    • Upgrade
  • RPC
  • Deploy NFTs
    • NFT Metadata Standard
    • Deploy NFT on BizNet
  • ERC20 Token
    • Introduction
    • Issue ERC20 Token
  • Bridge
    • Introduction
    • Swap
  • FAQ

Implement the ability to issue Commons Budgets as defined in the Bosagora White Paper

Ethereum doesn't have the concept of a common budget. So we have to implement this as described in the White Paper.
This is what the white paper says.

Commons Budget: The Commons Budget holds BOA that can only be used by proposals that have
passed the Congress Network. In order to create a sufficient budget for proposals, 50 Commons
Coins are issued per 5 seconds for the first -roughly- six years. After the first six years the Commons
Budget is maintained through the 30% commons fee on transactions fees. 

The Beacon chain has a number of implementations.
We use prysm.
https://github.com/zeroone-boa/prysm

보테라에서 투표에 사용될 이더리움주소에 대한 이슈

보테라에서 투표에 사용될 이더리움주소에 대한 이슈

ETH2의 검증자의 키에 대한 스팩은 다음과 같습니다.

https://kb.beaconcha.in/ethereum-2-keys

EHT2의 검증자의 키는 기존 이더리움의 키와 다른 체계를 가지고 있습니다.
EHT1 공개키 : 65 Bytes
EHT2 검증자의 공개키 : 48 Bytes
공개키의 크기 부터 다르기 때문에 이것으로 주소를 유추하기 어렵습니다.

그런데, 보테라는 스마트컨트랙에서 투표를 진행하고, 스마트컨트랙트 내부에서는 ETH1 주소로 유권자들을 판별합니다.
따라서 우리는 투표용 ETH1 주소와 검증자의 키를 맵핑할 수 있는 시스템을 제공하여야 합니다.


Issues on Ethereum addresses to be used for voting in Votera

The specification for the validator's key in ETH2 is as follows.

https://kb.beaconcha.in/ethereum-2-keys

The validator's key in EHT2 has a different scheme than the existing Ethereum's.
EHT1 Public Key: 65 Bytes
EHT2 Validator's public key: 48 Bytes
It is difficult to infer the address from this because the size of the public key is different.

By the way, Votera votes on Smart Contracts, and within Smart Contracts, voters are determined by ETH1 address.
Therefore, we need to provide a system that can map ETH1 addresses for voting and the validator's key.

Modify `Staking-Launchpad` to fit Agora

Staking-Launchpad is a site that steaks 40,000 BOA into several accounts. https://github.com/zeroone-boa/staking-launchpad
The screen provides step-by-step instructions for what users need.
This site provides a CLI that allows users to generate as many keys as they need.
This CLI is staking-deposit-cli and its repository is https://github.com/zeroone-boa/staking-deposit-cli.
This CLI generates multiple keys and stores the information required when calling a function in the deposit smart contract in one file so that the generated key can call a function in the smart contract.
The name of this file is deposit_data-##########.json.
After that, the user then uploads the file to the site.
Then, the site works with the wallet and steaks 40,000 boa to each account.

We need to change the design, coin name, link, menu, coin unit, etc. to suit Agora.

Investigate the result of the Shanghai fork

Shanghai update will happen in Ethereum about 3 months after the merge and includes

  • enable Beacon chain withdrawals
  • Lower L2 gas fees
  • change EVM object format by separating the code from the data
    We need to investigate how this will effect the Bosagora blockchain and enable withdrawals.

Bosagora agora tagged images in Docker hub made from Github actions:

Bosagora agora tagged images in Docker hub made from Github actions:

Use these images in the local-testnet project.

Modify `Faucet` to fit Agora

Faucet is a site that sends BOA for testing to users on the test net.
Its repository is https://github.com/zeroone-boa/FaucETH.

It uses ENS. We cannot support this, so we change it so that the user can enter the wallet address.
We need to change the design, coin name, link, market chart, menu, coin unit, etc. to suit Agora.

What are the causes and solutions for the following errors?

What are the causes and solutions for the following errors?
I removed "terminalTotalDifficulty" from Genesis.json: 200000000000
And when I ran the primsm, the following error is occurring.
Should we use "terminalTotalDifficulty" when opening Biznet?
Or should we do a hard fork when the main net is opened?

[2022-05-27 01:36:11] ERROR powchain: Could not check configuration values between execution and consensus client error=method not found
github.com/prysmaticlabs/prysm/beacon-chain/powchain.init
        beacon-chain/powchain/errors.go:11
runtime.doInit
        GOROOT/src/runtime/proc.go:6222
runtime.doInit
        GOROOT/src/runtime/proc.go:6199
runtime.doInit
        GOROOT/src/runtime/proc.go:6199
runtime.doInit
        GOROOT/src/runtime/proc.go:6199
runtime.main
        GOROOT/src/runtime/proc.go:233
runtime.goexit
        GOROOT/src/runtime/asm_amd64.s:1571

Modify key generator `wagyu-key-gen` to fit the agora

We need to provide a key generator that supports UI that can be easily used by the general public.

I duplicated the storage of the key generator 'wagiyu-key-gen'.
Its new address is https://github.com/zeroone-boa/wagyu-key-gen
The original address is https://github.com/stake-house/wagyu-key-gen.
Modify this to fit the agora

우리는 일반인들이 쉽게 사용할 수 있는 UI를 지원하는 키생성기를 제공할 필요한다.

나는 키 생성기인 wagyu-key-gen의 저장소를 복제하였다.
그것의 새로운 주소는 https://github.com/zeroone-boa/wagyu-key-gen 이다
원본의 주소는 https://github.com/stake-house/wagyu-key-gen 이다.
이 것을 아고라에 맞도록 수정해주세요 Netwok, ChainID

Find the function getting validators

We should provide the function that gets a list of validators and can be used in the Votera app. A similar function might be already implemented in Beacon API. @mkykadir provides the related function in Beacon API spec. The requirements are as follows.

  • RPC point that can be used in the Votera app
  • Provide a function that returns a list of validators
  • Provide a function that checks if a particular address is a validator
  • Provide a function that checks whether a particular user is a validator that can be used in Stoa
  • Since external RPC is not accessible inside the smart contract, we should provide a function to check whether it is a validator or not within the smart contract that can be used in Stoa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.