paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.89k stars 696 forks source link

Unable to submit a tx if balance is low even when it is marked with `#[pallet::feeless_if(...)]` #6480

Open gupnik opened 2 days ago

gupnik commented 2 days ago

While testing #[pallet::feeless_if(...)] macro: I've discovered that even though the fees are not charged when transaction goes through, I'm not able to submit a transaction if the balance is low (zero):

code: ServerError(1010), message: "Invalid Transaction", data: Some(RawValue("Inability to pay some fees (e.g. account balance too low)"

CC: @ordian

ordian commented 1 day ago

I've noticed that even adding #[pallet::weight((0, Pays::No))] results in the same error, that hints at dropping balance below ED:

the account does not have enough free funds (excluding locked/bonded/reserved) available to cover the transaction fees without dropping the balance below the account existential amount.

ordian commented 1 day ago

cc https://github.com/paritytech/polkadot-sdk/pull/6490, https://github.com/paritytech/polkadot-sdk/issues/6489