Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoQuorum private tx use zero gas (mining) #1924

Merged
merged 8 commits into from
Feb 18, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ Responsible for updating the state maintained between transaction validation (i.
*/
private void updateTransactionResultTracking(
final Transaction transaction, final TransactionProcessingResult result) {
final long gasUsedByTransaction = transaction.getGasLimit() - result.getGasRemaining();
final long gasUsedByTransaction =
transaction.isGoQuorumPrivateTransaction()
? 0
: transaction.getGasLimit() - result.getGasRemaining();

final long cumulativeGasUsed;
if (ExperimentalEIPs.eip1559Enabled && eip1559.isPresent()) {
cumulativeGasUsed =
Expand Down Expand Up @@ -285,7 +289,7 @@ private boolean transactionTooLargeForBlock(
default:
throw new IllegalStateException(
String.format(
"Developer error. Supported transaction type %s deoesn't have a block gas budget calculator",
"Developer error. Supported transaction type %s doesn't have a block gas budget calculator",
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

transaction.getType()));
}
} else {
Expand Down