-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
if !allow_empty_signature && self.is_unsigned() { | ||
pub fn verify_basic(&self, check_low_s: bool, chain_id: Option<u64>) -> Result<(), error::Error> { | ||
// Disallow unsigned transactions. | ||
if self.is_unsigned() { | ||
return Err(parity_crypto::publickey::Error::InvalidSignature.into()); |
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.
Should we have a Error::Unsigned
you think?
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!
@@ -31,7 +31,8 @@ use transaction::error; | |||
type Bytes = Vec<u8>; | |||
type BlockNumber = u64; | |||
|
|||
/// Fake address for unsigned transactions as defined by EIP-86. | |||
/// Fake address for unsigned transactions as defined by Legacy EIP-86. | |||
#[cfg(any(test, feature = "test-helpers"))] | |||
pub const UNSIGNED_SENDER: Address = H160([0xff; 20]); |
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.
Why not remove this entirely?
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.
What to do with
- https://github.com/paritytech/parity-ethereum/blob/6e76be7fad1cf1ae40773183084f13c37acabdde/ethcore/machine/src/machine.rs#L155-L156
- https://github.com/paritytech/parity-ethereum/blob/6e76be7fad1cf1ae40773183084f13c37acabdde/ethcore/machine/src/externalities.rs#L262
- (probably just remove) https://github.com/paritytech/parity-ethereum/blob/6e76be7fad1cf1ae40773183084f13c37acabdde/ethcore/types/src/transaction/transaction.rs#L503-L505
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.
- Try to remove
Option<>
fromcontract_address
- I suppose it will always be set toSome
. - Remove along with
keep_unsigned_nonce
parameter from schedule, it's always set tofalse
anyway. - Just remove along with
fn is_unsigned
methods from all*Transaction
structs.
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.
Just checked and it seems 1. needs to stay, as it's being used by block-reward
calls inside the engine, so let's leave it as is. So I guess we can keep the constant, but try to remove everything else.
This reverts commit be29f03.
I don't have time to investigate this failure https://gitlab.parity.io/parity/parity-ethereum/-/jobs/331339. My suggestion is to merge it as is, more cleanup can be done in a followup PR. |
Works for me. @tomusdrw? |
Yeah, sounds good! Let's just not forget that :) |
* master: remove null signatures (#11335)
* tx: clean up legacy eip-86 based null signature * tx: add a test for null signature rejection * tx: revert json txn changes * fix evmbin bench build * tx: put UNSIGNED_SENDER behind 'test-helpers' feature * Revert "tx: put UNSIGNED_SENDER behind 'test-helpers' feature" This reverts commit 1dde478. * tx: add comment for null_sign * even more cleanup * Revert "even more cleanup" This reverts commit be29f03.
* tx: clean up legacy eip-86 based null signature * tx: add a test for null signature rejection * tx: revert json txn changes * fix evmbin bench build * tx: put UNSIGNED_SENDER behind 'test-helpers' feature * Revert "tx: put UNSIGNED_SENDER behind 'test-helpers' feature" This reverts commit 1dde478. * tx: add comment for null_sign * even more cleanup * Revert "even more cleanup" This reverts commit be29f03.
…ate their data instead Merge branch 'master' into dp/chore/kvdb-no-default-column * master: tx-q: enable basic verification of local transactions (#11332) remove null signatures (#11335) ethcore/res: activate agharta on classic 9573000 (#11331) [secretstore] migrate to version 4 (#11322) Enable EIP-2384 for ice age hard fork (#11281) Fix atomicity violation in network-devp2p (#11277)
* Enable EIP-2384 for ice age hard fork (#11281) * ethcore/res: activate agharta on classic 9573000 (#11331) * Istanbul HF in xDai (2019-12-12) (#11299) * Istanbul HF in POA Core (2019-12-19) (#11298) * Istanbul HF in POA Sokol (2019-12-05) (#11282) * Activate ecip-1061 on kotti and mordor (#11338) * Enable basic verification of local transactions (#11332) * Disallow EIP-86 style null signatures for transactions outside tests (#11335)
* Enable EIP-2384 for ice age hard fork (#11281) * ethcore/res: activate agharta on classic 9573000 (#11331) * Istanbul HF in xDai (2019-12-12) (#11299) * Istanbul HF in POA Core (2019-12-19) (#11298) * Istanbul HF in POA Sokol (2019-12-05) (#11282) * Activate ecip-1061 on kotti and mordor (#11338) * Enable basic verification of local transactions (#11332) * Disallow EIP-86 style null signatures for transactions outside tests (#11335) * SecretStore database migration to v4 (#11322)
eip86Transition
flag was removed in #9140, this PR removes the null-signature as a follow-up cleanup.