Tag:
Branch:
Tree:
631d384609
cleanup/streamsync
delete/old_pending_crosslinks
dependabot/go_modules/github.com/quic-go/quic-go-0.37.7
dependabot/go_modules/google.golang.org/protobuf-1.33.0
dev
dev1secfin
feature/address-to-bls
feature/clear-stale-staking-data
feature/clear-stale-staking-data-31024
feature/dev-clear-stake-031024
feature/dev-engine_test
feature/elk
feature/go1.20
feature/go1.21
feature/groth16
feature/log_tx
feature/proposal
feature/refactor-consensus-view
feature/state_pruning_codes
feature/updated-libp2p-version
feature/updated-protobuf
fix/backup-initialization
fix/crosslink_processing
fix/data-race1
fix/delegation
fix/dev-go-mod
fix/dumpdb_memory_usage
fix/import
fix/is-backup
fix/legacysync_existed_block
fix/list-mile-block
fix/only-valid-blocks
fix/removed-outdated-check
fix/rollback2
fix/rotation-with-revert
fix/shard-id-from-key
fix/snapshot_disabled
fix/stakedVoteWeight
fix/streamsync_context
fix/vw_prefix
improvement/stream_sync_single_tx
log/pending_crosslinks
main
mergify/sophoah/config-update
revert-4628-fix/only-valid-blocks
update/ethdb2024
1.3.1
banjo_tag
before_sc
cello_tag
deployed-20190514T205159-puzzle
deployed-20190611T020930-drum
devnet+utxo
drum_20190612
drum_20190612a
drum_20190613
drum_20190614
drum_20190615
drum_20190616
drum_20190616a
drum_20190616b
drum_20190616c
drum_20190618
drum_tag
mainrc2_20190619b
mainrc2_20190619c
master-20191029.0
master-20191205.0
master-20191205.1
master-20191205.2
master-20191205.3
master-20191207.0
master-20191207.1
master-20191207.2
master-20191208.0
pangaea-20190820.0
pangaea-20190822.0
pangaea-20190903.0
pangaea-20190909.0
pangaea-20190909.1
pangaea-20190910.0
pangaea-20190912.0
pangaea-20190919.0
pangaea-20190919.1
pangaea-20190920.0
pangaea-20190924.0
r3-20190730
r3-20190730.1
r3-20190731
r3-20190801
r3-20190807
r3-20190810.0
r3-20190812.0
r3-20190814.0
r3-20190816.0
r3-20190822.0
r3-20190827.0
r3_20190623
r3_20190623.1
r3_20190626
r3_20190628
r3_20190726
s3-20190830.0
s3-20190830.1
s3-20190903.0
testnet-20191011.0
testnet-20191013.0
v1-20190910.0
v1-20190911.0
v1-20190911.1
v1-20190914.0
v1-20190914.1
v1-20190917.0
v1-20190924.0
v1-20191001.0
v1-20191001.1
v1-20191008.0
v1-20191019.0
v1-20191019.1
v1-20191207.0
v1.0-020200317.0
v1.0-1901
v1.0-1902
v1.0-20200316.0
v1.0-20200405.0
v1.0-20200405.2
v1.0-20200405.3
v1.0-20200405.4
v1.0-20200405.5
v1.0-20200405.6
v1.0-20200406.1
v1.0-20200414.0
v1.1.0
v1.1.1
v1.10.0
v1.10.1
v1.10.2
v1.2.0
v1.2.1
v1.2.2
v1.2.3
v1.2.4
v1.2.5
v1.2.6
v1.2.7
v1.3.0
v1.3.1
v1.3.10
v1.3.11
v1.3.12
v1.3.2
v1.3.3
v1.3.4
v1.3.5
v1.3.6
v1.3.7
v1.3.8
v1.3.9
v1.9.0
v2.0.0
v2.1.0
v2.1.1
v2.1.2
v2.1.3
v2.1.4
v2.1.5
v2.1.6
v2.1.7
v2.1.8
v2.1.9
v2.2.0
v2.3.0
v2.3.1
v2.3.2
v2.3.3
v2.3.4
v2.3.5
v2.3.6
v2.3.6-2
v2.3.7
v2.3.8
v2.4.0
v2013.1.3
v2023.1.0
v2023.1.1
v2023.2.0
v2023.2.1
v2023.2.2
v2023.2.4
v2023.2.5
v2023.2.6
v2023.2.7
v2023.3.0
v2023.4.0
v2023.4.1
v2023.4.2
v2024.0.0
v3.0.0
v3.1.0
v3.1.1
v3.1.15
v3.1.2
v3.1.3
v3.1.4
v4.0.0
v4.0.0-d
v4.0.1
v4.1.0
v4.1.1
v4.1.10
v4.1.2
v4.1.3
v4.1.4
v4.1.5
v4.1.6
v4.1.7
v4.1.8
v4.1.9
v4.2.0
v4.2.1
v4.3.0
v4.3.1
v4.3.10
v4.3.11
v4.3.12
v4.3.13
v4.3.14-rc
v4.3.14-rc2
v4.3.14.rc3
v4.3.2
v4.3.3
v4.3.4
v4.3.5
v4.3.6
v4.3.7
v4.3.8
v4.3.9
${ noResults }
41 Commits (631d384609cc3eb8bb9de65bf8226c797f7a90f4)
Author | SHA1 | Message | Date |
---|---|---|---|
nico | 631d384609 |
woop
|
8 months ago |
Max |
3e7ff3839f
|
do not return bech32 in receipt, fix 7% fee (#4588)
* Fix: max rate issue (#4580) * fix: max-rate bellow the era min-rate * fix comments * add localnet epoch config * update config * update config * update config * update config * add log * remove hip30 from localnet * disable localnet config * engine: actually fix the 7% fee implementation * rpc: fix transaction receipt format for eth use the same receipt as `hmyv2_`. using a boolean variable, decide if the addresses need to be converted to bech32. do not return a contract address unless a contract was actually deployed in the transaction by using a pointer address type. * rpc: add comment indicating function is unused with the switch to `v2.NewReceipt` for even `eth_` queries, the `eth.NewReceipt` function is no longer used * build: fix delegation tests * update comment blocks was referring to `blocks of code` and not blocks in a chain. removed the confusing word * rpc: remove ConvertToEth in GetBlockReceipts * internal: max rate hard fork schedule * internal: testnet max rate schedule --------- Co-authored-by: Diego Nava <8563843+diego1q2w@users.noreply.github.com> |
11 months ago |
Diego Nava |
02e2fee4db
|
Fix: max rate issue (#4580)
* fix: max-rate bellow the era min-rate * fix comments * add localnet epoch config * update config * update config * update config * update config * add log * remove hip30 from localnet * disable localnet config |
12 months ago |
Konstantin |
7be2b0260b
|
Revert "fix: max-rate bellow the era min-rate (#4552)" (#4578)
This reverts commit
|
12 months ago |
Diego Nava |
f993468325
|
fix: max-rate bellow the era min-rate (#4552)
* fix: max-rate bellow the era min-rate * fix comments * add localnet epoch config * update config * update config * update config * update config |
12 months ago |
Max |
62feec962b
|
HIP-30: minimum validator commission of 7% (#4496)
* HIP-30: sharding configuration boilerplate * update comments * goimports * HIP-30: minimum validator commission of 7% Based on #4495, which must be merged before this PR. This PR should be rebased with dev after #4495 is merged to retain atomicity of changes by pull request. * goimports * update test * update test --------- Co-authored-by: Casey Gardiner <117784577+ONECasey@users.noreply.github.com> |
1 year ago |
Konstantin |
0e4b629fbe
|
Consensus Mask. Removed unnecessary argument. (#4466)
* Removed unnecessary argument. * Fixed comment. |
1 year ago |
Casey Gardiner |
01691fd3ea
|
Release Candidate 2023.2.0 ( dev -> main ) (#4399)
* check leader for N blocks * fix * fix * Cleanup and fix update pub keys. * Rotate leader. * fix fix fix fix fix * Cleaned. * Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`. * activate epoch * comment activation * 295 epoch * Fix failed tests. * Fixed code review. * Fix review "--port flag". * Fix review comments. * Returned locks in rotateLeader. * Rebased onto dev. * Commented golangci. * staged stream sync v1.0 * fix protocol tests * fix spell * remove unused struct * fix rosetta test * add comments and refactor verify sig * add comments, remove extra function * add comment * refactor errors, rename metrics * refactor p2p host creation * fix initsync and host creation * fix short range hash chain * fix beacon node detection for p2p protocol * refactor stream peer cooldown and fix protocol beacon node field * refactor p2p host and routing * fix p2p discovery test issue * add MaxAdvertiseWaitTime to handle advertisements interval and address stream connection issue * terminal print the peer id and proto id * fix boot complete message when node is shut down * add new config option ( ForceReachabilityPublic ) to fix local-net consensus issue * fix self query issue * fix test NewDNSSyncingPeerProvider * [testnet] disable leader rotation * fix discovery issue for legacy sync * add watermark low/high options for p2p connection manager * add test for new conn manager flags * fix dedent * add comment to inform about p2p connection manager options * fix max height issue * add a separate log for get max height error * fix log * feat: triesInMemory flag * fix: panic if TriesInMemory is 1 to 2 * in progress. * consensus check is forked * fix * Cleanup and fix update pub keys. * fix fix fix fix fix * activate epoch * EpochTBD for leader rotation epoch. * 295 epoch * Decider no longer requires public keys as a dependency. (#4289) * Consensus doesn't require anymore `Node` as a circular dependency. * Proper blockchain initialization. * Rwlock consensus. * Removed channels. * Removed view change locks. * Removed timers locks. * Removed fbft locks. * Removed multiSigMutex locks. * Removed leader locks. * Removed additional locks and isViewChange. * Added locks detected by race. * Added locks detected by race. * Locks for start. * Removed additional logs. * Removed additional locks. * Removed additional locks. * Make func private. * Make VerifyBlock private. * Make IsLeader private. * Make ParseFBFTMessage private. * Fix remove locks. * Added additional locks. * Added additional locks. * Added readSignatureBitmapPayload locks. * Added HandleMessageUpdate locks. * Added LastMile locks. * Locks for IsValidatorInCommittee. * Fixed locks. * Fixed tests. * Fixed tests. * Fixed lock. * Rebased over leader rotation. * Fix formatting. * Rebased onto dev. * in progress. * consensus check is forked * update master * fix leader * check leader for N blocks * fix * fix * Cleanup and fix update pub keys. * Rotate leader. * fix fix fix fix fix * Cleaned. * Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`. * comment activation * 295 epoch * Fix failed tests. * Fixed code review. * Fix review comments. * Merged leader rotation. * Rebased on dev. * Rebased on dev. * Fix usage of private methods. * Fix usage of private methods. * Fix usage of private methods. * Removed deadcode, LockedFBFTPhase. * Fix review comment. * Fix review comment. * Go mod tidy. * Set to EpochTBD. * Fix tests. * [core] fix state handling of self destruct If a contract self destructs to self and then receives funds within the same transaction, it is possible for its stale state to be saved. This change removes that possibility by checking for deleted state objects before returning them. * Fixed race error. * rpc: add configurable http and `eth_call` timeout * remove default timeouts * store the evm call timeout in rosetta object * [cmd] actually apply ToRPCServerConfig * Removed unused method. * Rotate external leaders on non-beacon chains. * Fix nil panic. * in progress. * in progress. * in progress. * consensus check is forked * update master * fix leader * check leader for N blocks * fix * fix * Cleanup and fix update pub keys. * Rotate leader. * fix fix fix fix fix * Cleaned. * Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`. * Fixed code review. * Fix review comments. * Returned locks in rotateLeader. * Rebased onto dev. * staged stream sync v1.0 * refactor errors, rename metrics * fix p2p discovery test issue * add watermark low/high options for p2p connection manager * fix dedent * in progress. * consensus check is forked * fix * Cleanup and fix update pub keys. * fix fix fix fix fix * activate epoch * EpochTBD for leader rotation epoch. * 295 epoch * Decider no longer requires public keys as a dependency. (#4289) * Consensus doesn't require anymore `Node` as a circular dependency. * Proper blockchain initialization. * Rwlock consensus. * Removed channels. * Removed view change locks. * Removed multiSigMutex locks. * Removed leader locks. * Removed additional locks and isViewChange. * Added locks detected by race. * Added locks detected by race. * Locks for start. * Removed additional locks. * Removed additional locks. * Make func private. * Make VerifyBlock private. * Make IsLeader private. * Make ParseFBFTMessage private. * Fix remove locks. * Added additional locks. * Added additional locks. * Added readSignatureBitmapPayload locks. * Added HandleMessageUpdate locks. * Added LastMile locks. * Locks for IsValidatorInCommittee. * Fixed locks. * Fixed tests. * Fixed lock. * Rebased over leader rotation. * in progress. * consensus check is forked * update master * fix leader * check leader for N blocks * fix * fix * Cleanup and fix update pub keys. * Rotate leader. * fix fix fix fix fix * Cleaned. * Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`. * Fix failed tests. * Fixed code review. * Fix review comments. * Merged leader rotation. * Rebased on dev. * Rebased on dev. * Fix usage of private methods. * Fix usage of private methods. * Fix usage of private methods. * Removed deadcode, LockedFBFTPhase. * Fix review comment. * Go mod tidy. * remove default timeouts * Rotate external leaders on non-beacon chains. * Fix nil panic. * Fixes. * Update singleton.go * evm: don't return extcode for validators Due to technical debt, validator information is stored in the code field of the address. The code field can be accessed in Solidity for an arbitrary address using `extcodesize`, `extcodehash`, and `extcodecopy` or helper commands (such as `address.code.Length`). The presence of this field is used by contract developers to (erroneously) deny smart contract access to other smart contracts (and therefore, validators). This PR fixes that oversight by returning the same values as other EOAs for known validator addresses. Obviously, it needs a hard fork that will be scheduled separately. * Fix context passing. * Clean up code. * Removed engine dependency. * Fix possible panic. * Clean up code. * Network type. * Fix tests. * Revert "Removed engine dependency." (#4392) * Revert "Fix tests." This reverts commit |
2 years ago |
Gheis Mohammadi |
53161ca33c
|
Add prefix for validator wrapper (#4402)
* add separate prefix for validator wrapper * update comments * make read/write backward compatible * add validator codes to stats * goimports * goimports accessor_state |
2 years ago |
harjas | 68e761b596 |
Add epoch, block number to current-epoch-performance
|
3 years ago |
harjas | 096f19be1a |
Add epoch, block number to hmyv2_getValidatorInformation response
|
3 years ago |
Max |
5abe070ec6
|
Resolve harmony-one/bounties#90: Add revert mechanism for UpdateValidatorWrapper (#3939)
* Add revert mechanism for UpdateValidatorWrapper Closes harmony-one/bounties#90 (1) Use LRU for ValidatorWrapper objects in stateDB to plug a potential memory leak (2) Merge ValidatorWrapper and ValidatorWrapperCopy to let callers ask for either a copy, or a pointer to the cached object. Additionally, give callers the option to not deep copy delegations (which is a heavy process). Copies need to be explicitly committed (and thus can be reverted), while the pointers are committed when Finalise is called. (3) Add a UpdateValidatorWrapperWithRevert function, which is used by staking txs `Delegate`, `Undelegate`, and `CollectRewards`. Other 2 types of staking txs and `db.Finalize` continue to use UpdateValidateWrapper without revert, again, to save memoery (4) Add unit tests which check a) Revert goes through b) Wrapper is as expected after revert c) State is as expected after revert * Change back to dictionary for stateValidators Since the memory / CPU usage saved is not significantly different when using an LRU + map structure, go back to the original dictionary structure to keep code easy to read and have limited modifications. * Add tests for validator wrapper reverts As requested by @rlan35, add tests beyond just adding and reverting a delegation. The tests are successive in the sense that we do multiple modifications to the wrapper, save a snapshot before each modification and revert to each of them to confirm everything works well. This change improves test coverage of statedb.go to 66.7% from 64.8% and that of core/state to 71.9% from 70.8%, and covers all the code that has been modified by this PR in statedb.go. For clarity, the modifications to the wrapper include (1) creation of wrapper in state, (2) adding a delegation to the wrapper, (3) increasing the blocks signed, and (4) a change in the validator Name and the BlockReward. Two additional tests have been added to cover the `panic` and the `GetCode` cases. |
3 years ago |
Rongjian Lan |
b0bf39861d
|
Add min commission rate logic (#3715)
* Add min commission rate logic |
4 years ago |
Leo Chen | 9c296f8004 |
[log] print inactive validator
Signed-off-by: Leo Chen <leo@harmony.one> |
4 years ago |
Rongjian Lan |
a168517dfc
|
Move BLS related wrapper structure into a separate package (#3209)
|
4 years ago |
Leo Chen |
5c1cc8232c
|
Merge master to t3 0523 (#3085)
* fix signers share computation to use only non-harmony nodes (#3008) * Add LastEpochInCommittee at prestaking epoch too (#3014) * write validator stats at the end of prestaking epoch (#3021) * write validator stats at the end of prestaking epoch * also need to write block reward accumulator * [build] enable static build by default (#2885) scripts/go_executable_build.sh -s (static build, default) scripts/go_executable_build.sh -S (non-static build) Signed-off-by: Leo Chen <leo@harmony.one> * Code formatting fix based on `staticcheck` (#3023) * fix some static check issues * more fixes according to staticcheck * add nil check on getHeader * Add more log info * [rpc] Revert change to v2 GetBalance RPC (#3037) * Cherrypick crosslink related fixes from t3 to master. (#3045) * Optimize crosslink verification logic and add more cache (#3032) * make crosslink broadcast smarter and more efficient (#3036) * adjust catch up speed to be a sane number * Fix crosslink broadcast condition (#3041) * Tx pool error report fix & local build fix (#3046) * [tx_list] Add transaction after you can fetch tx cost * [tx_pool] Add error sink reports for removed tx * Correct log levels for known transactions * Remove redundant hash to `enqueue` and `add` signatures * Update tests for signature changes * [build] Fix local build for MacOs * [tx_pool] Correct typo & logging level for known tx * [config] Create Testnet config * [node.sh] update testnet network config * [config] correct testnet config * [main] Enable beacon sync for explorer nodes (#3059) * [apr] should not use snapshot from last epoch, use current epoch snapshot (#3051) * use snapshot total delegation instead of current total delegation * should not use snapshot from last epoch, use current epoch snapshot (#3049) Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com> Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com> * cherrypick log level change * [rpc] Add active status back to Validator information [validator] Fix typo for ValidatorRPCEnhanced [Makefile] Change make exe to build non-static by default * [network] Added caching to node server (#3048) * [network] Added caching to node server * [network] renamed two singleflight.Group * [network] added two error handling * [network] added forget logic for single flight * [network] changed single flight to lru cache solution * [network] adjusted the cache size * [network] changed cache size to 10000 * Transaction api improvements (#3057) * [node] Add option to broadcast invalid tx (on by default) * update main args to take in broadcast invalid tx * update node.sh for new broadcast invalid tx option * [rpc] Do not submit transaction if tx has been finalized * Support legacy behavior and not return errors on tx submission * [main] make broadcasting invalid tx default false * [node] Fix formatting * Add timeouts for the explorer HTTP service * [test] State trans unit test (#3043) * completing create-validator tests generalizing create validator tests, started with edit validator tests one round completed before major refactor * [test] finished coding test TestCheckDuplicateFields * [test] finished debug TestCheckDuplicateFields * [test] Added TestDescription_EnsureLength * [test] added test in validator_test.go TestUpdateDescription * [test] Added test TestComputed_String * [test] refactored TestValidatorSanityCheck and added some message in error message returned from sanity check * [test] removed test index for debugging * [test] Added test TestValidatorWrapper_SanityCheck. Added value check for TestMarshalUnmarshalValidator. Fixed rlp usage defect in UnmarshalValidator * [test] added test TestVerifyBLSKeys * [test] added test TestContainsHarmonyBLSKeys * [test] added test TestCreateValidatorFromNewMsg * [test] fixed some tests errors * [test] added test TestUpdateValidatorFromEditMsg, last editted the test file, finished testing validator_test.go * [staking] added numeric.Dec.Copy method * [staking] added CommissionRates.Copy * [staking] add nil case handle to copy method and related test case * [test] added nil case for commissionRates.Copy test * [staking] finished CreateValidator.Copy and related test case * [staking] added EditValidator.Copy method and related test case * [test] added zero test cases for Copy method * [staking] implemented Delegate.Copy and related unit test case * [staking] added Undelegate.Copy and CollectReward.Copy method. Implemented corresponding test cases * [test] added two more simple unit tests * [test] solving the merge conflict with deep copy fix * [test] added schedule for sharding * [test] refactored double_sign_test.go * [test] comment out all test cases for now. * [test] added record Copy method for testing * [test] added the first test case in TestVerify * [test] finished test TestVerify * [test] Added test TestVerify, TestApplySlashRate, TestSetDifference * [test] half through TestDelegatorSlashApply * [test] fix the problem cause by unsafe usage of big.Int * [staking] added the copy methods to validatorWrapper * [test] added test cases for copy method for staking/validatorWrapper * [test] added test case TestApply * [test] added test case TestRate * [test] fix the golint errors * [test] removed commented out unit test code * [test] remote the empty line in imports * [test] moved copy methods to stake_testing module * [test] removed usage of interface stateDB * [test] removed empty lines in imports * [test] fixed golint package name issues * [test] removed a todo when writing code * [test] moved record.Copy to staking/slash/test * [test] add some changes * [test] added prototypes in staketest module * [test] fix the golint issue in staketest * [test] make prototype more beautiful * [test] refactored test TestCheckDuplicateFields * [test] add createValidator test data * [test] added positive test case for VerifyAndCreateValidatorFromMsg * [test] added create validator test * [test] added the positive test case for TestVerifyAndEditValidatorFromMsg * [test] added the tests case TestVerifyAndEditValidatorFromMsg * [test] fix one of the error is not triggered as expected * [test] more changes in test * [test] fix the positive test data for TestVerifyAndDelegateFromMsg * [test] Fixed two comment golint errors * [test] added delegate tests * [test] added a make function. WIP * [test] added undelegate positive test * [test] added negative test cases for undelegate * [test] added positive test. not passed. Need to add assert method in test suites * [test] added equal function to check Validator Equality * [test] added equals for staketest * [test] replaced deep equal with new equal methods: * [test] removed unused codes * [test] Finishing touch * [test] fix comment golint issue * [test] removed dead code in staking_verifier_test.go Co-authored-by: Ganesha Upadhyaya <ganeshrvce@gmail.com> * changed the sync port to dns port in flag * [network] Limit client sync connection (#3071) * [network] limit client connected peers * Changed signature and added tests * Set secure permissions on generated blskey pass file in node.sh * Fix spellin gtypo in node.sh * fix latest param handling in api v1 * added comment for the isGreaterThanLatestBlockNum check * fix a nil pointer crash due to previous revert Signed-off-by: Leo Chen <leo@harmony.one> * fix nil pointer crash Signed-off-by: Leo Chen <leo@harmony.one> * fix nil pointer of block Signed-off-by: Leo Chen <leo@harmony.one> * [rpc] add viewID and epoch to RPCMarshalBlock (#3009) * [rpc] add viewID and epoch to RPCMarshalBlock * add apt-get update * Do not rollback current block on failed block sync (#3101) Co-authored-by: Ganesha Upadhyaya <ganeshrvce@gmail.com> Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com> Co-authored-by: Jacky Wang <jackyw.se@gmail.com> Co-authored-by: Janet Liang <56005637+janet-harmony@users.noreply.github.com> Co-authored-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> Co-authored-by: Janet Liang <janet@harmony.one> Co-authored-by: Sebastian Johnsson <sebastian.johnsson@gmail.com> Co-authored-by: hsiung <hsiung@pinterest.com> Co-authored-by: Dennis Won <jhwon0820@gmail.com> Co-authored-by: Yishuang Chen <34232522+ivorytowerdds@users.noreply.github.com> |
5 years ago |
Jacky Wang |
9f6e09dce9
|
Code formatting fix based on `staticcheck` (#3023)
* fix some static check issues * more fixes according to staticcheck |
5 years ago |
Rongjian Lan |
a545327567
|
Add LastEpochInCommittee at prestaking epoch too (#3014)
|
5 years ago |
Rongjian Lan |
c09b3c3af7
|
Add LastEpochInCommittee at prestaking epoch too (#3016)
|
5 years ago |
Rongjian Lan |
69ff3b5bfe
|
Roll back validator list when block is reverted (#2891)
* Roll back validator list when block is reverted * fix error check |
5 years ago |
Jacky Wang |
3a94c7ef17
|
Availability test (#2840)
* [test] Added test case for BlockSigners * [test] Fixed the bls pubkey deserialize error in TestBlockSigners * [test] changed some t.Error to t.Fatal * [test] added TestBallotResult * [test] Added test TestIncrementValidatorSigningCounts * [test] added test case TestComputeCurrentSigning * [test] Added test case TestComputeAndMutateEPOSStatus * [test] Added error scenario in TestBallotResult * [test] change the order of imports * [test] Renamed some variables * [test] renamed val variables * [test] Fixed some golint errors |
5 years ago |
Rongjian Lan |
614f528f2c
|
Add cache to state validator modification; refactor snapshot read/write (#2844)
* Add cache to state validator access; refactor snapshot read/write * make validator update happen at commit * fix lint * make sure slashing applies on validator wrapper in state * Revert live update of validtor wrapper in staking txn * add init population of validator cache logic * Fix validator cache commit logic * Separate validatorWrapper func * fix build * Fix lint |
5 years ago |
Rongjian Lan |
db8f1a05b9
|
Optimize delegation reward distribution with caching (#2839)
* Optimize delegation reward distribution with caching * fix build * fix lint |
5 years ago |
Edgar Aroutiounian |
2836f0f620
|
[project] Remove over complicated packages, useless tests, dead functions (#2780)
* [project] Dead test * [node] If fields always same, then just use the constant * [project] Remove overcomplicated ctxerror * [project] Remove more dead tests, adjust error replacing ctxerror * [project] More dead tests, fix travis complaint on Errorf * [node.sh] Remove is-genesis |
5 years ago |
Edgar Aroutiounian |
a7b79616e2
|
[project] More Spring Cleaning (#2751)
* [project] Remove hmyclient * [drand] Remove dead drand * [drand] Remove dead code in proto, more dead drand things * [project] Remove dead demo tool * [project] Remove dead Lottery solidity * [project] Remove dead hmy client main * [node] Remove unused variable in test code * [project] Remove keygen * [project] Remove not useful test |
5 years ago |
Edgar Aroutiounian |
ba1c0cd0a3
|
[blockchain] Create fresh big int, remove more dead code from static … (#2749)
* [blockchain] Create fresh big int, remove more dead code from static analysis * [measure] Remove IzZero/IsNil checks |
5 years ago |
Rongjian Lan |
191f1d5ee2
|
Final attempt: Don't div by 0; print out debug info (#2746)
* Revert "Revert "fix earned-reward by writing the stats only once, remove from UpdateValdiatorVotingPower (#2737)" (#2742)"
This reverts commit
|
5 years ago |
Edgar Aroutiounian |
f8cbd880bb
|
[project] Bls -> BLS & remove dead Stake solidity contract (#2652)
|
5 years ago |
Rongjian Lan | be91928a3f |
Not update status for banned validators
|
5 years ago |
Rongjian Lan |
2f15cd5da8
|
Check signing threshold and set EPoS status only at last epoch (#2533)
* Check signing threshold and set EPoS status only at last epoch * base on status if validator signing enough blocks * Fix lint |
5 years ago |
Edgar Aroutiounian |
706338db46
|
[apr] More log in various steps of actual compute for apr (#2523)
|
5 years ago |
Edgar Aroutiounian |
a815e11409
|
[rpc][availability][apr] Richer validator information, implement APR, unify EPoS computation, remove fall 2019 tech debt (#2484)
* [rpc][validator] Extend hmy blockchain validator information * [availability] Optimize bump count * [staking][validator][rpc] Remove validator stats rpc, fold into validator information, make existing pattern default behavior * [slash] Reimplement SetDifference * [reward][engine][network] Remove bad API from fall, begin setup for Per validator awards * [header] Custom Marshal header for downstream, remove dev code * [effective][committee] Factor out EPoS round of computation thereby unification in codebase of EPoS * [unit-test] Fix semantically wrong validator unit tests, punt on maxBLS key wrt tx-pool test * [reward] Use excellent singleflight package for caching lookup of subcommittees * [apr][reward] Begin APR package itself, iterate on iterface signatures * [reward] Handle possible error from singleflight * [rpc][validator][reward] Adjust RPC committees, singleflight on votingPower, foldStats into Validator Information * [apr] Stub out computation of APR * [effective][committee] Upgrade SlotPurchase with named fields, provide marshal * [effective] Update Tests * [blockchain] TODO Remove the validators no longer in committee * [validator][effective] More expressive string representation of eligibilty, ValidatorRPC explicit say if in committee now * [rpc] Median-stake more semantic meaningful * [validator] Iterate on semantic meaning of JSON representation * [offchain] Make validator stats return explicit error * [availability] Small typo * [rpc] Quick visual hack until fix delete out kicked out validators * [offchain] Delete validator from offchain that lost their slot * [apr] Forgot to update interface signature * [apr] Mul instead of Div * [protocol][validator] Fold block reward accum per vaidator into validator-wrapper, off-chain => on-chain * [votepower] Refactor votepower Roster, simplify aggregation of network wide rosters * [votepower][shard] Adjust roster, optimize usage of BLSPublicKey as key, use MarshalText trick * [shard] Granular errors * [votepower][validator] Unify votepower data structure with off-chain usage * [votepower][consensus][validator] Further simplify and unify votepower with off-chain, validator stats * [votepower] Use RJs naming convention group,overall * [votepower] Remove Println, do keep enforcing order * [effective][reward] Expand semantics of eligibility as it was overloaded and confusing, evict old voting power computations * [apr] Adjust json field name * [votepower] Only aggregate on external validator * [votepower] Mistake on aggregation, custom presentation network-wide * [rpc][validator][availability] Remove parameter, take into account empty snapshot * [apr] Use snapshots from two, one epochs ago. Still have question on header * [apr] Use GetHeaderByNumber for the header needed for time stamp * [chain] Evict > 3 epoch old voting power * [blockchain] Leave Delete Validator snapshot as TODO * [validator][rpc][effective] Undo changes to Protocol field, use virtual construct at RPC layer for meaning * [project] Address PR comments * [committee][rpc] Move +1 to computation of epos round rather than hack mutation * [reward] Remove entire unnecessary loop, hook on AddReward. Remove unnecessary new big int * [votepower][rpc][validator] Stick with numeric.Dec for token involved with computation, expose accumulate block-reward in RPC * [effective][committee] Track the candidates for the EPoS auction, RPC median-stake benefits * [node] Add hack way to get real error reason of why cannot load shardchain * [consensus] Expand log on current issue on nil block * [apr] Do the actual call to compute for validator's APR * [committee] Wrap SlotOrder with validator address, manifests in median-stake RPC * [apr] Incorrect error handle order * [quorum] Remove incorrect compare on bls Key, (typo), remove redundant error check * [shard] Add log if stakedSlots is 0 * [apr] More sanity check on div by zero, more lenient on error when dont have historical data yet * [committee] Remove + 1 on seat count * [apr] Use int64() directly * [apr] Log when odd empty nil header * [apr] Do not crash on empty header, figure out later |
5 years ago |
Edgar Aroutiounian |
2baab4864c
|
[staking][validation][protocol] (#2396)
* [staking][validation][protocol] Limit max bls keys * [staking-era] Fold banned and active into single field * [slash][effective] Remove LRU cache for slash, change .Active to enumeration * [slash] Remove leftover wrong usage of Logger * [slash][offchain] Only Decode if len > 0 * [offchain] cosmetic * [slash] Remove some logs in proposal * [webhook] Move webhook with call for when cannot commit block * [shard] Finally make finding subcommittee by shardID an explicit error * [node] Whitespace, prefer literal * [webhook] Report bad block to webhook * [slash] Expand verify, remove bad log usage, explicit error handle * [slash] Check on key size * [slash] Explicit upper bound of pending slashes * [slash] Use right epoch snapshot, fail to verify if epoch wrong on beaconchain * [multibls] Make max count allowed be 1/3 of external slots * [quorum] Remove bad API of ShardIDProvider, factor out committee key as method of committee * [verify] Begin factor out of common verification approach * [project] Further remove RawJSON log, use proper epoch for snapshot * [slash] Implement verification * [slash] Implement BLS key verification of ballots * [rpc] Keep validator information as meaningful as possible * [staking] Never can stop being banned * [slash] Comments and default Unknown case of eligibility * [slash] Be explicit on what input values allowed when want to change EPOSStatus * [consensus] Remove unneeded TODO * [verify] Add proper error message * [rpc] Give back to caller their wrong chain id * [chain] Add extra map dump of delegation sizing for downstream analysis * [engine] Less code, more methods * [offchain] More leniency in handling slash bytes and delete from pending * [validator] Remove errors on bad input for edit |
5 years ago |
Edgar Aroutiounian |
cf3b5053ba
|
[webhook][rpc][availability] Hooks, current signing, remove median-stake cached values (#2423)
* [webhook] Loop over all self address * [rpc] Remove accidential recursion * [rpc] Never ignore errors, fix RPC with current snap info, no div by zero * [rpc] Expose BadBlock for downstream * [availability] Thread through missing signers for offchain usage in WriteBlockWithState * [project] Merge with master, accept master conflicts * [offchain] Remove inactive signers from offchain data, should fix median-stake issues * [rpc] Test idea that returning error cause jenkins failure * [staking] Put editvalidator back into validator list cache * [rpc] Add network voting-power to validator information * [votepower] Extend roster with raw percentage * [rpc] If have validator but not snapshot, give back validator * [rpc] Expose effective-stake as well * [project] Remove missedSignThreshold map, use instance for stakedslots count * [staking] Remove edit-validator idea from previous filter idea |
5 years ago |
Edgar Aroutiounian |
8e15daf7e2
|
[project][rpc][log][config] OSTN improvements (#2420)
* [assignment] Make error case be explicit on public keys, log out important committee size info * [committee] Do hmy nodes first, exit early if 0 externals to do * [genesis] Never ignore errors * [slash][availability] Remove log, remove leftover yaml * [committee] Maintain same API as before * [rpc] Enchance RPC of validator information for current epoch signing percent * [availability] Remove excessive log * [availability][slash] Unify yaml hook config * [availability][webhooks] Call webhook when reach missing signing threshold |
5 years ago |
Edgar Aroutiounian |
1564aacb84
|
[availability] Adjust design to set active field on each block (#2372)
* [availability] Adjust design to set active field on each block * [availability] LastEpochInCommittee on newShardState * [availability] Fold active computation into end of increment loop as optimization * [availability] Stub out unit test |
5 years ago |
Edgar Aroutiounian |
46a374e6d8
|
[project] Never hold reference to global logger (#2365)
|
5 years ago |
flicker-harmony | aadeae045c |
Refactor explorer service and add addresses fetch from db
|
5 years ago |
Edgar Aroutiounian |
2e27e1b845
|
[availability] Count availability for shard chain, more log, remove error of div by zero as error condition (#2342)
* [availability] More log, remove error of div by zero * [availability] Apply increment of count in accumulate since need crosslink * [availability] More log * [staking] VC easy flow of create validator and delegation, restart watchdog * [availability] Use method instead of inline, fix Cmp mistake in measure * [availability] Add explicit log for measure * [availability] Begin unit test impl * [availability] Factor out subset of methods that availability needs, expand test * [availability] Do not increment count when LastEpochInCommittee is 0 * [availability] Remove dev scripts * [availability] Adjust logs * [availability] Remove test BLS keys * [availability] Remove check on LastEpoch in bumpCount, remove spurious log * [availability] Further simplify, current shard state is the elected validator * [consensus] Remove log * [project] Remove noisy, hard to know where happened log; whitespace on style |
5 years ago |
Edgar Aroutiounian |
efd6a47b8a
|
[availabililty] Move when reset of counters occurs, more log on bumping sign counts, remove leftover test… (#2339)
* [availabililty] More log on bumping sign counts, remove leftover test script * [availability] Move reset of counters after bumping counts & setting MIA validators as inactive * [engine] Remove unnecessary guard on nil pointer of ValidatorWrapper |
5 years ago |
Edgar Aroutiounian |
dcfffa8e49
|
[availability] Pass over newly created validators (#2329)
|
5 years ago |
Edgar Aroutiounian |
80cd349ab1
|
[availability] Fix regression to skip over harmony run nodes (#2327)
|
5 years ago |
Edgar Aroutiounian |
c4d744e376
|
[double-sign] Provide proof of double sign in slash record sent to beaconchain (#2253)
* [double-sign] Commit changes in consensus needed for double-sign
* [double-sign] Leader captures when valdator double signs, broadcasts to beaconchain
* [slash] Add quick iteration tool for testing double-signing
* [slash] Add webhook example
* [slash] Add http server for hook to trigger double sign behavior
* [double-sign] Use bin/trigger-double-sign to cause a double-sign
* [double-sign] Full feedback loop working
* [slash] Thread through the slash records in the block proposal step
* [slash] Compute the slashing rate
* [double-sign] Generalize yaml malicious for many keys
* [double-sign][slash] Modify data structures, verify via webhook handler
* [slash][double-sign] Find one address of bls public key signer, seemingly settle on data structures
* [slash] Apply to state slashing for double signing
* [slash][double-sign] Checkpoint for working code that slashes on beaconchain
* [slash] Keep track of the total slash and total reporters reward
* [slash] Dump account state before and after the slash
* [slash] Satisfy Travis
* [slash][state] Apply slash to the snapshot at beginning of epoch, now need to capture also the new delegates
* [slash] Capture the unique new delegations since snapshot as well
* [slash] Filter undelegation by epoch of double sign
* [slash] Add TODO of correctness needed in slash needs on off-chain data
* [rpc] Fix closure issue on shardID
* [slash] Add delegator to double-sign testing script
* [slash] Expand crt-validator.sh with commenting printfs and make delegation
* [slash] Finish track payment of leftover slash debt after undelegation runs out
* [slash] Now be explicit about error wrt delegatorSlashApply
* [slash] Capture specific sanity check on slash paidoff
* [slash] Track slash from undelegation piecemeal
* [slash][delegation] Named slice types, .String()
* [slash] Do no RLP encode twice, once is enough
* [slash] Remove special case of validators own delegation
* [slash] Refactor approach to slash state application
* [slash] Begin expanding out Verify
* [slash] Slash on snapshot delegations, not current
* [slash] Fix Epoch Cmp
* [slash] Third iteration on slash logic
* [slash] Use full slash amount
* [slash] More log, whitespace
* [slash] Remove Println, add log
* [slash] Remove debug Println
* [slash] Add record in unit test
* [slash] Build Validator snapshot, current. Fill out slash record
* [slash] Need to get RLP dump of a header to use in test
* [slash] Factor out double sign test constants
* [slash] Factor out common for validator, stub out slash application, finish out deserialization setup
* [slash] Factor out data structure creation because of var lexical scoping
* [slash] Seem to have pipeline of unit test e2e executing
* [slash] Add expected snitch, slash amounts
* [slash] Checkpoint
* [slash] Unit test correctly checks case of validator own stake which could drop below 1 ONE in slashing
* [config] add double-sign testnet config (#1)
Signed-off-by: Leo Chen <leo@harmony.one>
* [slash] Commit for as is code & data of current dump.json
* [slash] Order of state operation not correct in test, hence bad results, thank you dlv
* [slash] Add snapshot state dump
* [slash] Pay off slash of validator own delegation correctly
* [slash] Pay off slash debt with special case for min-self
* [slash] Pass first scenario conclusively
* [slash] 2% slash passes unit test for own delegation and external
* [slash] Parameterize unit test to easily test .02 vs .80 slash
* [slash] Handle own delegation correctly at 80% slash
* [slash] Have 80% slash working with external delegator
* [slash] Remove debug code from slash
* [slash] Adjust Apply signature, test again for 2% slash
* [slash] Factor out scenario in testing so can test 2% and 80% at same time
* [slash] Correct balance deduction on plan delegation
* [slash] Mock out ChainReader for TestVerify
* [slash] Small surface area interface, now feedback loop for verify
* [slash] Remove development json
* [slash] trigger-double-sign consumes yaml
* [slash] Remove dead code
* [slash][test] Factor ValidatorWrapper into scenario
* [slash][test] Add example from local-testing dump - caution might be off
* [slash] Factor out mutation of slashDebt
* [slash][test] Factor out tests so can easily load test-case from bytes
* [slash] Fix payment mistake in validator own delegation wrt min-self-delgation respected
* [slash] Satisfy Travis
* [slash] Begin cleanup of PR
* [slash] Apply slash from header to Finalize via state processor
* [slash] Productionize code, Println => logs; adjust slash picked in newblock
* [slash] Need pointer for rlp.Decode
* [slash] ValidatorInformation use full wrapper
* Fix median stake
* [staking] Adjust MarshalJSON for Validator, Wrapper
* Refactor offchain data commit; Make block onchain/offchain commit atomic (#2279)
* Refactor offchain data; Add epoch to ValidatorSnapshot
* Make block onchain/offchain data commit atomically
* [slash][committee] Set .Active to false on double sign, do not consider banned or inactive for committee assignment
* [effective] VC eligible.go
* [consensus] Redundant field in printf
* [docker] import-ks for a dev account
* [slash] Create BLS key for dockerfile and crt-validator.sh
* [slash][docker] Easy deployment of double-sign testing
* [docker] Have slash work as single docker command
* [rpc] Fix median-stake RPC
* [slash] Update webhook with default docker BLS key
* [docker][slash] Fresh yaml copy for docker build, remove dev code in main.go
* [slash] Remove helper binary, commented out code, change to local config
* [params] Factor out test genesis value
* Add shard checking to Tx-Pool & correct blacklist (#2301)
* [core] Fix blacklist & add shardID check
* [staking + node + cmd] Fix blacklist & add shardID check
* [slash] Adjust to PR comments part 1
* [docker] Use different throw away funded account
* [docker] Create easier testing for delegation with private keys
* [docker] Update yaml
* [slash] Remove special case for slashing validator own delegation wrt min-self-delegate
* [docker] Install nano as well
* [slash] Early error if banned
* [quorum] Expose earning account in decider marshal json
* Revert "Refactor offchain data commit; Make block onchain/offchain commit atomic (#2279)"
This reverts commit
|
5 years ago |
Rongjian Lan |
bbab20442c
|
Change active to elected for validator status (#2320)
|
5 years ago |
Ganesha Upadhyaya |
1a14dce41e
|
use current state for validator information query (#2314)
|
5 years ago |
Edgar Aroutiounian |
cae94683a4
|
[state][staking][availability] Handle availability only in finalize (#2185)
|
5 years ago |
Edgar Aroutiounian |
0a0a6336bc
|
[node][availability] Move validator staking update in writeblockwithstate earlier in body, temp disable availability (#2175)
|
5 years ago |
Edgar Aroutiounian |
6435f4060c
|
[availability] Implement inactive toggle for validators that miss threshold of signing required; (66%) of epoch (#2077)
* [availability] Add function setting Validator as Inactive=true if meets threshold * [availability] Set Validators that did not meet signing threshold to inactive * [availability] Wrap Setting invalid validator only if new epoch forthcoming * [availability] Return right error value * [staking] Add Active field to EditValidator staking txn * [availability] Add validator snapshot type, thread throughout codebase * [availability] Adjust check availability on a per epoch basis * [availability] Address PR comments, simplify collection of validators * [availability] Fold ValidatorSnapshot into ValidatorWrapper * [blockchain] Move update of validator list to after availability removal of validator * [availability] Move availability signing counts to Wrapper, out of Stats * [availability] Record epoch on each validator update as well * [availability] Remove update validator stats in writeblockwithstate, update validator signing in proposal of new block to get correct state written * [availability] Mutate state for validators signing in finalize * [availability] Set unavailable validators in finalize * [consensus] Remove error level for non-error log * [node] No point to broadcast crosslink if we are not in cross link time yet * [availability] Remove moved blocksigners function * [core] Give more context in failure * [availability] Provide set as filter for which validators to track on signing increase and set inactivity * [blockchain] Write snapshot of validator as is * Fix format in staking transaction (#2127) * [availability] Move increment of validator signing counter to before shard state proposal * [availability] Kick out inactive validators right before new shard state proposal * [availability] Keep logic of getting shard members as was * [state-transition] Attach Epoch number to create validator txn Co-authored-by: flicker-harmony <52401354+flicker-harmony@users.noreply.github.com> |
5 years ago |