-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add transaction pool to Aura and Babe import queue #3225
Conversation
|
Please add a comment in the Babe code explaining why we're passing the transaction pool. The comment can later be removed when we actually use it, but for now I'd prefer if there was an explanation. We merge many PRs that add code "for later", and we end up not using that code, and then nobody remembers why it's there nor dares to remove it. |
|
I would go even further as @tomaka and say, why not build directly the full functionality? This is no big change, which can be reviewed together with the actual functionality. |
The full functionality may be too much for a PR. But sure, I can push more code to give a bigger picture to the reviewers. |
49d94c7 to
a224ac5
Compare
Demi-Marie
left a 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.
The completed code looks good so far, but there is a long ways to go.
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.
This is not reviewable. You bundled a bunch of changes from other PRs into a single commit (599c8b1). If you depend on other PRs the correct way to do it is to create a branch that descends from the one you depend on. FWIW I'm fine with merging just the changes to introduce the transaction pool to Babe (and Aura!) without depending on any pending PRs, provided that we comment it like @tomaka suggested.
I have not intention to merge the other PR, just to use it as a guide. I'll follow the suggestions of @tomaka and @andresilva and just introduce the changes for the tx pool in Aura and Babe as was originally intended. |
a224ac5 to
4b8384c
Compare
1c15e2c to
5c7c389
Compare
|
This is ready for review, I added the tx pool to Aura too. |
andresilva
left a 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.
When you actually want to use the transaction pool you will need to add some trait bounds to T. Right now it is just a generic type from which we cannot infer anything. I think we should add the correct bounds in this PR so that it is usable (even though it won't be used in this PR).
Demi-Marie
left a 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.
LGTM
andresilva
left a 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.
As discussed offline this is not usable as is, since the T type is not bound by anything. @marcio-diaz did some changes to fix this on another branch not sure if we wants to get them here or not.
Now, that I read the comment again, it feels like an arbitrary decision. |
|
IMO my comment is justified, this PR is titled "Add transaction pool", and it adds a type |
25c6d8c to
c872ede
Compare
|
@andresilva Thanks, conflicts solved. |
|
@andresilva if you're happy with it, then please merge. |
We need to submit report transactions when we discover an equivocation while importing (see here for definition of equivocation).
As a starting point, this PR adds the transaction pool to Aura and Babe import queue (and
check_header).