Skip to content

Commit 75bf757

Browse files
authored
Merge pull request #500 from OffchainLabs/remove-support-for-tips
Remove support for tips
2 parents 6f459d8 + d1f50cb commit 75bf757

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

arbos/tx_processor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ func (p *TxProcessor) PopCaller() {
6666
p.Callers = p.Callers[:len(p.Callers)-1]
6767
}
6868

69+
func (p *TxProcessor) DropTip() bool {
70+
return p.state.FormatVersion() >= 2
71+
}
72+
6973
func (p *TxProcessor) StartTxHook() (endTxNow bool, gasUsed uint64, err error, returnData []byte) {
7074
// This hook is called before gas charging and will end the state transition if endTxNow is set to true
7175
// Hence, we must charge for any l2 resources if endTxNow is returned true

go-ethereum

system_tests/fees_test.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ package arbtest
55

66
import (
77
"context"
8+
"math/big"
9+
"testing"
10+
811
"github.com/ethereum/go-ethereum/params"
912
"github.com/offchainlabs/nitro/arbcompress"
1013
"github.com/offchainlabs/nitro/arbos/l1pricing"
11-
"math/big"
12-
"testing"
1314

1415
"github.com/ethereum/go-ethereum/common"
1516
"github.com/ethereum/go-ethereum/core/types"
@@ -69,17 +70,13 @@ func TestTips(t *testing.T) {
6970
}
7071

7172
tip := arbmath.BigMulByUint(arbmath.BigSub(tx.GasPrice(), basefee), receipt.GasUsed)
72-
full := arbmath.BigMulByUint(tx.GasPrice(), receipt.GasUsed)
73+
full := arbmath.BigMulByUint(basefee, receipt.GasUsed) // was gasprice before upgrade
7374
networkRevenue := arbmath.BigSub(networkAfter, networkBefore)
74-
colors.PrintMint("tip: ", tip, full, networkRevenue)
75-
75+
colors.PrintMint("price: ", tip, full, networkRevenue)
7676
colors.PrintRed("used: ", receipt.GasUsed, basefee)
7777

78-
if !arbmath.BigEquals(tip, arbmath.BigMulByFrac(networkRevenue, 1, 5)) {
79-
Fail(t, "1/5th of the network's revenue should be the tip")
80-
}
8178
if !arbmath.BigEquals(full, networkRevenue) {
82-
Fail(t, "the network didn't receive the tip")
79+
Fail(t, "the network didn't receive the funds")
8380
}
8481
}
8582

0 commit comments

Comments
 (0)