-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
consensus/istanbul: Istanbul BFT (EIP650) #14674
Conversation
Warning: it will take a while to get this merged ;) |
e76a5b5
to
7207cbc
Compare
68cbcf9
to
74ccc93
Compare
41dfb17
to
0f066fb
Compare
ee11f70
to
042d72e
Compare
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
042d72e
to
ee11f70
Compare
ee46a57
to
2df6174
Compare
64789fb
to
b612e3b
Compare
b612e3b
to
6df88ce
Compare
|
} | ||
} | ||
|
||
/** |
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.
Forgotten comment?
6df88ce
to
5fe3ba1
Compare
could conflicts be solved? I would love to use this algo! |
5fe3ba1
to
880a89f
Compare
1f50b64
to
96e5059
Compare
-- repost of comment on EIP 650 -- The current implementation (as found in Quorum) breaks the concept of the "pending" block, used in several calls, but most notably in In Ethereum, the pending block means the latest confirmed block + all pending transactions the node is aware of. This means that directly after a transaction is sent to the node (through RPC), the transaction count (aka nonce) in the "pending" block is increased. A lot of tools, like abigen in this repo or any other tool where tx signing occurs at the application level instead of in geth, rely on this for making multiple transactions at once. After the first one, the result of With the current implementation of Istanbul, the definition of the "pending block" seem to be different. When submitting a transaction, the result for So this seems to mean that the "pending block" definition changed from "latest block + pending txs" to "the block that is currently being voted on". I consider this a bug; if this is done on purpose, it breaks with a lot of existing applications (all users of abigen, f.e.) and should be reconsidered. I originally reported about this issue in the Quorum repo, but there doesn't seem to be a good place to report bugs in Istanbul other than here. |
Protocol() Protocol | ||
} | ||
|
||
// Handler should be implemented is the consensus needs to handle and send peer's message |
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.
Isn't it "if the consensus" instead of "is the consensus" ?
LastProposal() (Proposal, common.Address) | ||
|
||
// HasPropsal checks if the combination of the given hash and height matches any existing blocks | ||
HasPropsal(hash common.Hash, number *big.Int) bool |
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.
I would change it to HasProposal
to keep it consistent with the rest
) | ||
|
||
const ( | ||
// fetcherID is the ID indicates the block is from Istanbul engine |
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.
I would say "fetcher ID indicates that the block..."
|
||
// ---------------------------------------------------------------------------- | ||
|
||
type backend struct { |
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.
I would rather get rid of the // ---------------------
comment line and move the struct before the New
function (which would make sense because we use the backend
struct in the New
function) for clarity/cleanliness.
return nil | ||
} | ||
|
||
// Broadcast implements istanbul.Backend.Gossip |
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.
Isn't is Gossip
, rather than Broadcast
?
if err == nil { | ||
backlog.Push(msg, toPriority(msg.Code, p.View)) | ||
} | ||
// for msgRoundChange, msgPrepare and msgCommit cases |
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.
Indentation problem, or is this expected ?
return nil | ||
} | ||
|
||
// ---------------------------------------------------------------------------- |
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.
I would remove this comment
} | ||
} | ||
|
||
// ---------------------------------------------------------------------------- |
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.
Useless comment ?
return ms.messages[addr] | ||
} | ||
|
||
// ---------------------------------------------------------------------------- |
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.
Useless comment ?
} | ||
|
||
// roundState stores the consensus state | ||
type roundState struct { |
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.
I would move this struct just before the newRoundState
function
…to support custom messages
96e5059
to
c754738
Compare
cool, please go ahead |
We don't have the capacity to merge and maintain it. We had an informal chat with Quorum, and they might write the integration. |
Is there any update regarding the integration? |
It is integrated in Quorum which is a fork of Geth. |
Yes, I'm aware of it. As we can see in the comment:
|
} | ||
|
||
for _, seal := range committedSeals { | ||
if len(seal) != types.IstanbulExtraSeal { |
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.
Could someone tell me what this checks? I was trying to figure out where we check during the commit/finalization that the commit seals are valid?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
wen merge >:( |
never |
@karalabe Is there an official reason for this? |
Polygon Edge migration from POA to POS I have created a 4 nodes POA network using polygon-edge. I have deployed the staking smart contract in block no 59357 .All the validators staking has staked before block no 59750.I have verified the list in staking contract. failed to get validators when calculation quorum Please guys help me to resolve my issue |
This is a repo for Ethereum, not Polygon. |
This PR is the implementation of Istanbul BFT protocol in ethereum/EIPs#650