Ethereum EIP-1559 fees: Calculate base fee, priority fee and cap
Under the relevant EIP-1559 transaction model, base fee, priority-fee cap and total per-gas cap have different roles. The highest price allowed is not always the price paid, and the full priority cap cannot be added if it exceeds the total cap. Actual gas usage is then needed to calculate the execution charge.