-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] consensus, core, eth, miner: use the same insert behavior between proposer and validators #123
base: istanbul/develop
Are you sure you want to change the base?
Conversation
c.sendEvent(backlogEvent{ | ||
src: src, | ||
msg: msg, | ||
if !c.valSet.IsProposer(c.Address()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core isProposer()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
core/blockchain.go
Outdated
@@ -838,6 +838,11 @@ func (bc *BlockChain) WriteBlock(block *types.Block) (status WriteStatus, err er | |||
bc.mu.Lock() | |||
defer bc.mu.Unlock() | |||
|
|||
if bc.HasBlock(block.Hash()) { | |||
log.Info("Block exists", "hash", block.Hash()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
727c487
to
df5d3a3
Compare
bdfa43e
to
6816e21
Compare
df5d3a3
to
ad67a73
Compare
logger log.Logger | ||
db ethdb.Database | ||
chain consensus.ChainReader | ||
commitProposedWork func(*types.Block) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment more on commitProposedWork
and writeProposedWork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Please elaborate what the major difference from previous implementation is. For example, previously proposer inserts the block through __ and validator insert the block through __. |
6816e21
to
39eaf7c
Compare
ad67a73
to
12498ce
Compare
OK. In previous implementation, we only verify block's header in
|
12498ce
to
765b10c
Compare
b59c7d0
to
dccfb94
Compare
* consensus/istanbul: handle future preprepare * consensus/istanbul: handle request timeout in evnet loop * consensus, eth: start/stop core engine while start/stop mining * eth, ethstats: fix crash while reporting to ethstats * consensus/istanbul, miner: add new event to trigger new block creation * eth, consensus/istanbul: improve sending messages * consensus/istanbul: stop future preprepare timer while stop core * consensus/istanbul: add cache in ecrecover()
4d6d507
to
2d811e4
Compare
765b10c
to
373a847
Compare
164faea
to
35d36a2
Compare
This PR changes too many stuffs. We need more tests for this PR before merge |
35d36a2
to
fda548f
Compare
f152944
to
adc0cb8
Compare
1d28a1c
to
6eb4e85
Compare
b389e13
to
cfc586a
Compare
cfc586a
to
07dc51b
Compare
07dc51b
to
4cb4e46
Compare
4cb4e46
to
5ab6775
Compare
cb3c2e1
to
3d49176
Compare
Where can I report issues with Istanbul? I found one that might be slightly related to this change. It's explained here in more detail: ethereum/EIPs#650 (comment) |
daaeb0a
to
9502792
Compare
…poser and validators