Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLS Aggregated Committed Seals + ParentCommittedSeal (0xPolygon#649)
* Refactor the functions/methods for IBFT extra * Add ParentCommittedSeal in IBFT Extra * Fix lint error * Add unit test for ParentCommittedSeal in IBFT Extra * Fix comments * Rename function name * Fix typo * Remove return values from initIbftExtra * Shallow nesting * Add BLS in IBFT (WIP) * Add ECDSA & BLS Signer in IBFT * Update go.mod * Remove debug file * Add BLS mode in secrets init and genesis command * Fix build error * Update go.mod * Fix failed test * Fix lint error * Fix lint error * Split Signer struct to remove redundant codes in ECDSA & BLS Signer * Fix failing ParentCommittedSeal * Move validators parser from genesis package to validators package * Move the function to convert keys to validator set into validators package * Add new error for empty key type in secrets init command * Move GetBLSPubkeyFromValidatorKey func from secrets/init package to crypto * Remove debug code * Rename ECDSAToBLSPubkey to ECDSAToMarshalledBLSPubkey * Fix typo * Continue instead of error when failing collected committed seal * Uncommented required code * Fix code style * Uncomment extra test * Fix failed test * Abstract validator set - WIP * Change minter type in header to bytes - WIP * Revert Minter type in header * Fix build error - WIP * Fix failed test * Fix faild test * Add params in ibft switch command to change validation type - WIP * Switch IBFT signer dynamically * Fix failing ParentCommittedSeals verificateion issue * Add ForkManager * Add validator set * Fix predeploy staking SC * Fix empty Miner issue * Fix go.mod * Fix type of visited * Fix voting * Add ParseBLSPublicKey * Fix BLS validator voting issue * Fix predeploy script for the SC that holds BLS Public Keys * Ignore validator whose BLS Key is not set in fetch * Fix secret init command's output * Fix update validator set * Fix issue of ParentCommittedSeals verification * Fix update predeploy staking contract script * Fix lint error * Add IsGenesis helper method in Header * Fix build error in tests * Fix CreatedCommittedSeal issue in BLS * Remove unused function, NewValidatorSetFromType * Remove unused function, AddressToBytes * Removed unused function ParseSourceType * Fix Copy method in Vote in order to prevent memory leak issue * Refactor getNextCandidate * Add err check in FetchBLSValidators * Fix comment in ParseIBFTType * Fix comment in Validators * Add constants for map keys * Add ErrUndefinedIBFTConfig * Removed unused function, ParseEDDSAValidators * Removed unused function, ParseBLSValidators * Add comments in validators helper * Add comments for ECDSAValidator and BLSValidator * Refactor SnapshotSet's methods * Revert comment * Remove old comment * Extract common processes in query.go * Add error handling for os.Remove * Define ibftTypesToSourceType instead of function * Refactor loading Snapshot and Metadata * Add error constant in ibft/fork/hooks.go * Remove unused params * Add comments in manager.go * Remove unused error * Correct error message * Rename the fields in IBFTExtra * Fix comment * Add comment in signer package * Fix comment * Call Bytes() instead of getting slice * Remove error from return values, which is never returned * Correct command flag description * Add error handling in Quorum * Add helper method, extractParentCommittedSeals * Removed commented methods * Add unit tests in validators package * Add unit tests for contract validator set * Add unit tests for Snapshot validator set * Fix missing update of submodules after block insertion * Fix failed tests * Skip parent committed seals if it doesn't exist * Fix lint error * Fix wrong unmarshalling of BLSValidator * Rename ValidatorSet to ValidatorStore * Add tests in extra * Fix the existince check of ParentCommittedSeals * Fix lint error * Add unit tests in KeyManager * Make DecodeBLSPublicKeys unexported * Add error log after PostInsertBlock * Add unit tests of BLS Key Manager * Rename Sealer to Seals * Rename BLSSeal to AggregatedSeal * Fix json output of BLS Public Key * Add Set in validators package and remove ECDSAValidators and BLSValidators * Fix lint error * Move interface of Hooks to ibft package * Move interface of ForkManager to ibft package * Fix comment * Add comment in SnapshotValidatorStore * Remove unused function * Add LRU cache in ContractValidatorStore * Fix lint error * Fix unstable tests in BLS * Return Math.Int32 instead of 0 in Quorum * Revert arg name from proposal to proposalHash * Correct comment * Fix comment for function ParseValidatorType * Remove unrelated comment and unused method from hook package * Fix UpdateValidatorSet in PoA * Add mission method from previous commit * Move HeaderModifier and HeaderProcessor to fork package that calls store * Move Updatable to fork package that calls store * Move Votable to ibft package that calls SnapshotStore * Add comment * Add wrapper of validator store in fork package * Add comment * Fix lint error * Fix lint error * Fix lint error around math/rand * Fix lint error around math/rand * Revert "Fix lint error around math/rand" This reverts commit b4d58e9. Revert "Fix lint error around math/rand" This reverts commit 85ad56b. Revert "Fix lint error" This reverts commit 3769e5c. Revert "Fix lint error" This reverts commit 82e896c. * Cleanup Hooks Register Process * Fix wrong height calculation for contract store * Fix unmarshal parent committed seals issue in Signer * Fix linter * Make bls default * Make switch IBFTValidatorTypeFlag default bls * Make ECDSA default for e2e tests * Make bls public key requred for voting in bls * Removed unused fields * Remove unused cast * Add omitempty * Fix typo * Merge two if conditions * Add logging of IBFT validation type * Add unit tests for BLS * Move update submodules for IBFT because of concurrent access by syncer * Fix failed test * Fix failed test * Enable log in e2e for debug * Add timeout in e2e * Fix typo Co-authored-by: AleksaOpacic <[email protected]>
- Loading branch information