From 4d6efae73c73d01a37430266130816ff03aad7e7 Mon Sep 17 00:00:00 2001 From: Zhijie Shen <35021395+zjshen14@users.noreply.github.com> Date: Wed, 13 Mar 2019 21:38:55 -0700 Subject: [PATCH] Remove admin and its operations from rewarding protocol (#740) --- action/action.go | 8 - action/protocol/rewarding/admin.go | 112 ------- action/protocol/rewarding/admin_test.go | 121 ------- action/protocol/rewarding/protocol.go | 15 - action/protocol/rewarding/protocol_test.go | 6 - .../rewarding/rewardingpb/rewarding.pb.go | 41 +-- .../rewarding/rewardingpb/rewarding.proto | 1 - action/rewardmsg_test.go | 12 - action/setreward.go | 127 -------- blockchain/blockchain.go | 1 - blockchain/genesis/genesis.go | 13 - blockchain/genesis/genesis_test.go | 3 +- proto/types/action.proto | 9 +- protogen/iotextypes/action.pb.go | 296 +++++++----------- tools/staterecoverer/staterecoverer.go | 2 +- 15 files changed, 130 insertions(+), 637 deletions(-) delete mode 100644 action/protocol/rewarding/admin_test.go delete mode 100644 action/setreward.go diff --git a/action/action.go b/action/action.go index 05ea231013..66aaca9f78 100644 --- a/action/action.go +++ b/action/action.go @@ -135,8 +135,6 @@ func (elp *Envelope) Proto() *iotextypes.ActionCore { actCore.Action = &iotextypes.ActionCore_SettleDeposit{SettleDeposit: act.Proto()} case *GrantReward: actCore.Action = &iotextypes.ActionCore_GrantReward{GrantReward: act.Proto()} - case *SetReward: - actCore.Action = &iotextypes.ActionCore_SetReward{SetReward: act.Proto()} case *ClaimFromRewardingFund: actCore.Action = &iotextypes.ActionCore_ClaimFromRewardingFund{ClaimFromRewardingFund: act.Proto()} case *DepositToRewardingFund: @@ -219,12 +217,6 @@ func (elp *Envelope) LoadProto(pbAct *iotextypes.ActionCore) error { return err } elp.payload = act - case pbAct.GetSetReward() != nil: - act := &SetReward{} - if err := act.LoadProto(pbAct.GetSetReward()); err != nil { - return err - } - elp.payload = act case pbAct.GetClaimFromRewardingFund() != nil: act := &ClaimFromRewardingFund{} if err := act.LoadProto(pbAct.GetClaimFromRewardingFund()); err != nil { diff --git a/action/protocol/rewarding/admin.go b/action/protocol/rewarding/admin.go index 38d52fc3a9..b8681f3487 100644 --- a/action/protocol/rewarding/admin.go +++ b/action/protocol/rewarding/admin.go @@ -7,7 +7,6 @@ package rewarding import ( - "bytes" "context" "math/big" @@ -21,7 +20,6 @@ import ( // admin stores the admin data of the rewarding protocol type admin struct { - admin address.Address blockReward *big.Int epochReward *big.Int numDelegatesForEpochReward uint64 @@ -30,7 +28,6 @@ type admin struct { // Serialize serializes admin state into bytes func (a admin) Serialize() ([]byte, error) { gen := rewardingpb.Admin{ - Admin: a.admin.Bytes(), BlockReward: a.blockReward.String(), EpochReward: a.epochReward.String(), NumDelegatesForEpochReward: a.numDelegatesForEpochReward, @@ -44,10 +41,6 @@ func (a *admin) Deserialize(data []byte) error { if err := proto.Unmarshal(data, &gen); err != nil { return err } - var err error - if a.admin, err = address.FromBytes(gen.Admin); err != nil { - return err - } blockReward, ok := big.NewInt(0).SetString(gen.BlockReward, 10) if !ok { return errors.New("failed to set block reward") @@ -97,7 +90,6 @@ func (e *exempt) Deserialize(data []byte) error { func (p *Protocol) Initialize( ctx context.Context, sm protocol.StateManager, - adminAddr address.Address, initBalance *big.Int, blockReward *big.Int, epochReward *big.Int, @@ -118,7 +110,6 @@ func (p *Protocol) Initialize( sm, adminKey, &admin{ - admin: adminAddr, blockReward: blockReward, epochReward: epochReward, numDelegatesForEpochReward: numDelegatesForEpochReward, @@ -145,36 +136,6 @@ func (p *Protocol) Initialize( ) } -// Admin returns the address of current admin -func (p *Protocol) Admin( - _ context.Context, - sm protocol.StateManager, -) (address.Address, error) { - admin := admin{} - if err := p.state(sm, adminKey, &admin); err != nil { - return nil, err - } - return admin.admin, nil -} - -// SetAdmin sets a new admin address. Only the current admin could make this change -func (p *Protocol) SetAdmin( - ctx context.Context, - sm protocol.StateManager, - addr address.Address, -) error { - raCtx := protocol.MustGetRunActionsCtx(ctx) - if err := p.assertAdminPermission(raCtx, sm); err != nil { - return err - } - a := admin{} - if err := p.state(sm, adminKey, &a); err != nil { - return err - } - a.admin = addr - return p.putState(sm, adminKey, &a) -} - // BlockReward returns the block reward amount func (p *Protocol) BlockReward( _ context.Context, @@ -187,15 +148,6 @@ func (p *Protocol) BlockReward( return a.blockReward, nil } -// SetBlockReward sets the block reward amount for the block rewarding. Only the current admin could make this change -func (p *Protocol) SetBlockReward( - ctx context.Context, - sm protocol.StateManager, - amount *big.Int, -) error { - return p.setReward(ctx, sm, amount, true) -} - // EpochReward returns the epoch reward amount func (p *Protocol) EpochReward( _ context.Context, @@ -208,16 +160,6 @@ func (p *Protocol) EpochReward( return a.epochReward, nil } -// SetEpochReward sets the epoch reward amount shared by all beneficiaries in an epoch. Only the current admin could -// make this change -func (p *Protocol) SetEpochReward( - ctx context.Context, - sm protocol.StateManager, - amount *big.Int, -) error { - return p.setReward(ctx, sm, amount, false) -} - // NumDelegatesForEpochReward returns the number of candidates sharing an epoch reward func (p *Protocol) NumDelegatesForEpochReward( _ context.Context, @@ -230,24 +172,6 @@ func (p *Protocol) NumDelegatesForEpochReward( return a.numDelegatesForEpochReward, nil } -// SetNumDelegatesForEpochReward sets the number of candidates sharing an epoch reward -func (p *Protocol) SetNumDelegatesForEpochReward( - ctx context.Context, - sm protocol.StateManager, - num uint64, -) error { - raCtx := protocol.MustGetRunActionsCtx(ctx) - if err := p.assertAdminPermission(raCtx, sm); err != nil { - return err - } - a := admin{} - if err := p.state(sm, adminKey, &a); err != nil { - return err - } - a.numDelegatesForEpochReward = num - return p.putState(sm, adminKey, &a) -} - func (p *Protocol) assertAmount(amount *big.Int) error { if amount.Cmp(big.NewInt(0)) >= 0 { return nil @@ -255,45 +179,9 @@ func (p *Protocol) assertAmount(amount *big.Int) error { return errors.Errorf("reward amount %s shouldn't be negative", amount.String()) } -func (p *Protocol) assertAdminPermission(raCtx protocol.RunActionsCtx, sm protocol.StateManager) error { - a := admin{} - if err := p.state(sm, adminKey, &a); err != nil { - return err - } - if bytes.Equal(a.admin.Bytes(), raCtx.Caller.Bytes()) { - return nil - } - return errors.Errorf("%s is not the rewarding protocol admin", raCtx.Caller.String()) -} - func (p *Protocol) assertZeroBlockHeight(height uint64) error { if height != 0 { return errors.Errorf("current block height %d is not zero", height) } return nil } - -func (p *Protocol) setReward( - ctx context.Context, - sm protocol.StateManager, - amount *big.Int, - blockLevel bool, -) error { - raCtx := protocol.MustGetRunActionsCtx(ctx) - if err := p.assertAdminPermission(raCtx, sm); err != nil { - return err - } - if err := p.assertAmount(amount); err != nil { - return err - } - a := admin{} - if err := p.state(sm, adminKey, &a); err != nil { - return err - } - if blockLevel { - a.blockReward = amount - } else { - a.epochReward = amount - } - return p.putState(sm, adminKey, &a) -} diff --git a/action/protocol/rewarding/admin_test.go b/action/protocol/rewarding/admin_test.go deleted file mode 100644 index 3c44d340d2..0000000000 --- a/action/protocol/rewarding/admin_test.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2019 IoTeX -// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no -// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent -// permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache -// License 2.0 that can be found in the LICENSE file. - -package rewarding - -import ( - "context" - "math/big" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/iotexproject/iotex-core/action/protocol" - "github.com/iotexproject/iotex-core/state/factory" - "github.com/iotexproject/iotex-core/test/testaddress" -) - -func TestProtocol_Admin(t *testing.T) { - testProtocol(t, func(t *testing.T, ctx context.Context, stateDB factory.Factory, p *Protocol) { - // Update block reward - ws, err := stateDB.NewWorkingSet() - require.NoError(t, err) - require.NoError(t, p.SetBlockReward(ctx, ws, big.NewInt(20))) - stateDB.Commit(ws) - - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - blockReward, err := p.BlockReward(ctx, ws) - require.NoError(t, err) - assert.Equal(t, big.NewInt(20), blockReward) - - // Set block reward again will fail because caller is not admin - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.NoError(t, err) - require.Error(t, p.SetBlockReward( - protocol.WithRunActionsCtx( - context.Background(), - protocol.RunActionsCtx{ - Caller: testaddress.Addrinfo["bravo"], - }, - ), - ws, - big.NewInt(30), - )) - - // Update epoch reward - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.NoError(t, p.SetEpochReward(ctx, ws, big.NewInt(200))) - stateDB.Commit(ws) - - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - epochReward, err := p.EpochReward(ctx, ws) - require.NoError(t, err) - assert.Equal(t, big.NewInt(200), epochReward) - - // Set epoch reward again will fail because caller is not admin - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.Error(t, p.SetEpochReward( - protocol.WithRunActionsCtx( - context.Background(), - protocol.RunActionsCtx{ - Caller: testaddress.Addrinfo["bravo"], - }, - ), - ws, - big.NewInt(300), - )) - - // Update num of candidates to share a epoch reward - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.NoError(t, p.SetNumDelegatesForEpochReward(ctx, ws, 20)) - stateDB.Commit(ws) - - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - numDelegatesForEpochReward, err := p.NumDelegatesForEpochReward(ctx, ws) - require.NoError(t, err) - assert.Equal(t, uint64(20), numDelegatesForEpochReward) - - // Set num of candidates again will fail because caller is not admin - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.Error(t, p.SetNumDelegatesForEpochReward( - protocol.WithRunActionsCtx( - context.Background(), - protocol.RunActionsCtx{ - Caller: testaddress.Addrinfo["bravo"], - }, - ), - ws, - 30, - )) - - // Update admin - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.NoError(t, p.SetAdmin(ctx, ws, testaddress.Addrinfo["charlie"])) - stateDB.Commit(ws) - - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - adminAddr, err := p.Admin(ctx, ws) - require.NoError(t, err) - assert.Equal(t, testaddress.Addrinfo["charlie"].Bytes(), adminAddr.Bytes()) - - // Update admin again will fail because addr is no longer the admin - ws, err = stateDB.NewWorkingSet() - require.NoError(t, err) - require.Error(t, p.SetAdmin(ctx, ws, testaddress.Addrinfo["delta"])) - }, false) - -} diff --git a/action/protocol/rewarding/protocol.go b/action/protocol/rewarding/protocol.go index 2e69884843..da7594346a 100644 --- a/action/protocol/rewarding/protocol.go +++ b/action/protocol/rewarding/protocol.go @@ -71,21 +71,6 @@ func (p *Protocol) Handle( ) (*action.Receipt, error) { // TODO: simplify the boilerplate switch act := act.(type) { - case *action.SetReward: - switch act.RewardType() { - case action.BlockReward: - si := sm.Snapshot() - if err := p.SetBlockReward(ctx, sm, act.Amount()); err != nil { - return p.settleAction(ctx, sm, action.FailureReceiptStatus, si) - } - return p.settleAction(ctx, sm, action.SuccessReceiptStatus, si) - case action.EpochReward: - si := sm.Snapshot() - if err := p.SetEpochReward(ctx, sm, act.Amount()); err != nil { - return p.settleAction(ctx, sm, action.FailureReceiptStatus, si) - } - return p.settleAction(ctx, sm, action.SuccessReceiptStatus, si) - } case *action.DepositToRewardingFund: si := sm.Snapshot() if err := p.Deposit(ctx, sm, act.Amount()); err != nil { diff --git a/action/protocol/rewarding/protocol_test.go b/action/protocol/rewarding/protocol_test.go index 74ac32b046..0425603916 100644 --- a/action/protocol/rewarding/protocol_test.go +++ b/action/protocol/rewarding/protocol_test.go @@ -95,7 +95,6 @@ func testProtocol(t *testing.T, test func(*testing.T, context.Context, factory.F p.Initialize( ctx, ws, - testaddress.Addrinfo["alfa"], big.NewInt(0), big.NewInt(10), big.NewInt(100), @@ -110,7 +109,6 @@ func testProtocol(t *testing.T, test func(*testing.T, context.Context, factory.F p.Initialize( ctx, ws, - testaddress.Addrinfo["alfa"], big.NewInt(0), big.NewInt(10), big.NewInt(100), @@ -131,9 +129,6 @@ func testProtocol(t *testing.T, test func(*testing.T, context.Context, factory.F ) ws, err = stateDB.NewWorkingSet() require.NoError(t, err) - adminAddr, err := p.Admin(ctx, ws) - require.NoError(t, err) - assert.Equal(t, testaddress.Addrinfo["alfa"].Bytes(), adminAddr.Bytes()) blockReward, err := p.BlockReward(ctx, ws) require.NoError(t, err) assert.Equal(t, big.NewInt(10), blockReward) @@ -188,7 +183,6 @@ func TestProtocol_Handle(t *testing.T) { require.NoError(t, p.Initialize( ctx, ws, - identityset.Address(0), big.NewInt(1000000), big.NewInt(10), big.NewInt(100), diff --git a/action/protocol/rewarding/rewardingpb/rewarding.pb.go b/action/protocol/rewarding/rewardingpb/rewarding.pb.go index 38011598cd..316be1b4b7 100644 --- a/action/protocol/rewarding/rewardingpb/rewarding.pb.go +++ b/action/protocol/rewarding/rewardingpb/rewarding.pb.go @@ -21,7 +21,6 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Admin struct { - Admin []byte `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` BlockReward string `protobuf:"bytes,2,opt,name=blockReward,proto3" json:"blockReward,omitempty"` EpochReward string `protobuf:"bytes,3,opt,name=epochReward,proto3" json:"epochReward,omitempty"` NumDelegatesForEpochReward uint64 `protobuf:"varint,4,opt,name=numDelegatesForEpochReward,proto3" json:"numDelegatesForEpochReward,omitempty"` @@ -55,13 +54,6 @@ func (m *Admin) XXX_DiscardUnknown() { var xxx_messageInfo_Admin proto.InternalMessageInfo -func (m *Admin) GetAdmin() []byte { - if m != nil { - return m.Admin - } - return nil -} - func (m *Admin) GetBlockReward() string { if m != nil { return m.BlockReward @@ -250,21 +242,20 @@ func init() { func init() { proto.RegisterFile("rewarding.proto", fileDescriptor_a5a8d72c965c1359) } var fileDescriptor_a5a8d72c965c1359 = []byte{ - // 244 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x4b, 0x03, 0x31, - 0x10, 0x85, 0x89, 0xdd, 0x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0x79, 0x7d, 0x12, 0x3f, 0x9e, 0xf2, - 0x1a, 0x66, 0xdb, 0x0f, 0x6c, 0xbb, 0x98, 0x17, 0xb3, 0xa1, 0x2f, 0x99, 0x98, 0xe4, 0xc5, 0x6c, - 0xe8, 0xeb, 0xd9, 0xb0, 0xf2, 0xfd, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x97, 0xe8, 0x8b, - 0x78, 0x01, 0x00, 0x00, + // 233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xc1, 0x4b, 0xc3, 0x30, + 0x14, 0xc6, 0x89, 0xeb, 0x36, 0x7c, 0x9b, 0x4c, 0x82, 0x87, 0xe2, 0x41, 0x4a, 0xbc, 0x14, 0x0f, + 0x5e, 0xbc, 0x0b, 0x13, 0x37, 0x3c, 0xf7, 0xe0, 0x3d, 0x4d, 0x1e, 0xb3, 0x98, 0xe4, 0x85, 0x34, + 0x41, 0xfd, 0x1b, 0xfc, 0xa7, 0xc5, 0xc6, 0x49, 0x8b, 0xe0, 0xf1, 0xfb, 0xe5, 0xf7, 0xf1, 0x85, + 0x07, 0x9b, 0x80, 0x6f, 0x32, 0xe8, 0xce, 0x1d, 0x6e, 0x7d, 0xa0, 0x48, 0x7c, 0xf5, 0x0b, 0x7c, + 0x2b, 0x3e, 0x19, 0xcc, 0xb7, 0xda, 0x76, 0x8e, 0x57, 0xb0, 0x6a, 0x0d, 0xa9, 0xd7, 0x66, 0x78, + 0x2d, 0x4f, 0x2a, 0x56, 0x9f, 0x36, 0x63, 0xf4, 0x6d, 0xa0, 0x27, 0xf5, 0xf2, 0x63, 0xcc, 0xb2, + 0x31, 0x42, 0xfc, 0x1e, 0x2e, 0x5d, 0xb2, 0x8f, 0x68, 0xf0, 0x20, 0x23, 0xf6, 0x7b, 0x0a, 0xbb, + 0x51, 0xa1, 0xa8, 0x58, 0x5d, 0x34, 0xff, 0x18, 0xe2, 0x19, 0x8a, 0x7d, 0x72, 0x9a, 0x0b, 0x58, + 0x47, 0x8a, 0xd2, 0x3c, 0x48, 0x23, 0x9d, 0xc2, 0x92, 0x0d, 0x53, 0x13, 0xc6, 0x6f, 0xe0, 0x3c, + 0x39, 0x65, 0x64, 0x67, 0x51, 0x1f, 0xbd, 0xfc, 0xe9, 0x3f, 0x5c, 0x6c, 0xe0, 0x2c, 0x2f, 0x3c, + 0x75, 0x7d, 0xa4, 0xf0, 0x21, 0xae, 0x61, 0xb9, 0x55, 0x8a, 0x92, 0x8b, 0xbc, 0x84, 0x65, 0x3b, + 0xa9, 0x1f, 0xa3, 0xb8, 0x82, 0xc5, 0xee, 0x1d, 0xad, 0x8f, 0xfc, 0x02, 0xe6, 0x52, 0xeb, 0xd0, + 0x97, 0xac, 0x9a, 0xd5, 0xeb, 0x26, 0x87, 0x76, 0x31, 0xdc, 0xf3, 0xee, 0x2b, 0x00, 0x00, 0xff, + 0xff, 0x54, 0x1a, 0x3e, 0x12, 0x62, 0x01, 0x00, 0x00, } diff --git a/action/protocol/rewarding/rewardingpb/rewarding.proto b/action/protocol/rewarding/rewardingpb/rewarding.proto index 15257a6290..c31f07caa3 100644 --- a/action/protocol/rewarding/rewardingpb/rewarding.proto +++ b/action/protocol/rewarding/rewardingpb/rewarding.proto @@ -10,7 +10,6 @@ syntax = "proto3"; package rewardingpb; message Admin { - bytes admin = 1; string blockReward = 2; string epochReward = 3; uint64 numDelegatesForEpochReward = 4; diff --git a/action/rewardmsg_test.go b/action/rewardmsg_test.go index 5d8a4c5752..b28c62ad52 100644 --- a/action/rewardmsg_test.go +++ b/action/rewardmsg_test.go @@ -38,18 +38,6 @@ func TestClaimFromRewardingFund(t *testing.T) { assert.Equal(t, s2.Data(), s2.Data()) } -func TestSetBlockReward(t *testing.T) { - b := SetRewardBuilder{} - s1 := b.SetAmount(big.NewInt(1)). - SetData([]byte{2}). - Build() - proto := s1.Proto() - s2 := SetReward{} - require.NoError(t, s2.LoadProto(proto)) - assert.Equal(t, s1.Amount(), s2.Amount()) - assert.Equal(t, s2.Data(), s2.Data()) -} - func TestGrantBlockReward(t *testing.T) { b := GrantRewardBuilder{} s1 := b.SetRewardType(BlockReward).Build() diff --git a/action/setreward.go b/action/setreward.go deleted file mode 100644 index 8ee1a2f0bb..0000000000 --- a/action/setreward.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2019 IoTeX -// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no -// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent -// permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache -// License 2.0 that can be found in the LICENSE file. - -package action - -import ( - "math" - "math/big" - - "github.com/golang/protobuf/proto" - "github.com/pkg/errors" - - "github.com/iotexproject/iotex-core/pkg/util/byteutil" - "github.com/iotexproject/iotex-core/protogen/iotextypes" -) - -var ( - setBlockRewardBaseGas = uint64(10000) - setBlockRewardGasPerByte = uint64(100) -) - -// SetReward is the action to update the reward amount -type SetReward struct { - AbstractAction - - amount *big.Int - data []byte - t int -} - -// Amount returns the amount to reward -func (s *SetReward) Amount() *big.Int { return s.amount } - -// Data returns the additional data -func (s *SetReward) Data() []byte { return s.data } - -// RewardType returns the grant reward type -func (s *SetReward) RewardType() int { return s.t } - -// ByteStream returns a raw byte stream of a set reward action -func (s *SetReward) ByteStream() []byte { - return byteutil.Must(proto.Marshal(s.Proto())) -} - -// Proto converts a set reward action struct to a set reward action protobuf -func (s *SetReward) Proto() *iotextypes.SetReward { - sProto := iotextypes.SetReward{ - Amount: s.amount.String(), - Data: s.data, - } - switch s.t { - case BlockReward: - sProto.Type = iotextypes.RewardType_BlockReward - case EpochReward: - sProto.Type = iotextypes.RewardType_EpochReward - } - return &sProto -} - -// LoadProto converts a set block rewarding reward action protobuf to a set reward action struct -func (s *SetReward) LoadProto(sProto *iotextypes.SetReward) error { - *s = SetReward{} - amount, ok := big.NewInt(0).SetString(sProto.Amount, 10) - if !ok { - return errors.New("failed to set reward amount") - } - s.amount = amount - s.data = sProto.Data - switch sProto.Type { - case iotextypes.RewardType_BlockReward: - s.t = BlockReward - case iotextypes.RewardType_EpochReward: - s.t = EpochReward - } - return nil -} - -// IntrinsicGas returns the intrinsic gas of a set reward action -func (s *SetReward) IntrinsicGas() (uint64, error) { - dataLen := uint64(len(s.Data())) - if (math.MaxUint64-setBlockRewardBaseGas)/setBlockRewardGasPerByte < dataLen { - return 0, ErrOutOfGas - } - return setBlockRewardBaseGas + setBlockRewardGasPerByte*dataLen, nil -} - -// Cost returns the total cost of a set reward action -func (s *SetReward) Cost() (*big.Int, error) { - intrinsicGas, err := s.IntrinsicGas() - if err != nil { - return nil, errors.Wrap(err, "error when getting intrinsic gas for the set block reward action") - } - return big.NewInt(0).Mul(s.GasPrice(), big.NewInt(0).SetUint64(intrinsicGas)), nil -} - -// SetRewardBuilder is the struct to build SetReward -type SetRewardBuilder struct { - Builder - setReward SetReward -} - -// SetAmount sets the amount to reward -func (b *SetRewardBuilder) SetAmount(amount *big.Int) *SetRewardBuilder { - b.setReward.amount = amount - return b -} - -// SetData sets the additional data -func (b *SetRewardBuilder) SetData(data []byte) *SetRewardBuilder { - b.setReward.data = data - return b -} - -// SetRewardType sets the grant reward type -func (b *SetRewardBuilder) SetRewardType(t int) *SetRewardBuilder { - b.setReward.t = t - return b -} - -// Build builds a new set reward action -func (b *SetRewardBuilder) Build() SetReward { - b.setReward.AbstractAction = b.Builder.Build() - return b.setReward -} diff --git a/blockchain/blockchain.go b/blockchain/blockchain.go index 2da87f3f31..4b8f3813f8 100644 --- a/blockchain/blockchain.go +++ b/blockchain/blockchain.go @@ -1174,7 +1174,6 @@ func (bc *blockchain) createRewardingGenesisStates(ctx context.Context, ws facto return rp.Initialize( ctx, ws, - bc.config.Genesis.Rewarding.InitAdminAddr(), bc.config.Genesis.InitBalance(), bc.config.Genesis.BlockReward(), bc.config.Genesis.EpochReward(), diff --git a/blockchain/genesis/genesis.go b/blockchain/genesis/genesis.go index 994156e6e2..6feb537319 100644 --- a/blockchain/genesis/genesis.go +++ b/blockchain/genesis/genesis.go @@ -55,7 +55,6 @@ func initDefaultConfig() { EnableGravityChainVoting: false, }, Rewarding: Rewarding{ - InitAdminAddrStr: identityset.Address(0).String(), InitBalanceStr: unit.ConvertIotxToRau(1200000000).String(), BlockRewardStr: unit.ConvertIotxToRau(36).String(), EpochRewardStr: unit.ConvertIotxToRau(400000).String(), @@ -142,8 +141,6 @@ type ( } // Rewarding contains the configs for rewarding protocol Rewarding struct { - // InitAdminAddrStr is the address of the initial rewarding protocol admin in encoded string format - InitAdminAddrStr string `yaml:"initAdminAddr"` // InitBalanceStr is the initial balance of the rewarding protocol in decimal string format InitBalanceStr string `yaml:"initBalance"` // BlockReward is the block reward amount in decimal string format @@ -225,7 +222,6 @@ func (g *Genesis) Hash() hash.Hash256 { } rProto := iotextypes.GenesisRewarding{ - InitAdminAddr: g.InitAdminAddrStr, InitBalance: g.InitBalanceStr, BlockReward: g.BlockRewardStr, EpochReward: g.EpochRewardStr, @@ -301,15 +297,6 @@ func (d *Delegate) Votes() *big.Int { return val } -// InitAdminAddr returns the address of the initial rewarding protocol admin -func (r *Rewarding) InitAdminAddr() address.Address { - addr, err := address.FromString(r.InitAdminAddrStr) - if err != nil { - log.L().Panic("Error when decoding the rewarding protocol init admin address from string.", zap.Error(err)) - } - return addr -} - // InitBalance returns the init balance of the rewarding fund func (r *Rewarding) InitBalance() *big.Int { val, ok := big.NewInt(0).SetString(r.InitBalanceStr, 10) diff --git a/blockchain/genesis/genesis_test.go b/blockchain/genesis/genesis_test.go index 70d31a76ef..512615be2a 100644 --- a/blockchain/genesis/genesis_test.go +++ b/blockchain/genesis/genesis_test.go @@ -30,8 +30,7 @@ func TestDefaultConfig(t *testing.T) { aAddrs, aBalances := cfg.InitBalances() assert.Equal(t, eAddrs, aAddrs) assert.Equal(t, eBalances, aBalances) - // Validate rewarding protocol - assert.Equal(t, Default.InitAdminAddr().String(), cfg.InitAdminAddr().String()) + // Validate rewarding protocol) assert.Equal(t, Default.BlockReward(), cfg.BlockReward()) assert.Equal(t, Default.EpochReward(), cfg.EpochReward()) } diff --git a/proto/types/action.proto b/proto/types/action.proto index 8372b7da80..26a0bfe05d 100644 --- a/proto/types/action.proto +++ b/proto/types/action.proto @@ -182,8 +182,7 @@ message ActionCore { // Rewarding protocol actions DepositToRewardingFund depositToRewardingFund = 30; ClaimFromRewardingFund claimFromRewardingFund = 31; - SetReward setReward = 32; - GrantReward grantReward = 33; + GrantReward grantReward = 32; PutPollResult putPollResult = 50; } @@ -233,12 +232,6 @@ enum RewardType { EpochReward = 1; } -message SetReward { - string amount = 1; - bytes data = 2; - RewardType type = 3; -} - message GrantReward { RewardType type = 1; } diff --git a/protogen/iotextypes/action.pb.go b/protogen/iotextypes/action.pb.go index a5e42bd9d3..8ee5bacb44 100644 --- a/protogen/iotextypes/action.pb.go +++ b/protogen/iotextypes/action.pb.go @@ -1303,7 +1303,6 @@ type ActionCore struct { // *ActionCore_PlumTransfer // *ActionCore_DepositToRewardingFund // *ActionCore_ClaimFromRewardingFund - // *ActionCore_SetReward // *ActionCore_GrantReward // *ActionCore_PutPollResult Action isActionCore_Action `protobuf_oneof:"action"` @@ -1449,12 +1448,8 @@ type ActionCore_ClaimFromRewardingFund struct { ClaimFromRewardingFund *ClaimFromRewardingFund `protobuf:"bytes,31,opt,name=claimFromRewardingFund,proto3,oneof"` } -type ActionCore_SetReward struct { - SetReward *SetReward `protobuf:"bytes,32,opt,name=setReward,proto3,oneof"` -} - type ActionCore_GrantReward struct { - GrantReward *GrantReward `protobuf:"bytes,33,opt,name=grantReward,proto3,oneof"` + GrantReward *GrantReward `protobuf:"bytes,32,opt,name=grantReward,proto3,oneof"` } type ActionCore_PutPollResult struct { @@ -1501,8 +1496,6 @@ func (*ActionCore_DepositToRewardingFund) isActionCore_Action() {} func (*ActionCore_ClaimFromRewardingFund) isActionCore_Action() {} -func (*ActionCore_SetReward) isActionCore_Action() {} - func (*ActionCore_GrantReward) isActionCore_Action() {} func (*ActionCore_PutPollResult) isActionCore_Action() {} @@ -1654,13 +1647,6 @@ func (m *ActionCore) GetClaimFromRewardingFund() *ClaimFromRewardingFund { return nil } -func (m *ActionCore) GetSetReward() *SetReward { - if x, ok := m.GetAction().(*ActionCore_SetReward); ok { - return x.SetReward - } - return nil -} - func (m *ActionCore) GetGrantReward() *GrantReward { if x, ok := m.GetAction().(*ActionCore_GrantReward); ok { return x.GrantReward @@ -1698,7 +1684,6 @@ func (*ActionCore) XXX_OneofWrappers() []interface{} { (*ActionCore_PlumTransfer)(nil), (*ActionCore_DepositToRewardingFund)(nil), (*ActionCore_ClaimFromRewardingFund)(nil), - (*ActionCore_SetReward)(nil), (*ActionCore_GrantReward)(nil), (*ActionCore_PutPollResult)(nil), } @@ -2011,61 +1996,6 @@ func (m *ClaimFromRewardingFund) GetData() []byte { return nil } -type SetReward struct { - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Type RewardType `protobuf:"varint,3,opt,name=type,proto3,enum=iotextypes.RewardType" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetReward) Reset() { *m = SetReward{} } -func (m *SetReward) String() string { return proto.CompactTextString(m) } -func (*SetReward) ProtoMessage() {} -func (*SetReward) Descriptor() ([]byte, []int) { - return fileDescriptor_d4dd5ed50f883f28, []int{28} -} - -func (m *SetReward) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetReward.Unmarshal(m, b) -} -func (m *SetReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetReward.Marshal(b, m, deterministic) -} -func (m *SetReward) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetReward.Merge(m, src) -} -func (m *SetReward) XXX_Size() int { - return xxx_messageInfo_SetReward.Size(m) -} -func (m *SetReward) XXX_DiscardUnknown() { - xxx_messageInfo_SetReward.DiscardUnknown(m) -} - -var xxx_messageInfo_SetReward proto.InternalMessageInfo - -func (m *SetReward) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *SetReward) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *SetReward) GetType() RewardType { - if m != nil { - return m.Type - } - return RewardType_BlockReward -} - type GrantReward struct { Type RewardType `protobuf:"varint,1,opt,name=type,proto3,enum=iotextypes.RewardType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2077,7 +2007,7 @@ func (m *GrantReward) Reset() { *m = GrantReward{} } func (m *GrantReward) String() string { return proto.CompactTextString(m) } func (*GrantReward) ProtoMessage() {} func (*GrantReward) Descriptor() ([]byte, []int) { - return fileDescriptor_d4dd5ed50f883f28, []int{29} + return fileDescriptor_d4dd5ed50f883f28, []int{28} } func (m *GrantReward) XXX_Unmarshal(b []byte) error { @@ -2136,123 +2066,119 @@ func init() { proto.RegisterType((*Log)(nil), "iotextypes.Log") proto.RegisterType((*DepositToRewardingFund)(nil), "iotextypes.DepositToRewardingFund") proto.RegisterType((*ClaimFromRewardingFund)(nil), "iotextypes.ClaimFromRewardingFund") - proto.RegisterType((*SetReward)(nil), "iotextypes.SetReward") proto.RegisterType((*GrantReward)(nil), "iotextypes.GrantReward") } func init() { proto.RegisterFile("proto/types/action.proto", fileDescriptor_d4dd5ed50f883f28) } var fileDescriptor_d4dd5ed50f883f28 = []byte{ - // 1761 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x5f, 0x6f, 0xdb, 0xc8, - 0x11, 0x17, 0x25, 0x59, 0xb1, 0xc6, 0x52, 0x2c, 0x6f, 0x1d, 0x85, 0x76, 0xd2, 0xc4, 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0x34, 0x95, 0x76, 0x7a, 0x15, 0x11, 0x2c, 0x31, 0xce, 0x73, 0x58, - 0xd2, 0x2e, 0x51, 0xbe, 0xd5, 0xfa, 0xf8, 0xd6, 0xad, 0x1e, 0xc0, 0x94, 0x87, 0x96, 0x61, 0x49, - 0xf6, 0xb2, 0x94, 0xd5, 0xa9, 0x08, 0xc6, 0x61, 0x44, 0xbd, 0x73, 0xc5, 0xb0, 0xf6, 0x76, 0xdf, - 0x3e, 0x1b, 0xfb, 0xfc, 0x3c, 0x19, 0xf6, 0x3c, 0x3a, 0xd9, 0x96, 0x92, 0x23, 0x46, 0xff, 0x47, - 0x3c, 0x9e, 0x12, 0x7f, 0x10, 0x97, 0x26, 0x7d, 0xed, 0x1d, 0x93, 0x70, 0x7b, 0x7a, 0xf4, 0xb0, - 0x21, 0x99, 0x7f, 0xfc, 0x39, 0x00, 0x00, 0xff, 0xff, 0xda, 0x42, 0xa3, 0x8e, 0x38, 0x16, 0x00, - 0x00, + // 1728 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xdd, 0x6e, 0xdc, 0x36, + 0x16, 0x9e, 0x3f, 0x4f, 0xec, 0xe3, 0x99, 0x78, 0xcc, 0x75, 0x26, 0xb2, 0x93, 0x4d, 0x0c, 0x65, + 0x37, 0x30, 0xbc, 0xd9, 0x31, 0xe0, 0x45, 0x02, 0x67, 0x17, 0x08, 0x36, 0xfe, 0xcb, 0xec, 0xd6, + 0x69, 0x07, 0xb4, 0x9b, 0x8b, 0xb4, 0x40, 0xa1, 0xd1, 0xd0, 0x63, 0x35, 0x1a, 0x51, 0xa0, 0x28, + 0xc7, 0xce, 0x45, 0xaf, 0xdb, 0x87, 0xe8, 0x83, 0xf4, 0x01, 0x7a, 0xd9, 0x02, 0x7d, 0xa0, 0x02, + 0x05, 0x29, 0x4a, 0x43, 0x4a, 0x1a, 0x27, 0x0e, 0x02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, 0xe9, 0x91, 0x39, 0xa2, 0x63, + 0x2c, 0x17, 0xed, 0x1f, 0xab, 0x50, 0x3f, 0xa2, 0xe3, 0x2b, 0xde, 0xac, 0xba, 0xd0, 0xe4, 0x34, + 0xf4, 0x5c, 0xe1, 0x44, 0x7d, 0xa3, 0x85, 0x15, 0x55, 0xf6, 0x6c, 0x22, 0xcc, 0x1f, 0x8a, 0x83, + 0xf0, 0xf3, 0x78, 0x32, 0x54, 0xd3, 0x5c, 0x03, 0xeb, 0x2c, 0xa1, 0x87, 0x5f, 0x04, 0xd2, 0xf5, + 0x64, 0x6a, 0x4b, 0xc9, 0xe9, 0x75, 0xb6, 0x29, 0x87, 0x09, 0x75, 0x9d, 0xdd, 0x87, 0x6e, 0xf9, + 0x4f, 0x30, 0xf3, 0xd2, 0x9c, 0xda, 0x55, 0xd3, 0x9e, 0x73, 0xf6, 0xa1, 0x5b, 0x5e, 0xec, 0xd7, + 0x92, 0xf2, 0x14, 0x16, 0xb5, 0xfa, 0x16, 0x95, 0x27, 0xa2, 0x29, 0x37, 0xde, 0x34, 0x2b, 0x2f, + 0x41, 0x9c, 0x5c, 0x86, 0x04, 0x4b, 0xcc, 0x66, 0x0f, 0x60, 0xca, 0x43, 0x4b, 0xb0, 0x28, 0xfb, + 0x45, 0xc2, 0xea, 0x54, 0x04, 0xe3, 0x20, 0xa4, 0xee, 0x99, 0x62, 0x54, 0x77, 0x77, 0x5e, 0x3f, + 0x19, 0x7b, 0xfc, 0x2c, 0x1e, 0xf6, 0x5c, 0x3a, 0xd9, 0x92, 0x92, 0x43, 0x46, 0xbf, 0x25, 0x2e, + 0x4f, 0x88, 0x7f, 0x8a, 0x7a, 0x4e, 0x5e, 0x54, 0xc7, 0x24, 0xd8, 0x9a, 0xaa, 0x1e, 0x36, 0x25, + 0xf3, 0x5f, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xe8, 0xeb, 0xd9, 0x9c, 0x15, 0x00, 0x00, } diff --git a/tools/staterecoverer/staterecoverer.go b/tools/staterecoverer/staterecoverer.go index 1d06b8b6ad..35eae113e6 100644 --- a/tools/staterecoverer/staterecoverer.go +++ b/tools/staterecoverer/staterecoverer.go @@ -12,8 +12,8 @@ import ( "context" "flag" "fmt" - "os" glog "log" + "os" "go.uber.org/zap"