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 }
74 Commits (main)
Author | SHA1 | Message | Date |
---|---|---|---|
nico | 631d384609 |
woop
|
8 months ago |
Gheis Mohammadi |
ae578ba998
|
update deprecated ioutil, improve local accounts (#4527)
|
1 year ago |
Soph |
d2a34630ef
|
Sync dev with main branch ( v2023.2.1 hotfix ) (#4435)
* 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 |
6577b0bd06
|
[hotfix] fix code hash conflicts (#4431)
* fix code hash issue * goimports |
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 |
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 |
Gheis Mohammadi |
4760458732
|
update all ethereum rawdb pointers to use harmony rawdb (#4395)
|
2 years ago |
Gheis Mohammadi |
d21dc7f200
|
Upgrade rawdb and statedb codes to add the latest functionalities of ethdb (#4374)
* added bloom filter * upgrade rawdb and statedb * change var name and remove extra comments * return back fake storage in case if we need it for test later * add the previous change back * remove some extra entries from go.mod * fix WritePreimages to use batch * mark unused functions which are ported over from eth --------- Co-authored-by: Casey Gardiner <117784577+ONECasey@users.noreply.github.com> |
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 |
MaxMustermann2 | ab4a10547a |
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. |
2 years ago |
Casey Gardiner |
a32a1755b3
|
Release Candidate hotfix: dev -> main (#4333)
* Rebase dev branch to current main branch (#4318) * add openssl compatibility on m2 chips using darwin (#4302) Adds support for OpenSSL on MacOS Ventura using m2 chips. * [dumpdb] ensure each cross link is dumped (#4311) * bump libp2p to version 0.24.0 and update its dependencies and relevant tests (#4315) * Removed legacy syncing peer provider. (#4260) * Removed legacy syncing peer provider. * Fix localnet. * Fix migrate version. * Rebased on main. * Fix formatting. * Remove blockchain dependency from engine. (#4310) * Consensus doesn't require anymore `Node` as a circular dependency. * Rebased upon main. * Removed engine beacon chain dependency. * Fixed nil error. * Fixed error. * bump libp2p to version 0.24.0 and update its dependencies and relevant tests * fix format, remove wrongly added configs * add back wrongly deleted comment * fix travis go checker Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com> Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> * bump libp2p to version 0.24.0 and update its dependencies and relevant tests (#4315) * Removed legacy syncing peer provider. (#4260) * Removed legacy syncing peer provider. * Fix localnet. * Fix migrate version. * Rebased on main. * Fix formatting. * Remove blockchain dependency from engine. (#4310) * Consensus doesn't require anymore `Node` as a circular dependency. * Rebased upon main. * Removed engine beacon chain dependency. * Fixed nil error. * Fixed error. * bump libp2p to version 0.24.0 and update its dependencies and relevant tests * fix format, remove wrongly added configs * add back wrongly deleted comment * fix travis go checker Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com> Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> * Fix for consensus stuck. (#4307) * Added check for block validity. * Starts new view change if block invalid. * Revert "Starts new view change if block invalid." This reverts commit e889fa5da2e0780f087ab7dae5106b96287706db. * staged dns sync v1.0 (#4316) * staged dns sync v1.0 * enabled stream downloader for localnet * fix code review issues * remove extra lock Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> * add description for closing client and change randomize process to ma… (#4276) * add description for closing client and change randomize process to make sure only online nodes are added to sync config * fix sync test * fix legacy limitNumPeers test * add WaitForEachPeerToConnect to node configs to make parallel peer connection optional Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> * Small fixes and code cleanup for network stack. (#4320) * staged dns sync v1.0 * enabled stream downloader for localnet * fix code review issues * remove extra lock * staged dns sync v1.0 * Fixed, code clean up and other. * Fixed, code clean up and other. * Fixed, code clean up and other. * Fix config. Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> * Fix not disable cache in archival mode (#4322) * Feature registry (#4324) * Registry for services. * Test. * Reverted comment. * Fix. * Slash fix (#4284) * Implementation of new slashing rate calculation * Write tests for then new slashing rate calculation * Add engine.applySlashing tests * fix #4059 Co-authored-by: Alex Brezas <abresas@gmail.com> Co-authored-by: Dimitris Lamprinos <pkakelas@gmail.com> * Bump github.com/aws/aws-sdk-go from 1.30.1 to 1.33.0 (#4325) (#4328) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.30.1 to 1.33.0. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.33.0/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.30.1...v1.33.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github.com/btcsuite/btcd from 0.21.0-beta to 0.23.2 (#4327) (#4329) Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.21.0-beta to 0.23.2. - [Release notes](https://github.com/btcsuite/btcd/releases) - [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES) - [Commits](https://github.com/btcsuite/btcd/compare/v0.21.0-beta...v0.23.2) --- updated-dependencies: - dependency-name: github.com/btcsuite/btcd dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix epoch chain initialization issue (#4331) * Fix getting epoch number. (#4279) * feat: update dockerfile with some enhacement (#4250) * feat: update dockerfile with some enhancement * [docker] fix: update golang version Co-authored-by: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> * [build] github action update (#4336) * [ops] update github action files * [ops] add debug message in github action * [ops] fix GPG action variable * [ops] fix macos-12 build * [ops] fix macos-12 build * [ops] fix macos-12 build * [ops] fix macos-12 build * [ops] fix macos-12 build * [ops] fix macos-12 build * [cmd] update year version (#4334) * chore(build): upgrade golang to 1.19 (#4335) * chore(build): upgrade golang to 1.19 * chore(build): run `go mod tidy` * chore(build): run `goimports -w -e ${file}` * chore(build): revert github ci changes * chore(build): pin golang version to 1.19.5 * chore(build): fix protoc version on gen files * chore(build): fix protoc-gen-go to v1.26.0 (#4337) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Max <82761650+MaxMustermann2@users.noreply.github.com> Co-authored-by: Gheis <36589218+GheisMohammadi@users.noreply.github.com> Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com> Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> Co-authored-by: Danny Willis <102543677+dannyposi@users.noreply.github.com> Co-authored-by: PeekPI <894646171@QQ.COM> Co-authored-by: Alex Brezas <abresas@gmail.com> Co-authored-by: Dimitris Lamprinos <pkakelas@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gheis Mohammadi <Gheis.Mohammadi@gmail.com> Co-authored-by: Jason Yi <90701258+jasonyic@users.noreply.github.com> Co-authored-by: Soph <35721420+sophoah@users.noreply.github.com> |
2 years ago |
Max |
b300a4ec4d
|
chore(build): upgrade golang to 1.19 (#4335)
* chore(build): upgrade golang to 1.19 * chore(build): run `go mod tidy` * chore(build): run `goimports -w -e ${file}` * chore(build): revert github ci changes * chore(build): pin golang version to 1.19.5 * chore(build): fix protoc version on gen files |
2 years ago |
Konstantin |
3175d8aab3
|
Bump go1.18. (#4107)
* Bump go1.18. * Build tags. * Go vet errors fix. * Fix imports. * Fix imports. * Fix go vet. * Fix protobuf. * Fix file gen. * Fix tools. * Travis fix. * Travis fix. * Travis fix. * Fix dependency. * Clean up. * Fix rosetta test. * Add comment to run tests. * Add comment to run tests. * 1.18.2 * Fix rosetta script. * Fix docker version. * Fix imports. * Fix formatting. * Fix formatting. Co-authored-by: Konstantin <k.potapov@softpro.com> |
2 years ago |
MaxMustermann2 |
e5b3b2fa09
|
[test] fix: add `CanTransfer` function to tests
|
3 years ago |
MaxMustermann2 |
500cabfae2
|
[core] fix: Move existing CXReceipt check to top
|
3 years ago |
MaxMustermann2 |
ada5699cc4
|
[core] fix: cross shard precompile gas to 0...
...and ensure transfers from the precompile address can be made before executing them. Since we are now blocking multiple `CXReceipts` per transaction explicitly, it doesn't make sense to be wary of contracts subsidizing cross shard transfers for end users via `delegatecall`. It is then safe to remove the gas charge for the precompile. Secondly, ensure that there are enough funds on the precompile via `CanTransfer` as part of the sanity check. |
3 years ago |
MaxMustermann2 |
c9768c9d4e
|
[core] fix: block multiple cx xfers per tx
|
3 years ago |
Gheis |
b161a39f59
|
[core] fix unexpected chain id (#4129) (#4154)
* fix unexpected chain id (https://github.com/harmony-one/harmony/issues/4129) * update epoch numbers for ChainId fix * updated ChainID Epoch for test net * align comment with other comments * fix the build using goimports Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”> |
3 years ago |
MaxMustermann2 |
961e2b29e4
|
[core] fix: Use contract object methods
Instead of hardcoding precompile address and cascading `msg.Value` from evm to the precompile, use methods like `Address()` and `Value()`. |
3 years ago |
MaxMustermann2 |
75017bfbad
|
[core] feat: Add cross shard transfer precompile
...for native tokens only, and not for smart contracts (which will be added later). Resolves #4132 and requires a hard fork, currently scheduled at EpochTBD on main and test nets, but epoch 1 (after AcceptsCrossTx) on other nets. The precompile is at address 249 and the method has the signature `crossShardTransfer(uint256 amount, address to, uint32 toShardID)`. It requires a transfer of the `amount` to the precompile address first, in the form of `msg.value`, and cascades a cross shard receipt to the network when executed. At this stage, it is blocked for use by smart contracts by checking that there is no code at the address, and that the address is not a validator. Documentation for Python integration tests to follow. |
3 years ago |
Konstantin | 97eb8d972f |
Go vet fixed.
|
3 years ago |
haodi | 3316a1d8b5 |
fixed test case
|
3 years ago |
lutty | dfe0fcf7e4 |
fix goimports
|
3 years ago |
lutty | 219b703714 |
fix goimports
|
3 years ago |
Lutty | 348817aa0d |
support rosetta tracer
|
3 years ago |
Lutty | a3875d08a3 |
support rosetta tracer
|
3 years ago |
Lutty | d9e933c7f3 |
support rosetta tracer
|
3 years ago |
Haodi |
832658480b
|
fixed rosetta issues (#4034)
* rosetta test and fix bug Co-authored-by: lutty <lutty@lutty.me> |
3 years ago |
Rongjian Lan |
b4b316197a
|
disable migrate (#4035)
* disable migrate * comment out more migrate code * fix tests * fix test * fix tests Co-authored-by: Rongjian Lan <rongjianlan@Rongjians-MacBook-Pro-2.local> |
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 |
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 |
peekpi | b2f9b06d04 |
add eth tx hash into stateDB memory objefct
|
3 years ago |
Simsonraj Easvarasakthi |
70d958370f
|
Implementation of SHA3-256 FIPS 202 hash precompile and EcRecover Uncompressed public key precompile to integrate with ICON blockchain (#3801)
* SHA3-256 FIPS-202 precompiled contract implementation * go fmt * Added precompiles address under VRF * added sha3 prcompiles to Istanbul * fix goimports error * Updated the sha3 & ecreceover pk contract address to 253 & 254 respectively * Added a new PrecompiledContractsSHA3FIPS and add forking epoch & Changed the gas prices for sha3 Co-authored-by: Ganesha Upadhyaya <ganeshrvce@gmail.com> |
3 years ago |
Rongjian Lan |
c9ec6477bc
|
Add fork condition for datacopy bug in evm (#3858)
|
3 years ago |
Rongjian Lan |
f741ca81c2
|
Add patch for eth bug GHSA-9856-9gg9-qcmq (#3856)
|
3 years ago |
Rongjian Lan |
e232c3ec41
|
Enable history vrf in testnet at epoch 74384 (#3854)
* Enable history vrf in testnet * allow input int of any size |
3 years ago |
Rongjian Lan |
305ef3514a
|
add history vrf reading capability on vrf precompile (#3850)
* precompile for history vrfs * remove prints |
3 years ago |
Rongjian Lan |
b0bf39861d
|
Add min commission rate logic (#3715)
* Add min commission rate logic |
4 years ago |
Rongjian Lan | 87fb0116e5 |
Add vrf as a precompile in evm
|
4 years ago |
peekpi | 011d78b530 |
[tracers][vm] expose transaction query api for js vm.
|
4 years ago |
Sebastian Johnsson | 1d71d2b7f0 |
Fix gas estimation for sc calls
|
4 years ago |
Rongjian Lan |
d1f1103b02
|
Resolves issues on eth comaptible txns (#3500)
* make eth txn works * Add forking logic for ethereum compatible txn support |
4 years ago |
Rongjian Lan |
d6e98436f4
|
Add EthChainID and update signers accordingly for processing eth txns. (#3497)
* allow eth hmy txn conversion * Add EthChainID and update signers for it * resolve comments about hash() |
4 years ago |
Rongjian Lan |
9381b95cdc
|
Remove special eth txn in block and block proposal logic. (#3496)
* Add ethereum transaction support * fix fmt * fix lint * add new block body fork logic * add back deleted code * lower case block version const * add eth txn into new version of block * refactor back * refactor more * fix test code * Fix build * Fix build * revert eth txn in block and block proposal * fix build * fix build * fix build |
4 years ago |
Rongjian Lan |
666033c3eb
|
Add InternalTransaction and CoreTransaction interface to abstract txns (#3494)
* Add ethereum transaction support * fix fmt * fix lint * add new block body fork logic * add back deleted code * lower case block version const * add eth txn into new version of block * refactor back * refactor more * fix test code * Fix build * Fix build |
4 years ago |
Daniel Van Der Maden |
6b143bb048
|
[Rosetta] Track internal transactions (#3475)
* [rosetta] Refactor operations & prep for internal tx exposure * Remove gas op relation for tx operations. Gas is for submission & processing the tx, thus not really related to the amount being transferred * Make optional starting op a ptr to a uint to keep consistent * Reorg file for consistency of fn placement * Rename functions for clarity * Make getContractCreationNativeOperations consume getBasicTransferOperations for consistency * Remove invariant doc as it does not apply anymore Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Add framework for parsing traced txs * Define ContractInfo struct for FormatTransaction * Add tx trace helper function defs & propagate type defs * Add a GetTransactionStatus helper fn for Operation formatting/creation * Add wrapper function, getContractTransferNativeOperations, to get internal operations Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Implement transaction tracer Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [tracer] Add CallerAddress & CodeAddress to tracer logs Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [tracer] Remove ptr to slice & map in StructLogRes Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Implement getContractInternalTransferNativeOperations * Add ContractAddress to ContractInfo for future usages (i.e: erc20 parsing) * Only check for contract address if there is tx data in BlockTransaction Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Fix status report for contract related txs Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [tracer] Expose contract address instead of code address Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Add trace cache & update TODO * Trace any PLAIN transaction instead of only transactions with data. This is to account for fall back contract fn calls & ignore staking data. Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Make internal tx formatter not return err on nil exec result Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * Fix lint Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Fix tests Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Add internal tx unit tests * Fix tx data len check for contract related transfers as a transaction with len 0 data can happen for a contract (and fail) due to fall back operations. Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Update invariant comment Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Expose mutually exclusive ops + update docs & tests Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> * [rosetta] Fix docs and err msgs Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu> |
4 years ago |
Rongjian Lan |
95df383def
|
do not create new account for cx txn (#3391)
|
4 years ago |
Rongjian Lan |
4452b36ee4
|
Rollup evm to geth v1.9.9 Muir Glacier (#3356)
* Rollup evm to geth v1.9.9 Muir Glacier * fix go gen * update intrinsic gas for istanbul * Update statedb.Commit * revert go gen result * revert protobuf version * update protobuf * update go gen files * set testnet epoch for evm upgrade |
4 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 |