Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,7 @@ Ether (without data). Additionally, in order to receive Ether, the fallback func
must be marked ``payable``. If no such function exists, the contract cannot receive
Ether through regular transactions.

In such a context, there is usually very little gas available to the function call (to be precise, 2300 gas),
so it is important to make fallback functions as cheap as possible.
In such a context, there is usually very little gas available to the function call (to be precise, 2300 gas), so it is important to make fallback functions as cheap as possible. Note that the gas required by a transaction (as opposed to an internal call) that invokes the fallback function is much higher, because each transaction charges an additional amount of 21000 gas or more for things like signature checking.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a bit confusing, it seems like 21000 gas is charged so the contract can do signature checking (which is not the case).

However, that 21000 is not usable by the contract if I am not mistaken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not usable by the contract, no. I don't think it reads like what you said though. But ofcourse if you think it can be expressed in some more clear way let's change it.


In particular, the following operations will consume more gas than the stipend provided to a fallback function:

Expand Down