6

From looking at the source code, it looks like system pallet's remark extrinsic has null weight.

Even though remarks don't add anything in terms of block execution, one could argue it's still having an influence on block size and therefore having an effect on how fast nodes are able to sync the chain.

How are remarks accounted for? What is preventing some troll from flooding the blocks with meaningless remarks without paying proportionally for that priviledge?

1
  • Great question.
    – Squirrel
    Commented Mar 24, 2022 at 8:51

1 Answer 1

6

Every extrinsic has an ExtrinsicBaseWeight which is defined in FRAME System.

So even if a benchmark for a particular extrinsic says 0, there will still be the ExtrinsicBaseWeight included on top of it. This is also true for any non-zero weight. The final weight of the extrinsic will be benchmark_weight + extrinsic_base_weight.

In fact, we measure the ExtrinsicBaseWeight using the remark function, so this weight is completely appropriate for the call.

Beyond this base fee, all extrinsics have a TransactionByteFee which is set in the Transaction Payment Pallet. This will increase the fees charged to the user based on how many bytes they use in their encoded extrinsic.

So the longer your remark message, the larger the fee you will pay.

These two things combined ensure that appropriate fees are paid for remark extrinsics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.