2

I want to understand deeply how ether transfer processed and how 21000 of gas determined. Is this a simple constant fee of the transfer transaction or ether transfer transaction is the some predefined contract function call and instructions of this function require 21000 of gas for execution?

0
2

If you look at the Ethereum yellow paper, you will see that Appendix G has a table of gas costs for different operations.

In that table, it is defined that:

G transaction = 21000

Paid for every transaction.

Thus the 21000 gas cost of a transaction is "by definition" rather than the calculated gas cost of EVM operations (see EIP-150).

Also look at Ethereum's "Design Rationale - Gas and Fees"

21000 gas is charged for any transaction as a "base fee". This covers the cost of an elliptic curve operation to recover the sender address from the signature as well as the disk and bandwidth space of storing the transaction.

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