Tag:
Branch:
Tree:
main
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 }
363 Commits (main)
Author | SHA1 | Message | Date |
---|---|---|---|
nico | 631d384609 |
woop
|
8 months ago |
“GheisMohammadi” |
f3ce9f3ac9
|
return back deleted codes, fix rebase issues, goimports
|
12 months ago |
“GheisMohammadi” |
3fcfad4531
|
fix rebase conflicts
|
12 months ago |
“GheisMohammadi” |
ebd689f1a0
|
remove blockExecution option from insertChain
|
12 months ago |
“GheisMohammadi” |
c1d352b895
|
add pivot to chain accessor, add CurrentFastBlock to blockchain_impl, fix receipt insertion
|
12 months ago |
“GheisMohammadi” |
8f818100a7
|
add InsertReceiptChain to blockchain interface
|
12 months ago |
“GheisMohammadi” |
91034682c7
|
add block insertion without execution to blockchain implementation
|
12 months ago |
Konstantin |
368fc9e07b
|
Removed unused functions and improved locks usage. (#4572)
|
1 year ago |
frozen |
64d7392c3b
|
Clean up.
|
1 year ago |
frozen |
2f23d81879
|
Last mile blocks insert.
|
1 year ago |
Gheis Mohammadi |
d49715e8f7
|
add new functions to p2p stream client for sharing the full states (#4540)
* add new functions to p2p stream client for sharing the full states * remove extra comments, add bytes checking * add client tests for new p2p stream client functions * rename new client functions * complete tests for new functions of p2p stream client |
1 year ago |
Konstantin |
163365625c
|
Rotation fix and update. (#4516)
* fixed memory * error on existed block * Fixed config to pass tests. * Cleanup * Cleanup * Condition to pass tests. |
1 year ago |
Diego Nava |
9a5900d524
|
create the sate as the insertchain does
|
1 year ago |
Konstantin |
6d65d11ac5
|
Small improvements. (#4477)
|
1 year ago |
Max |
14eba6e8a9
|
HIP-30: Set up pre-image generation, recording, export and import (#4494)
* flags: set up preimage flags * hip30: set up preimage import, export, api * save pre-images by default * add pre images api * goimports * commit rpc preimages file * preimages: re-generate them using CLI * add metrics and numbers for pre-images * automate generation after import * move from rpc to core * goimports * add back core/preimages.go file * goimports * goimports * export prometheus metric when no error importing preimage * add preimages flags to rootflags --------- Co-authored-by: Nita Neou (Soph) <soph@harmony.one> |
1 year ago |
“GheisMohammadi” |
2ca061c800
|
initial version of client with required state sync functionalities
|
1 year ago |
Konstantin |
5cef0486df
|
Consensus: removed double initialization. (#4404)
* Removed hardcoded blockchain. * Fix for consensus. * Fix tests. * Fixed panic. * Clean up code. * Fix. * Removed Unused methods. * Set is backup. * Provide consensus to BroadcastCXReceipts. * Registry for CxPool. * CxPool & use Header instead of Block. * Fix conflicts. |
1 year ago |
Konstantin |
78d802428c
|
Consensus: reduce consensus initialization steps. (#4387)
* Removed hardcoded blockchain. * Fix for consensus. * Fix tests. * Fixed panic. * Clean up code. * Fix formatting. * Fixed comment. * Removed unused. * Fix merge issue. |
2 years 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 |
Konstantin |
7d47d9e8a9
|
Rotate external validators for non-beacon shards. (#4373)
* Rotate only non beacon shards. * Rotate all shards, but only hmy validators for beacon. * Fix type. * Revert "Fix type." This reverts commit 0a8b506c763d9f8609abff7395ba32b18e43b149. * Revert "Rotate all shards, but only hmy validators for beacon." This reverts commit 70b09e2de81aa2cbffae3ccdfd4e334e7d938759. * Fixed failed test. * Revert "Revert "Rotate all shards, but only hmy validators for beacon."" This reverts commit 66cfaa9817488be60ed5b5cfee1fe833ede237c8. * Frequency by slots count. * Fix config. * First validator produce rest blocks. * Updated. * Add lock. |
2 years ago |
Casey Gardiner |
d25b6c6ee2
|
Mainnet Release Candidate 2023.1.2 (#4376)
* 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. * Bump github.com/aws/aws-sdk-go from 1.33.0 to 1.34.0 Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.33.0 to 1.34.0. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.34.0/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.33.0...v1.34.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump github.com/ipld/go-ipld-prime from 0.9.0 to 0.19.0 Bumps [github.com/ipld/go-ipld-prime](https://github.com/ipld/go-ipld-prime) from 0.9.0 to 0.19.0. - [Release notes](https://github.com/ipld/go-ipld-prime/releases) - [Changelog](https://github.com/ipld/go-ipld-prime/blob/master/CHANGELOG.md) - [Commits](https://github.com/ipld/go-ipld-prime/compare/v0.9.0...v0.19.0) --- updated-dependencies: - dependency-name: github.com/ipld/go-ipld-prime dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump golang.org/x/net from 0.3.0 to 0.7.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.3.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.3.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Small fixes. * 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`. * 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 |
frozen | 597ba2d6f1 |
Fix tests.
|
2 years ago |
frozen | 8c2ff803f7 |
Removed engine dependency.
|
2 years ago |
frozen | 998bb642c5 |
Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`.
|
2 years ago |
frozen | 50ed1c666b |
Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`.
|
2 years ago |
Konstantin |
29bcc0c48b
|
Consensus accepts blockchain as a parameter. (#4296)
* Consensus doesn't require anymore `Node` as a circular dependency. * Proper blockchain initialization. * Removed double initialization. |
2 years ago |
Diego Nava |
1761a3ae64
|
fix go imports
|
2 years ago |
Lutty | 21bd53938d |
rebase
|
2 years ago |
Diego Nava | 3c7b2a8766 |
fix go imports
|
2 years ago |
lutty | 720f9a6a02 |
tested tikv code
|
2 years ago |
Konstantin |
0753c94c2b
|
Epoch syncing - syncing only epoch blocks. (#4070)
* Epoch syncing - syncing only epoch blocks.
* Fix go test, added command to run.
* Block signature validation.
* Support getting block by height.
* Fix to compile.
* Http method.
* Generate fix.
* Install protoc-gen-go-grpc.
* Fix sync, additional timeouts, fix epoch.
* Chain behaviour options, optional state validation on blockchain initialization.
* Added limit to avoid abuse, small fixes.
* Fix duplicate code.
* Fix isInSyn.
* Fix method call.
* Removed additional block sending.
* Fix in sync.
* Code clean up.
* Fix beacon chain func.
* Return back Beaconchain.
* Fix sending only epoch blocks.
* Fix failed startup with validator.
* Increase recv message size.
* Remove peer.
* Add logs.
* Add logs.
* Fix msgf call.
* Epoch syncing - syncing only epoch blocks.
* Block signature validation.
* Fix sync, additional timeouts, fix epoch.
* Chain behaviour options, optional state validation on blockchain initialization.
* Support getting block by height.
* Http method.
* Fix duplicate code.
* Fix isInSyn.
* Added limit to avoid abuse, small fixes.
* Fix method call.
* Removed additional block sending.
* Fix in sync.
* Small fix.
* Code clean up.
* Fix beacon chain func.
* Return back Beaconchain.
* Fix sending only epoch blocks.
* Fix failed startup with validator.
* Increase recv message size.
* Remove peer.
* Add logs.
* Fix msgf call.
* Sending crosslinks from beacon to non-beacon chains.
* Receiving crosslinks.
* Broadcast.
* Fix comment.
* Crosslink signal.
* Crosslink hardbeat signal receiving.
* Sending crosslinks from beacon to non-beacon chains.
* Sending crosslinks from beacon to non-beacon chains.
* Broadcast.
* Fix comment.
* Crosslink signal.
* Crosslink signal.
* Add comment to run tests.
* Fix comments.
* Fix comments.
* Fix review comments.
* Updated with last crosslink heart beat signal.
* Merged crosslink signal.
* Clean up code.
* Add logs for cl debug.
* Stop iterate on receiving result.
* Add logs.
* Fix in sync check.
* Fix reconnect problems.
* Fix tests and reduce dependency.
* Updated with main.
* Fix review comments.
* Changed to compare epochs.
* Fix crosslinks usage.
* Fix initialization.
* Epoch chain implementation.
* Legacy sync by default.
* Revert "Legacy sync by default."
This reverts commit
|
2 years ago |
Konstantin |
4eabc120b1
|
Blockchain interface. (#4214)
* Blockchain interface. * Fix comments, remove unused. Co-authored-by: Konstantin <k.potapov@softpro.com> |
2 years ago |
PeekPI |
2367a0da23
|
align eip-1898: support block number or hash on state-related methods (#4181)
* align eip-1898: support block number or hash on state-related methods * fix compatibility of BlockNumberOrHash * fix unit test |
3 years ago |
peekpi | 9138b10757 |
rename RawStake() to RawStakePerSlot() and add commnet
|
3 years ago |
peekpi | 97879960e2 |
move slot limit code to prepareOrders() and fix RawStake of validator
|
3 years ago |
peekpi | cbeddf6a0e |
fix RawStake of HIP16
|
3 years ago |
Konstantin | 23d38db744 |
Remove GetAllDelegationInformation possibility to send all data at once without pagination.
|
3 years ago |
Konstantin | 97eb8d972f |
Go vet fixed.
|
3 years ago |
Frozen |
0dbf490477
|
Removed wg. (#4098)
Co-authored-by: Konstantin <k.potapov@softpro.com> |
3 years ago |
harjas | 77f810f607 |
Remove metrics(not computed)
|
3 years ago |
harjas | 9e12516327 |
Add chain metrics
|
3 years ago |
Lutty | 622c0c6a44 |
add prune beacon chain feature
|
3 years ago |
Max |
d500c4ede6
|
Resolve harmony-one/bounties#77: Staking precompiles (#3906)
* Resolve harmony-one/bounties#77: Staking precompiles Create write capable precompiles that can perform staking transactions Add hard fork logic (EpochTBD) for these precompiles Tests for new code with at least 80% unit test coverage Staking library + tests in MaxMustermann2/harmony-staking-precompiles * Fix small typo in comment * Run goimports on files to fix Travis * Do not activate staking precompile on shard 0 * Cascade readOnly to WriteCapableContract * No overlap in readOnly + writeCapable precompiles * Use function selector instead of directive From Solidity, use abi.encodeWithSelector and match it against the exact ABI of the functions. This allows us to remove the need for a directive (32) being encoded, and thus saves 28 bytes of data. * Do not allow contracts to become validators As discussed with Jacky on #3906 * Merge harmony-one/harmony/main properly this time * Run goimports * Update gas calculation for staking precompile Please see comment in core/vm/contracts_write.go RequiredGas * Do not allow contract to become validator (2/2) * Cache StakeMsgs from precompiled transactions Add the StakeMsgs to ProcessorResult and cascade them in insertChain * Remove ContractCode fields from validators Since smart contracts can no longer beecome validators, this field is superfluous. Remove it from the Wrapper structure, and do not assign it a value when creating a validator. Build and goimports checked * Update comments in response to feedback (1) Comments to start with function names (2) Comments for public variables (3) Comment to match function name RunPrecompiledContract (4) Clarify that CreateValidatorFunc + EditValidatorFunc are still used * Fix Travis build by reverting rosetta change * Add revert capability to 3 staking tx types - Delegate - Undelegate - CollectRewards * Fix build: Update evm_test for ValidatorWrapper * Merge main into harmony-staking-precompiles * Add gas for precompile calls and allow EOA usage - Each time the precompile is called, charge the base gas fee plus data cost (if data can be parsed successfully). A gas fee is added to prevent benevolent contract deployers from subsidizing the staking transactions for EOAs through repeated assembly `delegatecall`. - Allow EOAs to use the staking precompile directly. Some changes to the Solidity library are associated with this change. - Remove bytes from parsing address, since the ABI unpacks it into an address format correctly. - Add or update tests. Test coverage report to be attached to the PR shortly. * Run goimports * Check read only and write capable for overlap * Handle precompile stakeMsgs for block proposer The staking precompile generates staking messages which are cascaded to the block via the EVM in `state_processor.go`. This change cascades them in `worker.go` to allow block proposers and block verifiers to keep the same state. * Run goimports for cf2dfac4081444e36a120c9432f4e.. * Update staking precompile epoch to 2 for localnet Bring it in line with staking epoch. Change effects all configurations except mainnet and testnet. `goimports` included. * Add read only precompile to fetch the epoch num * Move epoch precompile to 250 * precompiles: left pad the returned epoch number * chainConfig: check epochs for precompiles panic if staking precompile epoch < pre staking epoch * Add staking migration precompile - Lives at address 251 - Migrates delegations + pending undelegations from address A to B - Useful if address A is hacked - Charges gas of 21k + cost of bytes for two addresses - Does not remove existing delegations, just sets them to zero. Replicates current undelegate setup - Unit tests and `goimports` included. Integration test following shortly in MaxMustermann2/harmony-staking-precompiles * Migration precompile: merge into staking Merge the two precompiles into one, add gas calculation for migration precompile. Move epoch precompile to 251 as a result. When migrating, add undelegations to `To`'s existing undelegations, if any match the epoch. * Add migration gas test, remove panic, add check In response to review comments, add tests for migration gas wherein there are 0/1/2 delegations to migrate. Add the index out of bound check to migration gas calculator and remove panics. Lastly, re-sort migrated undelegations if no existing undelegation in the same epoch was found on `To`. * Move undelegations sorting to end of loop |
3 years ago |
Lutty | 3634c43812 |
add prune beacon chain feature
|
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 |
d442ba9efc
|
Cache block processing results and reuse during block commitment to db (#3905)
* Cache block processing results and reuse during block commitment to db * fix comments |
3 years ago |
Jacky Wang | ecd3b950d4 |
[rpc] more update in rpc
|
3 years ago |
peekpi | e86282408d |
[tracer] fix bug of nil reference
|
3 years ago |
peekpi | de5546e85e |
[core] blockchain: insert trace event into PostChainEvents
|
3 years ago |
peekpi | 404b861f81 |
[tracer][explorer] use event to send trace data to explorer
|
3 years ago |