Skip to content

Commit

Permalink
[protocol] split gas fee and burn base fee
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie committed Aug 14, 2024
1 parent 8dcbccf commit c3c26ec
Show file tree
Hide file tree
Showing 28 changed files with 221 additions and 70 deletions.
18 changes: 18 additions & 0 deletions action/actctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ func (act *AbstractAction) GasFeeCap() *big.Int {
return new(big.Int).Set(act.gasFeeCap)
}

// EffectiveGas returns the effective gas
func (act *AbstractAction) EffectiveGas(baseFee *big.Int) (*big.Int, error) {
tip := act.GasTipCap()
if baseFee == nil {
return tip, nil

Check warning on line 82 in action/actctx.go

View check run for this annotation

Codecov / codecov/patch

action/actctx.go#L79-L82

Added lines #L79 - L82 were not covered by tests
}
effectiveGas := act.GasFeeCap()
effectiveGas.Sub(effectiveGas, baseFee)
if effectiveGas.Sign() < 0 {
return effectiveGas, ErrGasFeeCapTooLow

Check warning on line 87 in action/actctx.go

View check run for this annotation

Codecov / codecov/patch

action/actctx.go#L84-L87

Added lines #L84 - L87 were not covered by tests
}
// effective gas = min(tip, feeCap - baseFee)
if effectiveGas.Cmp(tip) <= 0 {
return effectiveGas, nil

Check warning on line 91 in action/actctx.go

View check run for this annotation

Codecov / codecov/patch

action/actctx.go#L90-L91

Added lines #L90 - L91 were not covered by tests
}
return tip, nil

Check warning on line 93 in action/actctx.go

View check run for this annotation

Codecov / codecov/patch

action/actctx.go#L93

Added line #L93 was not covered by tests
}

// BasicActionSize returns the basic size of action
func (act *AbstractAction) BasicActionSize() uint32 {
// VersionSizeInBytes + NonceSizeInBytes + GasSizeInBytes
Expand Down
1 change: 1 addition & 0 deletions action/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var (
ErrNonceTooLow = errors.New("nonce too low")
ErrUnderpriced = errors.New("transaction underpriced")
ErrNegativeValue = errors.New("negative value")
ErrGasFeeCapTooLow = errors.New("fee cap less than base fee")
ErrIntrinsicGas = errors.New("intrinsic gas too low")
ErrInsufficientFunds = errors.New("insufficient funds for gas * price + value")
ErrNonceTooHigh = errors.New("nonce too high")
Expand Down
6 changes: 3 additions & 3 deletions action/protocol/account/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ const protocolID = "account"
// Protocol defines the protocol of handling account
type Protocol struct {
addr address.Address
depositGas DepositGas
depositGas DepositGasAndBurn
}

// DepositGas deposits gas to some pool
type DepositGas func(ctx context.Context, sm protocol.StateManager, amount *big.Int) (*action.TransactionLog, error)
type DepositGasAndBurn func(ctx context.Context, sm protocol.StateManager, priorityFee, baseFee *big.Int) ([]*action.TransactionLog, error)

// NewProtocol instantiates the protocol of account
func NewProtocol(depositGas DepositGas) *Protocol {
func NewProtocol(depositGas DepositGasAndBurn) *Protocol {
h := hash.Hash160b([]byte(protocolID))
addr, err := address.FromBytes(h[:])
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions action/protocol/account/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestProtocol_Initialize(t *testing.T) {
BlockHeight: 0,
})
ctx = protocol.WithFeatureCtx(genesis.WithGenesisContext(ctx, ge))
p := NewProtocol(rewarding.DepositGas)
p := NewProtocol(rewarding.DepositGasAndBurn)
require.NoError(
p.CreateGenesisStates(
ctx,
Expand All @@ -164,7 +164,7 @@ func TestProtocol_Initialize(t *testing.T) {
func TestRegisterOrForceRegister(t *testing.T) {
require := require.New(t)

p := NewProtocol(rewarding.DepositGas)
p := NewProtocol(rewarding.DepositGasAndBurn)
require.Equal(protocolID, p.Name())

registry := protocol.NewRegistry()
Expand All @@ -185,7 +185,7 @@ func TestRegisterOrForceRegister(t *testing.T) {
func TestAssertZeroBlockHeight(t *testing.T) {
require := require.New(t)

p := NewProtocol(rewarding.DepositGas)
p := NewProtocol(rewarding.DepositGasAndBurn)
require.NoError(p.assertZeroBlockHeight(0))
// should return an error if height is not zero
require.Error(p.assertZeroBlockHeight(1))
Expand All @@ -194,7 +194,7 @@ func TestAssertZeroBlockHeight(t *testing.T) {
func TestAssertAmountsAndEqualLength(t *testing.T) {
require := require.New(t)

p := NewProtocol(rewarding.DepositGas)
p := NewProtocol(rewarding.DepositGasAndBurn)
amounts := []*big.Int{
big.NewInt(0),
big.NewInt(1),
Expand Down
26 changes: 17 additions & 9 deletions action/protocol/account/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,32 @@ func (p *Protocol) handleTransfer(ctx context.Context, tsf *action.Transfer, sm
return nil, errors.Wrapf(err, "failed to load or create the account of sender %s", actionCtx.Caller.String())
}

gasFee := big.NewInt(0).Mul(tsf.GasPrice(), big.NewInt(0).SetUint64(actionCtx.IntrinsicGas))
if !sender.HasSufficientBalance(big.NewInt(0).Add(tsf.Amount(), gasFee)) {
gasFee, baseFee, err := protocol.SplitGas(ctx, tsf.AbstractAction)
if err != nil {
return nil, errors.Wrapf(err, "failed to split gas")
}
total := big.NewInt(0).Add(tsf.Amount(), gasFee)
if baseFee != nil {
total.Add(total, baseFee)

Check warning on line 48 in action/protocol/account/transfer.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/account/transfer.go#L48

Added line #L48 was not covered by tests
}
if !sender.HasSufficientBalance(total) {
return nil, errors.Wrapf(
state.ErrNotEnoughBalance,
"sender %s balance %s, required amount %s",
actionCtx.Caller.String(),
sender.Balance,
big.NewInt(0).Add(tsf.Amount(), gasFee),
total,
)
}

var depositLog *action.TransactionLog
var depositLog []*action.TransactionLog
if !fCtx.FixDoubleChargeGas {
// charge sender gas
if err := sender.SubBalance(gasFee); err != nil {
return nil, errors.Wrapf(err, "failed to charge the gas for sender %s", actionCtx.Caller.String())
}
if p.depositGas != nil {
depositLog, err = p.depositGas(ctx, sm, gasFee)
depositLog, err = p.depositGas(ctx, sm, gasFee, baseFee)

Check warning on line 67 in action/protocol/account/transfer.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/account/transfer.go#L67

Added line #L67 was not covered by tests
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -91,7 +98,7 @@ func (p *Protocol) handleTransfer(ctx context.Context, tsf *action.Transfer, sm
}
if fCtx.FixDoubleChargeGas {
if p.depositGas != nil {
depositLog, err = p.depositGas(ctx, sm, gasFee)
depositLog, err = p.depositGas(ctx, sm, gasFee, baseFee)
if err != nil {
return nil, err
}
Expand All @@ -104,7 +111,7 @@ func (p *Protocol) handleTransfer(ctx context.Context, tsf *action.Transfer, sm
GasConsumed: actionCtx.IntrinsicGas,
ContractAddress: p.addr.String(),
}
receipt.AddTransactionLogs(depositLog)
receipt.AddTransactionLogs(depositLog...)
return receipt, nil
}

Expand Down Expand Up @@ -133,7 +140,7 @@ func (p *Protocol) handleTransfer(ctx context.Context, tsf *action.Transfer, sm

if fCtx.FixDoubleChargeGas {
if p.depositGas != nil {
depositLog, err = p.depositGas(ctx, sm, gasFee)
depositLog, err = p.depositGas(ctx, sm, gasFee, baseFee)
if err != nil {
return nil, err
}
Expand All @@ -152,7 +159,8 @@ func (p *Protocol) handleTransfer(ctx context.Context, tsf *action.Transfer, sm
Sender: actionCtx.Caller.String(),
Recipient: tsf.Recipient(),
Amount: tsf.Amount(),
}, depositLog)
})
receipt.AddTransactionLogs(depositLog...)

return receipt, nil
}
Expand Down
7 changes: 5 additions & 2 deletions action/protocol/account/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

func TestProtocol_ValidateTransfer(t *testing.T) {
require := require.New(t)
p := NewProtocol(rewarding.DepositGas)
p := NewProtocol(rewarding.DepositGasAndBurn)
t.Run("invalid transfer", func(t *testing.T) {
tsf, err := action.NewTransfer(uint64(1), big.NewInt(1), "2", make([]byte, 32683), uint64(0), big.NewInt(0))
require.NoError(err)
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestProtocol_HandleTransfer(t *testing.T) {
sm := testdb.NewMockStateManager(ctrl)

// set-up protocol and genesis states
p := NewProtocol(rewarding.DepositGas)
p := NewProtocol(rewarding.DepositGasAndBurn)
reward := rewarding.NewProtocol(genesis.Default.Rewarding)
registry := protocol.NewRegistry()
require.NoError(reward.Register(registry))
Expand Down Expand Up @@ -126,6 +126,9 @@ func TestProtocol_HandleTransfer(t *testing.T) {
Producer: identityset.Address(27),
GasLimit: testutil.TestGasLimit,
})
ctx = protocol.WithBlockchainCtx(ctx, protocol.BlockchainCtx{
Tip: protocol.TipInfo{},
})

sender, err := accountutil.AccountState(ctx, sm, v.caller)
require.NoError(err)
Expand Down
4 changes: 2 additions & 2 deletions action/protocol/execution/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func (sct *SmartContractTest) prepareBlockchain(
cfg.Genesis.InitBalanceMap[expectedBalance.Account] = expectedBalance.Balance().String()
}
registry := protocol.NewRegistry()
acc := account.NewProtocol(rewarding.DepositGas)
acc := account.NewProtocol(rewarding.DepositGasAndBurn)
r.NoError(acc.Register(registry))
rp := rolldpos.NewProtocol(cfg.Genesis.NumCandidateDelegates, cfg.Genesis.NumDelegates, cfg.Genesis.NumSubEpochs)
r.NoError(rp.Register(registry))
Expand Down Expand Up @@ -703,7 +703,7 @@ func TestProtocol_Handle(t *testing.T) {
ctx := genesis.WithGenesisContext(context.Background(), cfg.Genesis)

registry := protocol.NewRegistry()
acc := account.NewProtocol(rewarding.DepositGas)
acc := account.NewProtocol(rewarding.DepositGasAndBurn)
require.NoError(acc.Register(registry))
rp := rolldpos.NewProtocol(cfg.Genesis.NumCandidateDelegates, cfg.Genesis.NumDelegates, cfg.Genesis.NumSubEpochs)
require.NoError(rp.Register(registry))
Expand Down
22 changes: 22 additions & 0 deletions action/protocol/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package protocol

import (
"context"
"math/big"

"github.com/iotexproject/go-pkgs/hash"
"github.com/iotexproject/iotex-address/address"
Expand Down Expand Up @@ -102,3 +103,24 @@ func HashStringToAddress(str string) address.Address {
}
return addr
}

func SplitGas(ctx context.Context, tx action.AbstractAction) (*big.Int, *big.Int, error) {
var (
bcCtx = MustGetBlockchainCtx(ctx)
baseFee = bcCtx.Tip.BaseFee
actionCtx = MustGetActionCtx(ctx)
gas = new(big.Int).SetUint64(actionCtx.IntrinsicGas)
)
priority, err := tx.EffectiveGas(baseFee)
if err != nil {

Check warning on line 115 in action/protocol/protocol.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/protocol.go#L107-L115

Added lines #L107 - L115 were not covered by tests
return nil, nil, err
}
if baseFee == nil {
return priority.Mul(priority, gas), nil, nil

Check warning on line 119 in action/protocol/protocol.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/protocol.go#L118-L119

Added lines #L118 - L119 were not covered by tests
}
// after enabling EIP-1559, fee is split into 2 parts
// priority fee goes to the rewarding pool (or block producer) as before
// base fee will be burnt
base := new(big.Int).Set(baseFee)
return priority.Mul(priority, gas), base.Mul(base, gas), nil

Check warning on line 125 in action/protocol/protocol.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/protocol.go#L124-L125

Added lines #L124 - L125 were not covered by tests
}
99 changes: 99 additions & 0 deletions action/protocol/rewarding/fund.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,79 @@ func (p *Protocol) Deposit(
}, nil
}

func (p *Protocol) depositAndBurn(
ctx context.Context,
sm protocol.StateManager,
burnAddr address.Address,
amount, burnAmount *big.Int,
rewardLogType, burnLogType iotextypes.TransactionLogType,
) ([]*action.TransactionLog, error) {
var (
actionCtx = protocol.MustGetActionCtx(ctx)
fCtx = protocol.MustGetFeatureCtx(ctx)
accountCreationOpts = []state.AccountCreationOption{}
)
if fCtx.CreateLegacyNonceAccount {
accountCreationOpts = append(accountCreationOpts, state.LegacyNonceAccountTypeOption())

Check warning on line 114 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L107-L114

Added lines #L107 - L114 were not covered by tests
}
// Subtract balance from caller
acc, err := accountutil.LoadAccount(sm, actionCtx.Caller, accountCreationOpts...)
if err != nil {

Check warning on line 118 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L117-L118

Added lines #L117 - L118 were not covered by tests
return nil, err
}
if err := acc.SubBalance(amount); err != nil {

Check warning on line 121 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L121

Added line #L121 was not covered by tests
return nil, err
}
if !isZero(burnAmount) {
if err := acc.SubBalance(burnAmount); err != nil {

Check warning on line 125 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L124-L125

Added lines #L124 - L125 were not covered by tests
return nil, err
}
}
if err := accountutil.StoreAccount(sm, actionCtx.Caller, acc); err != nil {

Check warning on line 129 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L129

Added line #L129 was not covered by tests
return nil, err
}
// Add balance to fund
var (
f = fund{}
tLog = []*action.TransactionLog{

Check warning on line 135 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L133-L135

Added lines #L133 - L135 were not covered by tests
{
Type: rewardLogType,
Sender: actionCtx.Caller.String(),
Recipient: address.RewardingPoolAddr,
Amount: amount,
},

Check warning on line 141 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L137-L141

Added lines #L137 - L141 were not covered by tests
}
)
if _, err := p.state(ctx, sm, _fundKey, &f); err != nil {

Check warning on line 144 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L143-L144

Added lines #L143 - L144 were not covered by tests
return nil, err
}
f.totalBalance.Add(f.totalBalance, amount)
f.unclaimedBalance.Add(f.unclaimedBalance, amount)
if !isZero(burnAmount) {

Check warning on line 149 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L147-L149

Added lines #L147 - L149 were not covered by tests
// add burnAmount to burnAddr
burn, err := accountutil.LoadAccount(sm, burnAddr, accountCreationOpts...)
if err != nil {

Check warning on line 152 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L151-L152

Added lines #L151 - L152 were not covered by tests
return nil, err
}
if err := burn.AddBalance(burnAmount); err != nil {

Check warning on line 155 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L155

Added line #L155 was not covered by tests
return nil, err
}
if err := accountutil.StoreAccount(sm, burnAddr, burn); err != nil {

Check warning on line 158 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L158

Added line #L158 was not covered by tests
return nil, err
}
tLog = append(tLog, &action.TransactionLog{
Type: burnLogType,
Sender: actionCtx.Caller.String(),
Recipient: burnAddr.String(),
Amount: burnAmount,
})

Check warning on line 166 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L161-L166

Added lines #L161 - L166 were not covered by tests
}
if err := p.putState(ctx, sm, _fundKey, &f); err != nil {

Check warning on line 168 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L168

Added line #L168 was not covered by tests
return nil, err
}
return tLog, nil

Check warning on line 171 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L171

Added line #L171 was not covered by tests
}

// TotalBalance returns the total balance of the rewarding fund
func (p *Protocol) TotalBalance(
ctx context.Context,
Expand Down Expand Up @@ -146,3 +219,29 @@ func DepositGas(ctx context.Context, sm protocol.StateManager, amount *big.Int)
}
return rp.Deposit(ctx, sm, amount, iotextypes.TransactionLogType_GAS_FEE)
}

// DepositGasAndBurn deposits gas into the rewarding fund and burns the base fee
func DepositGasAndBurn(ctx context.Context, sm protocol.StateManager, amount, baseFee *big.Int) ([]*action.TransactionLog, error) {

Check warning on line 224 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L224

Added line #L224 was not covered by tests
// If the gas fee is 0, return immediately
if amount.Cmp(big.NewInt(0)) == 0 {
return nil, nil

Check warning on line 227 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L226-L227

Added lines #L226 - L227 were not covered by tests
}
blkCtx := protocol.MustGetBlockCtx(ctx)
if blkCtx.BlockHeight == 0 {
return nil, nil

Check warning on line 231 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L229-L231

Added lines #L229 - L231 were not covered by tests
}
reg, ok := protocol.GetRegistry(ctx)
if !ok {
return nil, nil

Check warning on line 235 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L233-L235

Added lines #L233 - L235 were not covered by tests
}
rp := FindProtocol(reg)
if rp == nil {
return nil, nil

Check warning on line 239 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L237-L239

Added lines #L237 - L239 were not covered by tests
}
burn, _ := address.FromString(address.ZeroAddress)
return rp.depositAndBurn(ctx, sm, burn, amount, baseFee, iotextypes.TransactionLogType_GAS_FEE, iotextypes.TransactionLogType_NATIVE_TRANSFER)

Check warning on line 242 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L241-L242

Added lines #L241 - L242 were not covered by tests
}

func isZero(a *big.Int) bool {
return a == nil || len(a.Bytes()) == 0

Check warning on line 246 in action/protocol/rewarding/fund.go

View check run for this annotation

Codecov / codecov/patch

action/protocol/rewarding/fund.go#L245-L246

Added lines #L245 - L246 were not covered by tests
}
4 changes: 2 additions & 2 deletions action/protocol/rewarding/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func testProtocol(t *testing.T, test func(*testing.T, context.Context, protocol.
)
ctx = genesis.WithGenesisContext(ctx, g)
ctx = protocol.WithFeatureCtx(ctx)
ap := account.NewProtocol(DepositGas)
ap := account.NewProtocol(DepositGasAndBurn)
require.NoError(t, ap.Register(registry))
require.NoError(t, ap.CreateGenesisStates(ctx, sm))
require.NoError(t, p.CreateGenesisStates(ctx, sm))
Expand Down Expand Up @@ -348,7 +348,7 @@ func TestProtocol_Handle(t *testing.T) {

ctx = genesis.WithGenesisContext(protocol.WithRegistry(ctx, registry), g)
ctx = protocol.WithFeatureCtx(ctx)
ap := account.NewProtocol(DepositGas)
ap := account.NewProtocol(DepositGasAndBurn)
require.NoError(t, ap.Register(registry))
require.NoError(t, ap.CreateGenesisStates(ctx, sm))
require.NoError(t, p.CreateGenesisStates(ctx, sm))
Expand Down
2 changes: 1 addition & 1 deletion action/protocol/rewarding/reward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ func TestProtocol_NoRewardAddr(t *testing.T) {
},
)
ctx = protocol.WithFeatureCtx(ctx)
ap := account.NewProtocol(DepositGas)
ap := account.NewProtocol(DepositGasAndBurn)
require.NoError(t, ap.CreateGenesisStates(ctx, sm))
require.NoError(t, p.CreateGenesisStates(ctx, sm))
ctx = protocol.WithBlockchainCtx(
Expand Down
2 changes: 1 addition & 1 deletion actpool/actpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestValidate(t *testing.T) {
g := genesis.Default
g.InitBalanceMap[_addr1] = "100"
re := protocol.NewRegistry()
acc := account.NewProtocol(rewarding.DepositGas)
acc := account.NewProtocol(rewarding.DepositGasAndBurn)
require.NoError(acc.Register(re))
ctx := genesis.WithGenesisContext(
protocol.WithRegistry(context.Background(), re),
Expand Down
2 changes: 1 addition & 1 deletion api/serverV2_integrity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func setupChain(cfg testConfig) (blockchain.Blockchain, blockdao.BlockDAO, block
testutil.CleanupPath(testPath)
}()

acc := account.NewProtocol(rewarding.DepositGas)
acc := account.NewProtocol(rewarding.DepositGasAndBurn)
evm := execution.NewProtocol(dao.GetBlockHash, rewarding.DepositGas, func(u uint64) (time.Time, error) { return time.Time{}, nil })
p := poll.NewLifeLongDelegatesProtocol(cfg.genesis.Delegates)
rolldposProtocol := rolldpos.NewProtocol(
Expand Down
Loading

0 comments on commit c3c26ec

Please sign in to comment.