Jianrong
249d2b5b6d
implemente proposeblock handler and SyncInfo handler
2021-12-30 11:12:21 +11:00
Jianrong
163ed0fab3
add ProcessQC tests
2021-12-30 11:12:18 +11:00
Jianrong
bd60e1b0cf
add ProcessQC implementation
2021-12-30 11:00:20 +11:00
Liam
b9068974f5
update network layer and add handler functions ( #23 )
...
* update network layer and add handler functions
* fix test syntax error
2021-12-30 11:00:20 +11:00
Liam
a1b77f3ca8
Implement BFT Message receiver ( #13 )
...
* fix or skip tests due to PR-136 changes
* add bft receiver functions
* add bft receiver functions
* rename tc to TimeoutCert
* implement more functions
* New struct in consensus/XDPoS/utils/types.go, util functions, and test. (#14 )
* define vote, timeout, sync info, qc, tc, extra fields in types.go, add test in types_test.go
* add json tag in types.go, refine encoder decoder of extra fields
* refactor types.go utils.go
* re-write types, comments
* add Hash SigHash for types, and tests
* define Round type
* remove unnecessary logs
* add temp functions
* add v2 engine functions placeholder
* typo fix on the consensus v2 function placeholders
* add countdown timer
* make initilised private to countdown
* push verify function
* add test on receiving vote
* revert type change
* add async on broadcast function
* add quit initial
* fix test
Co-authored-by: Jianrong <wjrjerome@gmail.com>
Co-authored-by: wgr523 <wgr523@gmail.com>
2021-12-30 11:00:20 +11:00
olumuyiwadad
afe58d79fc
fix api trace block & Change option pending block.
2021-11-11 18:49:57 +05:30
Jianrong
e34311ff45
Remove unused consensus v1 methods
2021-10-10 16:04:34 +11:00
Jianrong
48be4e4ca7
Move consensus hooks to its own package
2021-10-10 16:04:32 +11:00
Jianrong
0aec2a1e9e
Seperate hooks from XDPoS adaptor
2021-10-10 16:02:19 +11:00
Jianrong
fcbc5a28e1
refactor XDPoS to accommodate multiple consensus engine versions
2021-10-10 16:02:16 +11:00
olumuyiwadad
cf18ceba33
Merge branch 'forking-incident-fix' of https://github.com/hash-laboratories-au/XDPoSChain into hash-laboratories-au-forking-incident-fix
2021-09-23 17:01:19 +05:30
olumuyiwadad
b5abbfed79
new EVM Upgrade
...
- Solidity Upgraded up to v0.8.0
- Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
a41658640f
hotfix etherbase/coinbase
...
Send tx sign for block number to smart contract blockSigner.
2021-09-17 18:18:55 +05:30
olumuyiwadad
571c41f891
FIx Bad block error.
2021-09-17 17:59:06 +05:30
Jianrong
7b7e34ae00
Fix XDC forking incident with tests
2021-08-29 14:20:01 +10:00
Jianrong
0fdab2027c
add linting as the first CI task
2021-08-07 14:27:08 +10:00
dev-vadim
dbe8c9d984
upgrade XDC.Network with v1.8.27.
2020-12-23 16:32:06 +05:30
diglspacedavid
474cc37036
upgrade codebase with ethereum:v1.8.13
2020-11-23 13:40:30 +05:30
AnilChinchawale
80cd2d3871
added eth_client func.
2020-08-31 17:52:03 +05:30
parmarrushabh
3e5f4d54a8
Hot_Fix Bad block Error
2019-04-25 12:11:30 +05:30
Péter Szilágyi
d8787230fa
eth, les, light: enforce CHT checkpoints on fast-sync too
2019-04-17 14:56:58 +03:00
Martin Holst Swende
e872ba7a9e
eth, les, geth: implement cli-configurable global gas cap for RPC calls ( #19401 )
...
* eth, les, geth: implement cli-configurable global gas cap for RPC calls
* graphql, ethapi: place gas cap in DoCall
* ethapi: reformat log message
2019-04-08 15:15:13 +03:00
AnilChinchawale
00c46851a2
downloader error fix
2019-03-26 14:54:16 +05:30
parmarrushabh
7e491a582b
penalties returned at tip fork
2019-03-26 14:25:03 +05:30
parmarrushabh
4af57cc070
case m2 down affect to m1.
2019-03-25 12:19:25 +05:30
AnilChinchawale
ef94c38a68
penalties returned
2019-03-25 11:52:00 +05:30
AnilChinchawale
ed6533e092
Added "xdc" prefix in address
2019-03-17 16:14:42 +05:30
AnilChinchawale
c3c32ce113
Updated files.
2019-03-12 15:57:58 +05:30
parmarrushabh
b493f4b6ca
hot fix
2019-03-03 15:36:33 +05:30
MestryOmkar
1861c13bcd
fetcher-hotfix
2019-03-02 15:10:35 +05:30
parmarrushabh
6adee64867
handle SignHash error
2019-02-27 14:58:16 +05:30
parmarrushabh
147e1f0baf
create new func penalties for hard fork
2019-02-19 17:25:31 +05:30
Martin Holst Swende
631e2f07f6
eth: make tracers respect pre- EIP 158/161 rule
2019-02-09 17:35:54 +01:00
AnilChinchawale
29cb1de084
backend added with latest code
2019-01-28 04:50:18 +05:30
AnilChinchawale
7f18c84ea5
changes added in web3,bignumber
2019-01-27 04:49:00 +05:30
AnilChinchawale
9210dd4a76
Updated ethstats for XinFin Network
2019-01-26 04:43:22 +05:30
AnilChinchawale
c9889f2ad7
Changes added in tracers
2019-01-24 04:43:26 +05:30
gary rong
d5cad488be
core, eth: fix database version ( #18429 )
...
* core, eth: fix database version
* eth: polish error message
2019-01-11 13:49:12 +02:00
gary rong
e8ff318205
eth/tracer: extend create2 ( #18318 )
...
* eth/tracer: extend create2
* eth/tracers: fix create2-flaw in prestate_tracer
* eth/tracers: fix test
* eth/tracers: update assets
2019-01-05 21:26:50 +01:00
Dave McGregor
33d233d3e1
vendor, crypto, swarm: switch over to upstream sha3 package
2019-01-04 09:26:07 +02:00
Wenbiao Zheng
81c3dc728f
eth/downloader: progress in stateSync not used anymore ( #17998 )
2018-12-21 23:36:14 +01:00
Martin Holst Swende
5f251a6448
downloader: fix edgecase where returned index is OOB for downloader ( #18335 )
...
* downloader: fix edgecase where returned index is OOB for downloader
* downloader: documentation
Co-Authored-By: holiman <martin@swende.se>
2018-12-20 10:46:08 +01:00
Martin Holst Swende
83a9a73b89
cmd/geth, core, eth: implement Constantinople override flag ( #18273 )
...
* geth/core/eth: implement constantinople override flag
* les: implemnent constantinople override flag for les clients
* cmd/geth, eth, les: fix typo, move flag to experimentals
2018-12-11 14:19:03 +02:00
Péter Szilágyi
31b3334922
cmd/utils, eth: minor polishes on whitelist code
2018-12-10 14:47:01 +02:00
Ryan Schneider
48b70ecff1
cmd, eth: Add support for --whitelist <blocknum>=<hash>,... flag
...
* Rejects peers that respond with a different hash for any of the passed in block numbers.
* Meant for emergency situations when the network forks unexpectedly.
2018-12-10 14:30:06 +02:00
Péter Szilágyi
0983d02aa9
eth, internal/web3ext: tiny polishes in tracers
2018-12-10 12:33:50 +02:00
Martin Holst Swende
42a914a84f
cmd/evm, core/vm, eth: implement api methods to do stdjson dump to local filesystem
2018-12-10 12:33:50 +02:00
Max Sistemich
dfa16a3e4e
eth/tracers: fixed incorrect storage from prestate_tracer ( #18253 )
...
* eth: fixed incorrect storage from prestate_tracer
* eth/tracers: updated assets.go
2018-12-10 11:17:31 +02:00
MestryOmkar
0bb2ba1116
update minGasPrice in SuggestPrice
2018-12-10 11:09:51 +05:30
Paweł Bylica
de39513ced
core, internal, eth, miner, les: Take VM config from BlockChain ( #17955 )
...
Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config`
would be taken so as to set some options, based on the default configuration. If some extra
configuration switches were passed to the blockchain, those would be ignored.
This PR adds a function to get the config from the blockchain, and this is what is now used
for RPC calls.
Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244
for the details of the discussion.
2018-12-06 14:34:49 +01:00
Péter Szilágyi
174083c3ae
eth/downloader: fix light client cht binary search issue
2018-11-28 13:46:13 +02:00
Felix Lange
b24ef5e05d
eth: increase timeout in TestBroadcastBlock ( #18064 )
2018-11-23 11:14:09 +02:00
parmarrushabh
8d7572ef1c
hot fix
2018-11-22 15:49:29 +05:30
AnilChinchawale
428d3e2f9c
fix duplicate hook rewards with --announceTxs
2018-11-22 12:43:16 +05:30
MestryOmkar
4ab49f2752
goroutine get signers
2018-11-19 12:20:40 +05:30
AnilChinchawale
e8336d2770
evm mem db
2018-11-19 12:11:07 +05:30
parmarrushabh
51c88fe8ce
create new api get reward
2018-11-19 11:21:42 +05:30
Rahulraj04
01583f3548
print err
2018-11-17 16:41:00 +05:30
Rahulraj04
6c67be797b
update logging
2018-11-17 16:37:14 +05:30
parmarrushabh
5501a5707c
fixed
2018-11-17 16:15:25 +05:30
parmarrushabh
f5e8c999a2
set block difficulty belong to creator turn
2018-11-17 12:52:10 +05:30
Rahulraj04
9087c0852b
reduce timed out when sync block
2018-11-17 12:22:40 +05:30
parmarrushabh
9f36d37558
Parallel process block from fetcher
2018-11-17 12:02:43 +05:30
Péter Szilágyi
accc0fab4f
core, eth/downloader: fix ancestor lookup for fast sync
2018-11-16 13:21:20 +02:00
Martin Holst Swende
51b2f1620c
downloader: different sync strategy
2018-11-16 11:54:36 +02:00
mr_franklin
b91766fe6d
eth: fix comment typo ( #18114 )
...
* consensus/clique: fix comment typo
* eth,eth/downloader: fix comment typo
2018-11-15 16:31:24 +02:00
Péter Szilágyi
434dd5bc00
cmd, core, eth, light, trie: add trie read caching layer
2018-11-15 12:22:13 +02:00
AnilChinchawale
5709546dfd
filter txs before add to pool
2018-11-14 11:32:40 +05:30
parmarrushabh
abd494055b
fix err download block on masternode
2018-11-14 11:29:48 +05:30
parmarrushabh
52ae30023a
refactor RW & pairRW connect for block , transaction
2018-11-14 10:40:05 +05:30
mr_franklin
4fecc7a3b1
eth: fix minor grammar issue in comment ( #18091 )
2018-11-13 11:57:46 +02:00
MestryOmkar
d3fc7da872
Fixed gasprice minimum 2500 for get gasprice api.
2018-11-12 16:09:28 +05:30
MestryOmkar
bbadba469b
change difficulty block in XDPoS
2018-11-12 15:52:55 +05:30
parmarrushabh
176b51f1f8
ignore faster with block no validator m2
2018-11-12 15:41:24 +05:30
parmarrushabh
f586154a8e
fix error transaction underpriced when add sign tx to pool(full)
2018-11-12 13:08:55 +05:30
MestryOmkar
5111364215
fix error double validation : m2 not validate body before verify block
2018-11-12 12:39:52 +05:30
AnilChinchawale
4211d56ad0
Fixed reward inflation and add unit test.
2018-11-12 12:03:22 +05:30
MestryOmkar
de7c60ed49
sleep time when fetch receive future block
2018-11-12 11:45:26 +05:30
parmarrushabh
3268d372a0
fix error fatal error: concurrent map read and map write
2018-11-12 11:39:43 +05:30
parmarrushabh
3fc36efeb3
Fixed golint.
2018-11-09 10:49:11 +05:30
parmarrushabh
25f010b5ab
remove useless code
2018-11-09 18:20:59 +05:30
MestryOmkar
01a3ec9a47
tiny fix m2 duplicate sign block
2018-11-09 18:07:01 +05:30
MestryOmkar
579adf1c8e
fix tiny error when full node import block
2018-11-09 17:23:18 +05:30
AnilChinchwale
2e505d6e99
change info at extra data in block from geth to XDC
2018-11-09 17:10:51 +05:30
MestryOmkar
1175d8e1b1
fix dv m2 validate block detail before broadcast
2018-11-09 16:53:09 +05:30
AnilChinchwale
53e39d77ac
fix error double validation
2018-11-09 16:42:45 +05:30
AnilChinchwale
03c07f37b4
tiny fix double validation
2018-11-09 16:39:14 +05:30
parmarrushabh
1396b1a10f
Fixed unit test for new m2 block header.
2018-11-09 16:29:54 +05:30
MestryOmkar
07b4be1284
Add new block header validator for store m2 data.
2018-11-09 16:11:13 +05:30
parmarrushabh
f0761106f4
m1 mine block but only broadcast block wait m2 validate
2018-11-09 16:01:01 +05:30
AnilChinchwale
3f1aadb861
fixed double validater
2018-11-09 15:43:29 +05:30
AnilChinchwale
8b92c4176c
move from SubscribeTx to Subscribe Special Tx in Double Validate
2018-11-09 15:00:22 +05:30
MestryOmkar
89d931299f
correct order - dv before importing
2018-11-09 14:46:03 +05:30
AnilChinchwale
360584a498
Revert adding double validation layer
2018-11-09 14:39:48 +05:30
parmarrushabh
161053b345
verify validators info at checkpoint block
2018-11-09 14:20:08 +05:30
parmarrushabh
7ebdbeed64
fix after reviewing
2018-11-09 13:07:34 +05:30
MestryOmkar
076cc560e5
add a pair connections with each peer
2018-11-09 12:52:01 +05:30
parmarrushabh
9d6344fbb4
Broadcast special Tx through pairRW
2018-11-09 12:45:18 +05:30
Corey Lin
a5dc087845
core/vm, eth/tracers: use pointer receiver for GetRefund ( #18018 )
2018-11-08 13:07:15 +01:00
Corey Lin
212bf266c5
eth, p2p: fix comment typos ( #18014 )
2018-11-08 12:25:14 +01:00
Felix Lange
0bcff8f525
eth/downloader: speed up tests by generating chain only once ( #17916 )
...
* core: speed up GenerateChain
Use a mock implementation of ChainReader instead of creating
and destroying a BlockChain object for each generated block.
* eth/downloader: speed up tests by generating chain only once
This change reworks the downloader tests so they share a common test
blockchain instead of generating a chain in every test. The tests are
roughly twice as fast now.
2018-11-07 15:07:43 +01:00
Wenbiao Zheng
b35165555d
eth/downloader: remove the expired id directly ( #17963 )
2018-11-07 15:30:19 +02:00
Martin Holst Swende
eea3ae42a3
core, eth/downloader: fix validation flaw, fix downloader printout flaw ( #17974 )
2018-11-07 14:47:11 +02:00
Martin Holst Swende
dc6648bb58
downloader: measure successfull deliveries, not failed ( #17983 )
...
* downloader: measure successfull deliveries, not failed
* downloader: fix typos
2018-11-07 14:18:07 +02:00
parmarrushabh
9fb0674907
add a pair connections with each peer
2018-11-07 12:23:51 +05:30
AnilChinchwale
9414ae6f2a
Add penalty feature for prevent signer without sign in epoc make slow
2018-11-07 12:05:58 +05:30
parmarrushabh
38d7c2c707
tiny fix hook penalty
2018-11-07 11:23:55 +05:30
parmarrushabh
eb9742ae27
verify penalty info in header check point
2018-11-07 11:15:32 +05:30
parmarrushabh
b41dcb301f
fix error when find penalties in 4 epoch ago
2018-11-07 11:02:12 +05:30
MestryOmkar
f39fe02a9c
update log & check case a master node in,out continuity
2018-11-07 10:58:12 +05:30
AnilChinchwale
551fd57271
Fixed unit test for penalty feature.
2018-11-07 10:46:09 +05:30
AnilChinchwale
f5152bf0cf
Add penalty feature for prevent signer without sign in epoc make slow…
2018-11-07 10:26:28 +05:30
AnilChinchawale
b8cb19732f
lookup txPool before listening to imcoming tx
2018-11-06 18:05:59 +05:30
MestryOmkar
b955291388
init double validation layer
2018-11-06 18:00:21 +05:30
AnilChinchawale
deb79f4a23
push Randomization implementation
2018-11-06 17:27:13 +05:30
parmarrushabh
944494f6e4
Revert Randomization implementation
2018-11-06 16:16:29 +05:30
MestryOmkar
7aa35671ad
Fixed randomize generator not using matrix mechanism.
2018-11-05 11:58:04 +05:30
MestryOmkar
20c5123739
Fixed unit test for block randomize.
2018-11-05 11:45:14 +05:30
AnilChinchawale
d81dc08a50
Get randomize m2 offer from validators in smart contract.
2018-11-05 11:12:22 +05:30
AnilChinchawale
7e7bc37c20
convert update M1 method from async to sync
2018-11-02 12:14:43 +05:30
parmarrushabh
b0e95fcc58
fix reduce change code
2018-10-31 11:14:32 +05:30
parmarrushabh
cb5a55a904
change config from flag to toml file; fix tag listenaddr
2018-10-31 10:30:25 +05:30
parmarrushabh
51ef74203a
update return error when update M1
2018-10-31 18:58:34 +05:30
parmarrushabh
6adb7c1d68
fix test download and recover some download config & test
2018-10-31 18:46:57 +05:30
AnilChinchwale
77bf4b18e1
Fixed default for foundation wallet address at puppeth.
2018-10-29 14:23:45 +05:30
MestryOmkar
ece1dccd93
Fixed test problem when change config MaxBlockFetch in downloader.
2018-10-29 13:21:37 +05:30
parmarrushabh
ce89b6b92d
making XDPoS as a separate package
2018-10-28 11:58:50 +05:30
parmarrushabh
b32dca7f64
statically set chuck size to 900
2018-10-28 10:56:35 +05:30
AnilChinchwale
af02783e8e
Fixed reward overflow uint64.
2018-10-28 10:53:21 +05:30
parmmarrushabh
dccf2ca3e9
Add signers and finality to block status rpc api.
2018-10-27 16:28:04 +05:30
Wenbiao Zheng
6810933640
eth/downloader: SetBlocksIdle is not used ( #17962 )
...
__
<(o )___
( ._> /
`---'
2018-10-24 01:27:49 +02:00
Martin Holst Swende
4c0883e20d
core/vm: adds refund as part of the json standard trace ( #17910 )
...
This adds the global accumulated refund counter to the standard
json output as a numeric json value. Previously this was not very
interesting since it was not used much, but with the new sstore
gas changes the value is a lot more interesting from a consensus
investigation perspective.
2018-10-23 16:28:18 +02:00
Wenbiao Zheng
3088c122d8
eth/downloader: fix comment typos ( #17956 )
2018-10-23 13:21:16 +02:00
parmmarrushabh
356a13e109
Fixed send tx sign using block hash instead of block number.
2018-10-23 11:50:56 +05:30
AnilChinchawale
6a76879b85
Add unit test for calculate reward for signers at reward checkpoint.
2018-10-23 11:15:11 +05:30
MestryOmkar
ec421b98b1
masternode should also count to his turn in case some of his friends are down
2018-10-22 10:53:15 +05:30
MestryOmkar
7adecc32d3
node waits to his turn until there is a new block comes in
2018-10-22 10:37:12 +05:30
AnilChinchawale
77ac77cdb1
staking not mining
2018-10-21 16:42:10 +05:30
parmarrushabh
264a6dc9db
Fixed calculate reward for holders.
2018-10-20 16:20:30 +05:30
MestryOmkar
f814908442
get masternodes set from latest checkpoint block header instead of fr… …
2018-10-10 14:15:15 +05:30
Péter Szilágyi
6ee3b26f44
eth/downloader: fix invalid hash chain error due to head mini reorg
2018-10-05 10:45:02 +03:00
Martin Holst Swende
89a32451ae
core/vm: faster create/create2 ( #17806 )
...
* core/vm/runtim: benchmark create/create2
* core/vm: do less hashing in CREATE2
* core/vm: avoid storing jumpdest analysis for initcode
* core/vm: avoid unneccesary lookups, remove unused fields
* core/vm: go formatting tests
* core/vm: save jumpdest analysis locally
* core/vm: use common.Hash instead of nil, fix review comments
* core/vm: removed type destinations
* core/vm: correct check for empty hash
* eth: more elegant api_tracer
* core/vm: address review concerns
2018-10-04 18:15:37 +03:00
Liang Ma
ff6e0351ab
eth: fixed the minor typo inside the comments ( #17830 )
2018-10-04 12:35:24 +03:00
MestryOmkar
a7deff5891
minor log cleaning up
2018-10-02 12:23:02 +05:30
parmarrushabh
9f5cba7dc7
update new set of masternodes at end of each epoch (distance = m1Gap)
2018-09-30 12:00:33 +05:30
Ryan Schneider
b69942befe
core, internal/ethapi: add and use LRU cache for receipts ( #17610 )
2018-09-29 22:53:31 +02:00
ledgerwatch
3d782bc727
eth: broadcast blocks to at least 4 peers ( #17725 )
2018-09-29 22:17:06 +02:00
Wenbiao Zheng
024b22c30e
eth/downloader: use intermediate variable for better readability ( #17510 )
2018-09-29 22:13:39 +02:00
HackyMiner
107f556b2d
internal/ethapi: add eth_chainId method ( #17617 )
...
This implements EIP-695.
2018-09-29 22:07:02 +02:00
parmarrushabh
3d11656c45
Fixed add ipc client global variable inject into ethereum instance.
2018-09-27 11:49:51 +05:30
Felix Lange
30cd5c1854
all: new p2p node representation ( #17643 )
...
Package p2p/enode provides a generalized representation of p2p nodes
which can contain arbitrary information in key/value pairs. It is also
the new home for the node database. The "v4" identity scheme is also
moved here from p2p/enr to remove the dependency on Ethereum crypto from
that package.
Record signature handling is changed significantly. The identity scheme
registry is removed and acceptable schemes must be passed to any method
that needs identity. This means records must now be validated explicitly
after decoding.
The enode API is designed to make signature handling easy and safe: most
APIs around the codebase work with enode.Node, which is a wrapper around
a valid record. Going from enr.Record to enode.Node requires a valid
signature.
* p2p/discover: port to p2p/enode
This ports the discovery code to the new node representation in
p2p/enode. The wire protocol is unchanged, this can be considered a
refactoring change. The Kademlia table can now deal with nodes using an
arbitrary identity scheme. This requires a few incompatible API changes:
- Table.Lookup is not available anymore. It used to take a public key
as argument because v4 protocol requires one. Its replacement is
LookupRandom.
- Table.Resolve takes *enode.Node instead of NodeID. This is also for
v4 protocol compatibility because nodes cannot be looked up by ID
alone.
- Types Node and NodeID are gone. Further commits in the series will be
fixes all over the the codebase to deal with those removals.
* p2p: port to p2p/enode and discovery changes
This adapts package p2p to the changes in p2p/discover. All uses of
discover.Node and discover.NodeID are replaced by their equivalents from
p2p/enode.
New API is added to retrieve the enode.Node instance of a peer. The
behavior of Server.Self with discovery disabled is improved. It now
tries much harder to report a working IP address, falling back to
127.0.0.1 if no suitable address can be determined through other means.
These changes were needed for tests of other packages later in the
series.
* p2p/simulations, p2p/testing: port to p2p/enode
No surprises here, mostly replacements of discover.Node, discover.NodeID
with their new equivalents. The 'interesting' API changes are:
- testing.ProtocolSession tracks complete nodes, not just their IDs.
- adapters.NodeConfig has a new method to create a complete node.
These changes were needed to make swarm tests work.
Note that the NodeID change makes the code incompatible with old
simulation snapshots.
* whisper/whisperv5, whisper/whisperv6: port to p2p/enode
This port was easy because whisper uses []byte for node IDs and
URL strings in the API.
* eth: port to p2p/enode
Again, easy to port because eth uses strings for node IDs and doesn't
care about node information in any way.
* les: port to p2p/enode
Apart from replacing discover.NodeID with enode.ID, most changes are in
the server pool code. It now deals with complete nodes instead
of (Pubkey, IP, Port) triples. The database format is unchanged for now,
but we should probably change it to use the node database later.
* node: port to p2p/enode
This change simply replaces discover.Node and discover.NodeID with their
new equivalents.
* swarm/network: port to p2p/enode
Swarm has its own node address representation, BzzAddr, containing both
an overlay address (the hash of a secp256k1 public key) and an underlay
address (enode:// URL).
There are no changes to the BzzAddr format in this commit, but certain
operations such as creating a BzzAddr from a node ID are now impossible
because node IDs aren't public keys anymore.
Most swarm-related changes in the series remove uses of
NewAddrFromNodeID, replacing it with NewAddr which takes a complete node
as argument. ToOverlayAddr is removed because we can just use the node
ID directly.
2018-09-25 00:59:00 +02:00
parmarrushabh
76153eea4a
Fixed bug calculate reward and add unit test for it.
2018-09-22 10:12:05 +05:30
gary rong
457e930f27
eth, miner: prefer locally generated uncles vs remote ones ( #17715 )
...
* core, eth: fix dependency cycle
* eth, miner: perfer to locally generated uncle
2018-09-21 00:11:55 +03:00
gary rong
ba0a8b7887
core, eth: fix dependency cycle ( #17720 )
2018-09-20 20:02:15 +03:00
gary rong
d6254f827b
all: protect self-mined block during reorg ( #17656 )
2018-09-20 15:09:30 +03:00
Guillaume Ballet
da29332c5f
core/vm: add switches to select evm+ewasm interpreters ( #17687 )
...
Interpreter initialization is left to the PRs implementing them.
Options for external interpreters are passed after a colon in the
`--vm.ewasm` and `--vm.evm` switches.
2018-09-20 10:44:35 +03:00
HackyMiner
6975c72981
all: fix various comment typos ( #17591 )
...
* swarm: fixed comment typo
* eth: fixed comment typo
* cmd/puppeth: fixed comment typo
2018-09-19 18:10:40 +02:00
Péter Szilágyi
faa69bea1c
core, eth: fix goimports for Go 1.11
2018-09-19 11:47:09 +03:00
parmarrushabh
530f8e3656
Add unit test for calculate reward for signers at reward checkpoint.
2018-09-18 10:01:00 +05:30
MestryOmkar
3584bcfa5f
Fixed bug too many open IPC connect at same time.
2018-09-15 18:29:07 +05:30
Emil
86a03f97d3
all: simplify s[:] to s where s is a slice ( #17673 )
2018-09-14 22:07:13 +02:00
Paweł Bylica
ae992a5d73
core/vm: Hide read only flag from Interpreter interface ( #17461 )
...
Makes Interface interface a bit more stateless and abstract.
Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
2018-09-07 18:13:25 +02:00
parmarrushabh
00df3d6cc3
Add unit test for send tx sign for block signer.
2018-09-06 17:42:02 +05:30
Wenbiao Zheng
6a33954731
core, eth, trie: use common/prque ( #17508 )
2018-09-03 17:33:21 +02:00
AnilChinchawale
4e3cb79ff2
Refine code using log error when create tx sign.
2018-09-02 17:32:33 +05:30
parmarrushabh
9551a39a97
Fixed move method getBlockSingers by blockNumber to utils of contact …
2018-08-31 16:37:52 +05:30
Péter Szilágyi
e8f229b82e
cmd, core, eth, miner, params: configurable gas floor and ceil
2018-08-29 12:40:12 +03:00
gary rong
c1c003e4ff
consensus, miner: stale block mining support ( #17506 )
...
* consensus, miner: stale block supporting
* consensus, miner: refactor seal signature
* cmd, consensus, eth: add miner noverify flag
* cmd, consensus, miner: polish
2018-08-28 16:59:05 +03:00
MestryOmkar
f0b6c70a8e
Refine code and fixed send tx sign for block signer.
2018-08-28 16:07:53 +05:30
gary rong
b69476b372
all: make indexer configurable ( #17188 )
2018-08-28 10:08:16 +03:00
Wenbiao Zheng
d1aa605f1e
all: remove the duplicate 'the' in annotations ( #17509 )
2018-08-27 11:49:29 +03:00
Péter Szilágyi
92381ee009
cmd, eth: clean up miner startup API, drop noop config field
2018-08-23 14:09:45 +03:00
gary rong
af85d8e2b3
cmd, eth: apply default miner recommit setting ( #17479 )
2018-08-22 09:47:50 +03:00
gary rong
b2c644ffb5
cmd, eth, miner: make recommit configurable ( #17444 )
...
* cmd, eth, miner: make recommit configurable
* cmd, eth, les, miner: polish a bit
* miner: filter duplicate sealing work
* cmd: remove uncessary conversion
* miner: avoid microptimization in favor of cleaner code
2018-08-21 22:56:54 +03:00
Pierre Neter
76301ca051
eth: upgradedb subcommand was dropped ( #17464 )
2018-08-21 13:36:38 +03:00
Péter Szilágyi
ecca49e078
Merge pull request #17460 from holiman/tracerfix
...
Ensure from < to when tracing chain
2018-08-21 11:32:50 +03:00
Martin Holst Swende
106d196ec4
eth: ensure from<to when tracing chain (credits Chen Nan via bugbounty)
2018-08-21 09:48:53 +02:00
parmarrushabh
8b71594e11
Fixed send tx sign to smart contract for block signer.
2018-08-19 15:29:11 +05:30
Felföldi Zsolt
2cdf6ee7e0
light: CHT and bloom trie indexers working in light mode ( #16534 )
...
This PR enables the indexers to work in light client mode by
downloading a part of these tries (the Merkle proofs of the last
values of the last known section) in order to be able to add new
values and recalculate subsequent hashes. It also adds CHT data to
NodeInfo.
2018-08-15 22:25:46 +02:00
Péter Szilágyi
d8328a96b4
Merge pull request #17347 from karalabe/miner-notify
...
cmd, consensus/ethash, eth: miner push notifications
2018-08-13 17:03:16 +03:00
parmarrushabh
78787916b0
Fixed calculate reward for whole block checkpoint reward number.
2018-08-13 14:45:03 +05:30
MestryOmkar
eb8922c652
staking instead of mining
2018-08-12 14:41:12 +05:30
Péter Szilágyi
f0998415ba
cmd, consensus/ethash, eth: miner push notifications
2018-08-10 09:06:59 +03:00
Péter Szilágyi
11bbc66082
eth, trie: fix tracer GC which accidentally pruned the metaroot
2018-08-09 12:33:30 +03:00
parmarrushabh
bbd132c1a3
Refine comments for feature add reward to validators and signers block.
2018-08-09 14:24:16 +05:30
MestryOmkar
831626de23
Add reward for signers and validators for reward checkpoint.
2018-08-04 14:11:24 +05:30
gary rong
51db5975cc
consensus/ethash: move remote agent logic to ethash internal ( #15853 )
...
* consensus/ethash: start remote ggoroutine to handle remote mining
* consensus/ethash: expose remote miner api
* consensus/ethash: expose submitHashrate api
* miner, ethash: push empty block to sealer without waiting execution
* consensus, internal: add getHashrate API for ethash
* consensus: add three method for consensus interface
* miner: expose consensus engine running status to miner
* eth, miner: specify etherbase when miner created
* miner: commit new work when consensus engine is started
* consensus, miner: fix some logics
* all: delete useless interfaces
* consensus: polish a bit
2018-08-03 11:33:37 +03:00
gary rong
c4a1d4fecf
eth/filters: fix the block range assignment for log filter ( #17284 )
2018-07-31 12:10:38 +03:00
Oleg Kovalov
d42ce0f2c1
all: simplify switches ( #17267 )
...
* all: simplify switches
* silly mistake
2018-07-30 12:30:09 +03:00
parmarrushabh
f5316ee18b
Refine code for test coverage.
2018-07-29 10:15:42 +05:30
parmarrushabh
dd9a1bbbf0
Fixed go lint.
2018-07-27 17:02:20 +05:30
Ian Macalinao
d96ba77113
eth/filters: improve error message for invalid filter topics ( #17234 )
2018-07-24 15:12:49 +02:00
parmarrushabh
a88d49b1a8
Fixed only send tx sign for validators.
2018-07-24 16:54:17 +05:30
Péter Szilágyi
21c059b67e
Merge pull request #16734 from reductionista/eip234
...
eth/filters, interfaces: EIP-234 Add blockHash option to eth_getLogs
2018-07-24 12:52:16 +03:00
emile
526abe2736
eth/tracers: fix noop tracer ( #17220 )
2018-07-22 22:11:52 +03:00
parmarrushabh
3f1c3839c9
Add feature send tx sign (validator block) from coinbase to smart con…
2018-07-22 16:39:59 +05:30
AnilChinchawale
d7f57b92e3
updated backend.go
2018-07-18 17:16:14 +05:30
Ralph Caraveo III
5d30be412b
all: switch out defunct set library to different one ( #16873 )
...
* keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set.
* whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
2018-07-16 10:54:19 +03:00
Péter Szilágyi
e1f1d3085c
accounts, eth, les: blockhash based filtering on all code paths
2018-07-12 18:16:54 +03:00
Domino Valdano
96339daf40
eth/filters, ethereum: EIP-234 add blockHash param for eth_getLogs
2018-07-12 18:16:32 +03:00
AnilChinchawale
6e4c9d9387
added DYNAMIC-VALIDATOR
2018-06-24 14:29:24 +05:30
AnilChinchawale
2cde3e9fe8
added MINING PERMISSION EVERY EPOCH BLOCK +1
2018-06-22 14:14:13 +05:30
Péter Szilágyi
d926bf2c7e
trie: cache collapsed tries node, not rlp blobs ( #16876 )
...
The current trie memory database/cache that we do pruning on stores
trie nodes as binary rlp encoded blobs, and also stores the node
relationships/references for GC purposes. However, most of the trie
nodes (everything apart from a value node) is in essence just a
collection of references.
This PR switches out the RLP encoded trie blobs with the
collapsed-but-not-serialized trie nodes. This permits most of the
references to be recovered from within the node data structure,
avoiding the need to track them a second time (expensive memory wise).
2018-06-21 11:28:05 +02:00
Martin Holst Swende
4210dd1500
tracers: fix err in 4byte, add some opcode analysis tools
2018-06-20 11:42:57 +03:00
AnilChinchawale
2a089900f5
added MINER-VALIDATOR
2018-06-18 10:46:57 +05:30
williambannas
9402f96597
eth: conform better to the golint standards ( #16783 )
...
* eth: made changes to conform better to the golint standards
* eth: fix comment nit
2018-06-14 13:14:52 +03:00
knarfeh
e75d0a6e4c
eth/filters: make filterLogs func more readable ( #16920 )
2018-06-14 12:27:02 +03:00
AnilChinchawale
0cb82cf94f
added CHAIN, HEADER PARAMS
2018-06-14 10:28:02 +05:30
Wenbiao Zheng
ea89f40f0d
eth/fetcher: fix annotation ( #16969 )
2018-06-13 17:02:28 +03:00
Felföldi Zsolt
049f5b3572
core, eth, les: more efficient hash-based header chain retrieval ( #16946 )
2018-06-12 16:52:54 +03:00
Martin Holst Swende
eac16f9824
core: improve getBadBlocks to return full block rlp ( #16902 )
...
* core: improve getBadBlocks to return full block rlp
* core, eth, ethapi: changes to getBadBlocks formatting
* ethapi: address review concerns
2018-06-11 11:03:40 +03:00
Martin Holst Swende
400332b99d
eth/tracers: fix minor off-by-one error ( #16879 )
...
* tracing: fix minor off-by-one error
* tracers: go generate
2018-06-05 10:27:07 +03:00
Péter Szilágyi
143c4341d8
core, eth, trie: streaming GC for the trie cache ( #16810 )
...
* core, eth, trie: streaming GC for the trie cache
* trie: track memcache statistics
2018-06-04 10:47:43 +03:00
Wenbiao Zheng
38c7eb0f26
trie: rename TrieSync to Sync and improve hexToKeybytes ( #16804 )
...
This removes a golint warning: type name will be used as trie.TrieSync by
other packages, and that stutters; consider calling this Sync.
In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
2018-05-29 17:48:43 +02:00
kiel barry
84f8c0cc1f
common: improve documentation comments ( #16701 )
...
This commit adds many comments and removes unused code.
It also removes the EmptyHash function, which had some uses
but was silly.
2018-05-29 12:42:21 +02:00
Smilenator
40a2c52397
eth/fetcher: reuse variables for hash and number ( #16819 )
2018-05-29 10:57:08 +03:00
Wenbiao Zheng
d6ed2f67a8
eth, node, trie: fix minor typos ( #16802 )
2018-05-24 15:55:20 +03:00
Péter Szilágyi
d9cee2c172
eth: propagate blocks and transactions async
2018-05-21 11:32:42 +03:00
Péter Szilágyi
49719e21bc
core, eth: minor txpool event cleanups
2018-05-18 12:08:24 +03:00
rjl493456442
a2e43d28d0
all: collate new transaction events together
2018-05-18 11:46:44 +03:00
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
2018-05-09 15:24:25 +03:00
gary rong
4e7dc34ff1
eth/filter: check nil pointer when unsubscribe ( #16682 )
...
* eth/filter: check nil pointer when unsubscribe
* eth/filters, accounts, rpc: abort system if subscribe failed
* eth/filter: add crit log before exit
* eth/filter, event: minor fixes
2018-05-09 11:29:25 +03:00
kiel barry
4747aad160
eth: golint fixes to variable names ( #16711 )
2018-05-09 10:59:00 +03:00
Domino Valdano
fedae95015
eth/filters: derive FilterCriteria from ethereum.FilterQuery ( #16629 )
2018-05-08 14:39:15 +02:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00
kiel barry
5b3af4c3d1
eth: golint updates for this or self warning ( #16632 )
...
* eth/*:golint updates for this or self warning
* eth/*: golint updates for this or self warning, pr updated per feedback
2018-05-03 15:15:33 +03:00
Péter Szilágyi
7a7428a027
core, eth: fix tracer dirty finalization
2018-04-27 14:29:18 +03:00
Domino Valdano
7cf83cee52
eth/downloader: fix for Issue #16539 ( #16546 )
2018-04-23 10:01:21 +03:00
Wuxiang
8f8774cf6d
all: fix various typos ( #16533 )
...
* fix typo
* fix typo
* fix typo
2018-04-19 16:32:02 +03:00
gary rong
de2a7bb764
eth/downloader: wait for all fetcher goroutines to exit before terminating ( #16509 )
2018-04-16 11:37:48 +03:00
Felix Lange
c7ab3e5544
common: delete StringToAddress, StringToHash ( #16436 )
...
* common: delete StringToAddress, StringToHash
These functions are confusing because they don't parse hex, but use the
bytes of the string. This change removes them, replacing all uses of
StringToAddress(s) by BytesToAddress([]byte(s)).
* eth/filters: remove incorrect use of common.BytesToAddress
2018-04-10 14:12:07 +03:00
gary rong
1100e8ba63
eth/downloader: flush state sync data before exit ( #16280 )
2018-04-09 14:46:27 +02:00
Yusup
7aad81f881
eth: fix typos ( #16414 )
2018-04-04 12:25:02 +02:00
gary rong
77da203547
eth: update higest block we know during the sync if a higher was found ( #16283 )
...
* eth: update higest block we know during the sync if a higher was found
* eth: avoid useless sync in fast sync
2018-03-09 11:51:30 +02:00
Kyuntae Ethan Kim
f6bef558aa
eth: fixed typo ( #16274 )
2018-03-07 11:15:54 +02:00
Péter Szilágyi
ca64a122d3
eth/downloader: save and load trie sync progress ( #16224 )
2018-03-03 00:52:39 +01:00
Andrey Petrov
2e9c8fd4fb
eth, les: allow exceeding maxPeers for trusted peers ( #16189 )
...
Fixes #3326 , #14472
2018-02-27 12:52:59 +02:00
Anton Evangelatov
ae9f97221a
metrics: pull library and introduce ResettingTimer and InfluxDB reporter ( #15910 )
...
* go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter.
* vendor: change nonsense/go-metrics to ethersphere/go-metrics
* go-metrics: add tests. move ResettingTimer logic from reporter to type.
* all, metrics: pull in metrics package in go-ethereum
* metrics/test: make sure metrics are enabled for tests
* metrics: apply gosimple rules
* metrics/exp, internal/debug: init expvar endpoint when starting pprof server
* internal/debug: tiny comment formatting fix
2018-02-23 11:56:08 +02:00
Péter Szilágyi
5cf1d35470
eth, les, light: filter on logs only, derive receipts on demand
2018-02-22 19:12:43 +02:00
Felix Lange
a5c0bbb4f4
all: update license information ( #16089 )
2018-02-14 13:49:11 +01:00
Péter Szilágyi
57fd2da0fe
eth: only disable fast sync after success
2018-02-11 17:25:00 +02:00
Péter Szilágyi
96dad6b6f6
eth/downloader: don't require state for ancestor lookups
2018-02-11 14:43:56 +02:00
Péter Szilágyi
eb07dbb079
eth, light: minor light client startup cleanups
2018-02-08 07:49:23 +02:00
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
Felföldi Zsolt
c3f238dd53
les: limit LES peer count and improve peer configuration logic ( #16010 )
...
* les: limit number of LES connections
* eth, cmd/utils: light vs max peer configuration logic
2018-02-05 15:41:53 +02:00
Martin Holst Swende
bc0666fb27
eth/downloader: fix #15858 by checking if downloader dropPeer function is set ( #15992 )
2018-02-05 15:38:06 +02:00
Péter Szilágyi
566d5c0777
core, eth, les, light: get rid of redundant methods
2018-01-30 18:42:00 +02:00
Péter Szilágyi
1bf508b449
accounts/abi/bind: support event filtering in abigen
2018-01-24 10:54:13 +02:00
Nick Johnson
b06e20bc7c
eth/gasprice: set default percentile to 60%, count blocks instead of transactions ( #15828 )
...
The first should address a long term issue where we recommend a gas
price that is greater than that required for 50% of transactions in
recent blocks, which can lead to gas price inflation as people take
this figure and add a margin to it, resulting in a positive feedback
loop.
2018-01-10 13:57:36 +01:00
Felix Lange
9d06026c19
all: regenerate codecs with gencodec commit 90983d99de ( #15830 )
...
Fixes #15777 because null is now allowed for hexutil.Bytes.
2018-01-08 15:13:22 +02:00