Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Allow specifying local accounts via CLI #9960

Merged
merged 12 commits into from
Jan 28, 2019

Conversation

insipx
Copy link
Contributor

@insipx insipx commented Nov 24, 2018

  • Add tx-queue-locals CLI option
  • ethcore: modify miner to check options vec before importing transaction

Resolves #9634

@parity-cla-bot
Copy link

It looks like @insipx hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@insipx
Copy link
Contributor Author

insipx commented Nov 24, 2018

[clabot:check]

@parity-cla-bot
Copy link

It looks like @insipx signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

Copy link
Collaborator

@sorpaas sorpaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sorpaas sorpaas added A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. labels Nov 25, 2018
Copy link
Collaborator

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test would be nice

let sender = pending.sender();
let treat_as_local = trusted
|| !self.options.tx_queue_no_unfamiliar_locals
|| self.accounts.as_ref().map(|accts| accts.has_account(sender)).unwrap_or(false);
|| self.accounts.as_ref().map(|accts| accts.has_account(sender)).unwrap_or(false)
|| self.options.tx_queue_locals.iter().any(|addr| *addr == sender);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely the set should be considered even if tx_queue_no_unfamiliar_locals is enabled

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like that's the current behavior.

ethcore/src/miner/miner.rs Outdated Show resolved Hide resolved
@5chdn 5chdn added this to the 2.3 milestone Nov 25, 2018
ethcore/src/miner/miner.rs Outdated Show resolved Hide resolved
@sorpaas sorpaas added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Nov 26, 2018
@5chdn 5chdn added A0-pleasereview 🤓 Pull request needs code review. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Dec 3, 2018
@sorpaas sorpaas added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 3, 2018
@5chdn
Copy link
Contributor

5chdn commented Dec 4, 2018

👍 needs a 2nd review

dvdplm
dvdplm previously requested changes Dec 4, 2018
Copy link
Collaborator

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Minor nits and maybe improved test.

ethcore/src/miner/miner.rs Outdated Show resolved Hide resolved
ethcore/src/miner/miner.rs Outdated Show resolved Hide resolved
ethcore/src/miner/miner.rs Outdated Show resolved Hide resolved
parity/cli/mod.rs Outdated Show resolved Hide resolved
@5chdn 5chdn added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Dec 5, 2018
@5chdn
Copy link
Contributor

5chdn commented Dec 14, 2018

Are you still working on this @insipx?

@5chdn 5chdn added the A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Dec 14, 2018
@insipx
Copy link
Contributor Author

insipx commented Dec 14, 2018

Are you still working on this @insipx?

Yep,
I am catching up on work this week, just finished my last final 👍

@insipx insipx force-pushed the insi-local-priority-txs branch 3 times, most recently from d32e7fa to f37089b Compare December 23, 2018 20:08
@5chdn
Copy link
Contributor

5chdn commented Dec 28, 2018

@dvdplm could you have a look at this again?

@5chdn 5chdn added the A0-pleasereview 🤓 Pull request needs code review. label Dec 28, 2018
@5chdn 5chdn removed A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Dec 28, 2018
@tomusdrw
Copy link
Collaborator

@insipx could you rebase?

@5chdn 5chdn added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 7, 2019
@5chdn
Copy link
Contributor

5chdn commented Jan 7, 2019

Restarted CI

@5chdn 5chdn modified the milestones: 2.3, 2.4 Jan 10, 2019
@5chdn
Copy link
Contributor

5chdn commented Jan 28, 2019

@tomusdrw could you look at this again?

@5chdn 5chdn merged commit 50f5ccc into openethereum:master Jan 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants