Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RON-313] docs(README): update overview and contributions #158

Merged
merged 53 commits into from
Nov 14, 2022

Commits on Aug 10, 2022

  1. Configuration menu
    Copy the full SHA
    47fe1c6 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2022

  1. [RON-156] feat(consortiumV2): implement Engine interface for Consorti…

    …um wrapper (#90)
    
    * feat(consortiumV2): implement Engine interface
    
    just implement empty interface, function not yet
    
    * fix(consortiumV2): remove consortium v2
    
    * fix(consortiumV2): clean up consortium v2
    
    * feat(consortiumV2): implement Consortium wrapper for v1
    
    * feat(consortiumV2): implement SetGetSCValidatorsFn and SetGetFenixValidators
    
    * feat(consortiumV2): implement Authorize
    
    * fix(consortiumV2): Authorize params
    
    * fix(consortiumV2): rename consortium to main for helping review
    linh-1 authored Aug 11, 2022
    Configuration menu
    Copy the full SHA
    b2fa4a8 View commit details
    Browse the repository at this point in the history
  2. [RON-156] feat(consortiumV2): implement Consortium v2 interface (#92)

    * feat(consortiumV2): implement Consortium v2 interface
    
    * feat(consortiumV2): implement logic for Consortium wrapper to call v2 or v1
    linh-1 authored Aug 11, 2022
    Configuration menu
    Copy the full SHA
    1804181 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    69eef57 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2022

  1. [RON-161] feat: implement function to interacting with smart contract (

    …#94)
    
    * feat(consortiumV2): implement function to interacting with smart contract directly
    
    * fix: missing new parameters
    
    * fix: missing new parameters
    
    * fix: invalid check consortium config nil
    
    * fix: use signer hash instead of hash method
    linh-1 authored Aug 12, 2022
    Configuration menu
    Copy the full SHA
    11c94a2 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2022

  1. Configuration menu
    Copy the full SHA
    7a4df0a View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. [RON-165] Implement Snapshot methods (#98)

    * feat: implement Snapshot methods
    
    * feat: implement isMajorityFork method
    
    * chore: implement isMajorityFork method
    
    * fix: update loadSnapshot location
    
    * fix: update store location
    
    * chore: comment unused method
    
    * chore: remove RecentForkHashes property
    linh-1 authored Aug 16, 2022
    Configuration menu
    Copy the full SHA
    2c11cbb View commit details
    Browse the repository at this point in the history
  2. feat: implement Consortium v2 verify methods (#99)

    * feat: implement Consortium v2 verify method
    
    * refactor: comment unused check in verifyCascadingFields
    
    * refactor: use misc.VerifyGaslimit instead
    linh-1 authored Aug 16, 2022
    Configuration menu
    Copy the full SHA
    6c36681 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. Configuration menu
    Copy the full SHA
    1c01b4f View commit details
    Browse the repository at this point in the history
  2. [RON-169] feat: implement Finalize and FinalizeAndAssemble methods (#101

    )
    
    * feat: implement Finalize and FinalizeAndAssemble methods
    
    * fix: remove init contract
    
    * fix: remove unused import
    
    * fix: missing import
    linh-1 authored Aug 17, 2022
    Configuration menu
    Copy the full SHA
    8b79c77 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c80171 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2022

  1. [DPoS] fix: call smart contract through backend instead of ethapi (#104)

    * fix: call smart contract through backend instead of ethapi
    
    * feat: Add BlockContext to simulated backend to prevent cycle import while using it in consensus package
    
    * refactor: move contract to common
    
    * fix: case sensitive
    
    * fix: case sensitive
    
    * fix: remove NewFaker
    
    * fix: case sensitive
    
    * refactor: call opts with BlockNumber
    
    * fix: add missing header
    
    * fix: assign systemTxs to ReceivedTxs
    
    * feat (dnk90): Add balance to system address instead of coinbase, if block number is within consortiumV2 fork
    
    * update (dnk90): use IsConsortiumV2 function instead
    
    * refactor: impl Backend interface
    
    * fix: spelling mistake
    
    * refactor: eliminate magic number
    
    * refactor: call update validators
    
    * fix: checkpoint time
    
    * fix: replace manual calculation by IsOnConsortiumV2
    
    Co-authored-by: kien Dang <kien.15@gmail.com>
    linh-1 and DNK90 authored Aug 19, 2022
    Configuration menu
    Copy the full SHA
    a488119 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2022

  1. Fix: add update validators to finalize method (#106)

    * fix: Add updateValidators to `Finalize` method to make sure `updateValidators` transaction is processed in received sides
    
    * fix: wrong validation when calling updateValidations
    DNK90 authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    284a08d View commit details
    Browse the repository at this point in the history
  2. fix: update validators generated code (#107)

    - Add `addNode` function to support adding new nodes
    - Change NewContractIntegrator param from `*ConsortiumBackend` to `bind.ContractBackend` interface to make it more flexible (we can adapt different backends lately)
    DNK90 authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    38e4cf7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c045ab View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2022

  1. Fix pointer issue validating end of v1 (#109)

    * fix: worker starts before getValidatorsSC is set
    
    * fix: call `SetGetSCValidatorsFn` instead of `SetGetFenixValidators` in `Consortium.SetGetSCValidatorsFn`
    
    * fix: pointer issue when validating current block is end of v1 or not
    DNK90 authored Aug 22, 2022
    Configuration menu
    Copy the full SHA
    e5b4e18 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. Configuration menu
    Copy the full SHA
    4a50253 View commit details
    Browse the repository at this point in the history
  2. [RON-202] feat: implement CalcDifficulty and Delay methods (#112)

    * feat: implement Seal method
    
    * feat: implement CalcDifficulty and Delay methods
    
    * chore: add switch condition for Delay and Author
    linh-1 authored Aug 23, 2022
    Configuration menu
    Copy the full SHA
    538cd07 View commit details
    Browse the repository at this point in the history
  3. Chore: Add sign tx fn to contract integrator (#110)

    * chore: Add signFnTx to contract integrator, add deploy validators to generated validators
    
    * fix: change FinanlizeAssemble that returns receipts to apply changing receipts length during processing system contracts
    
    * fix: change gas limit
    
    * fix: Add check recent to v1/verifySeal
    
    * chore: Add contract_test which contains deploy and addNode codes
    
    * fix: applying v2 contract from v1
    DNK90 authored Aug 23, 2022
    Configuration menu
    Copy the full SHA
    d629b9a View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2022

  1. Configuration menu
    Copy the full SHA
    f4ceaae View commit details
    Browse the repository at this point in the history
  2. fix: Implement PoSA interface methods to main Consortium (#114)

    * fix: Implement `PoSA` interface methods to main Consortium in order to get system contracts in v2
    
    * chore: Remove unnecessary line
    DNK90 authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    bb4573c View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. nit: Remove redundant codes (#115)

    - Remove redundant logs
    - Remove systemcontracts package
    - Move generated_contracts to consortium package
    DNK90 authored Aug 26, 2022
    Configuration menu
    Copy the full SHA
    77bfe54 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2022

  1. Configuration menu
    Copy the full SHA
    791752d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50b8035 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2022

  1. fix: reorgs and incorrect nonce in consortium-v2 (#118)

    * fix: reorgs and incorrect nonce in consortium-v2
    
    * chore: Remove getValidatorsFromLastCheckpoint, use snapshot instead
    DNK90 authored Sep 5, 2022
    Configuration menu
    Copy the full SHA
    50ad714 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2022

  1. Configuration menu
    Copy the full SHA
    0eeea95 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2022

  1. feat: integrate smart contract (#120)

    * feat: integrate smart contract
    
    * chore: remove dposStaking config
    
    * chore: change generated contract from PascalCase to snake_case
    
    * chore: remove validators contract
    
    * chore: remove contract tests
    
    * chore: add comment to avoid misleading
    linh-1 authored Sep 8, 2022
    Configuration menu
    Copy the full SHA
    7df546e View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2022

  1. Run FinalizeAndAssemble only on validator node (#122)

    We accept that the system transactions will not be in the pending state so it is
    unnecessary to call FinalizeAndAssemble in non-validator node. Move this call to
    be called only on validator node
    minh-bq authored Sep 13, 2022
    Configuration menu
    Copy the full SHA
    12f331c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e3bdff View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2022

  1. chore: fix missing signTxFn, clear outdated recents, check missing tx (

    …#125)
    
    * chore: fix missing signTxFn, clear outdate recents, check missing tx in state_processor
    
    * chore: check tx.To instead of tx
    linh-1 authored Sep 16, 2022
    Configuration menu
    Copy the full SHA
    5bd6e4d View commit details
    Browse the repository at this point in the history
  2. Make copy of block header when passing it to FinalizeAndAssemble (#126)

    As default, an empty block without applying any transactions in transaction pool
    is committed for sealing. Later, if there is no pending transactions in pool,
    that empty block is inserted. Otherwise, another block is committed.
    
    As we currently pass block header as a pointer to FinalizeAndAssemble, that block
    header can be edited twice because it goes through FinalizeAndAssemble twice.
    This leads to system transactions' gas used is accumulated twice, later results
    in the mismatch between local and remote block's gas used calculation. We fix
    this issue by make a copy of block header before passing it to
    FinalizeAndAssemble.
    minh-bq authored Sep 16, 2022
    Configuration menu
    Copy the full SHA
    9fcf043 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2022

  1. [RON-250] fix: backward compatible with v1 snapshot (#128)

    * fix: load snapshot v1
    
    * fix: store snapshot with the key consortium-
    
    * chore(snapshot): remove check condition at block 0 and fork
    
    * Choose the correct consortium version of ecrecover to be used on block header
    
    * Log slashing on finalize only, add some comments on snapshot
    
    Co-authored-by: Bui Quang Minh <minhbui@axieinfinity.com>
    linh-1 and minh-bq authored Sep 23, 2022
    Configuration menu
    Copy the full SHA
    3730672 View commit details
    Browse the repository at this point in the history
  2. [RON-251] fix: unknown ancestor (#129)

    * fix: unknown ancestor
    
    * chore: remove unused log
    
    * fix: remove line on comment
    
    * fix: remove unnecessary comment
    linh-1 authored Sep 23, 2022
    Configuration menu
    Copy the full SHA
    4101855 View commit details
    Browse the repository at this point in the history
  3. Remove unused variables and functions (#130)

    * Remove unused variables and functions
    
    * Remove deadcode when checking system transactions
    minh-bq authored Sep 23, 2022
    Configuration menu
    Copy the full SHA
    6f99ab1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3f1c3d6 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2022

  1. feat: Implement log precompiled contract (#134)

    * feat: Implement log precompiled contract
    
    * chore: minify consortiumLog's abi
    
    * chore: Add consortium precompiled contracts to list
    
    * chore: only allow log in debug mode (--vmdebug or `DEBUG` env is set to "true")
    
    * chore: Remove redundant function which get method from abi and input
    DNK90 authored Sep 29, 2022
    Configuration menu
    Copy the full SHA
    9fc303a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b47da9b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3af0957 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    25dbc17 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8352824 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. feat: Implement sortValidators precompiled contract (#138)

    * feat: Implement `sortValidators` precompiled contract
    
    * fix: add caller to the contract, since caller is the actual caller instead of sender from transaction
    
    * chore: add testcase which simulates a call from a user who trigger system contract to call `sort` precompiled contract
    
    * fix: incorrect get validators function should be `getValidatorCandidates` instead
    DNK90 authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    0eea767 View commit details
    Browse the repository at this point in the history
  2. [RON-264] docs(contract): add code comments (#139)

    * docs(contract): add comments
    
    * docs(contract): update comment for GetValidators
    linh-1 authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    89dde97 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b4be6f2 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2022

  1. feat: Implement verifyHeaders precompiled contract which detects doub…

    …le signing issue (#143)
    
    * feat: Implement verifyHeaders precompiled contract which detects double signing issue
    
    * chore: Remove unnecessary log init
    
    * chore: simplify unit test, add chainId and change Number to big.Int
    
    * chore: clean up code
    
    * nit: comment to hacky (`unpack`) function
    
    * chore: Add condition signer must equal to coinbase to prevent user uses fake signature
    DNK90 authored Oct 7, 2022
    Configuration menu
    Copy the full SHA
    73c5780 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. [RON-274] docs(v2consortium): add code comments (#140)

    * docs(v2consortium): add code comments
    
    * docs(v2consortium): update Close comment
    
    * docs(v2consortium): fix typo error
    linh-1 authored Oct 12, 2022
    Configuration menu
    Copy the full SHA
    e474e1e View commit details
    Browse the repository at this point in the history
  2. [RON-276] docs(consortium-main): add code comment, remove unused cons…

    …tant (#141)
    
    * docs(consortium-main): add code comment, remove unused ValidatorBytesLength constant
    
    * docs(consortium-main): fix typo
    linh-1 authored Oct 12, 2022
    Configuration menu
    Copy the full SHA
    c140273 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2022

  1. Configuration menu
    Copy the full SHA
    5f1499c View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. [RON-299] fix: update sortSC precompiled requirements (#151)

    * fix: align precompiled requirements
    
    * test: update TestConsortiumValidatorSorting_Run2
    
    * test: update compiled code
    
    * chore(precompiled): update consortiumValidatorSorting comments
    linh-1 authored Oct 14, 2022
    Configuration menu
    Copy the full SHA
    5c1b212 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    397d0d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ceabe7 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. Configuration menu
    Copy the full SHA
    fea4017 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Merge branch 'consortium-v2' into RON-313-update-readme

    # Conflicts:
    #	consensus/consortium/common/contract.go
    #	consensus/consortium/generated_contracts/ronin_validator_set/ronin_validator_set.go
    #	consensus/consortium/generated_contracts/slash_indicator/slash_indicator.go
    #	consensus/consortium/v2/consortium.go
    #	core/vm/consortium_precompiled_contracts.go
    #	core/vm/consortium_precompiled_contracts_test.go
    #	docker/chainnode/entrypoint.sh
    #	genesis/devnet.json
    #	miner/worker.go
    linh-1 committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    7d7b6e1 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2022

  1. chore: update README content

    linh-1 committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    832c742 View commit details
    Browse the repository at this point in the history