Ensures `payer_auth` is present iff a `payer` is set. Open payer mode carries a raw 65-byte signature; a named payer carries an allowed `authenticator || data` blob.
(signed: &Eip8130Signed)
| 1875 | /// carries a raw 65-byte signature; a named payer carries an allowed |
| 1876 | /// `authenticator || data` blob. |
| 1877 | fn validate_payer_auth(signed: &Eip8130Signed) -> Result<(), InvalidPoolTransactionError> { |
| 1878 | let payer_present = signed.tx().payer.is_some(); |
| 1879 | let auth = signed.payer_auth(); |
| 1880 | // XOR: presence must match. |
| 1881 | if payer_present == auth.is_empty() { |
| 1882 | return Err(InvalidTransactionError::TxTypeNotSupported.into()); |
| 1883 | } |
| 1884 | if signed.tx().is_open_payer() { |
| 1885 | if auth.len() != 65 { |
| 1886 | return Err(InvalidTransactionError::TxTypeNotSupported.into()); |
| 1887 | } |
| 1888 | } else if payer_present { |
| 1889 | if auth.len() < 20 { |
| 1890 | return Err(InvalidTransactionError::TxTypeNotSupported.into()); |
| 1891 | } |
| 1892 | let authenticator = Address::from_slice(&auth[..20]); |
| 1893 | if !Self::authenticator_allowed_for_tx_path(&authenticator) |
| 1894 | || !Self::authenticator_payload_well_formed(&authenticator, &auth[20..]) |
| 1895 | { |
| 1896 | return Err(InvalidTransactionError::TxTypeNotSupported.into()); |
| 1897 | } |
| 1898 | } |
| 1899 | Ok(()) |
| 1900 | } |
| 1901 | |
| 1902 | /// Returns `true` when `authenticator` falls outside the live mempool policy |
| 1903 | /// range. Mirrors the check in [`Self::validate_initial_actors`] and |
nothing calls this directly
no test coverage detected