Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d06c288
WIP on node interface seggregation
yarikbratashchuk Nov 27, 2024
3fce7ae
Fix compile errors
yarikbratashchuk Dec 3, 2024
fb1e4ec
Remove rpc server from rollkit
yarikbratashchuk Dec 10, 2024
12f7e65
Fix lint errors
yarikbratashchuk Dec 12, 2024
d3df482
Fix some more lint issues
yarikbratashchuk Dec 12, 2024
1704717
Comment out unreachable code
yarikbratashchuk Dec 12, 2024
75872c2
Handle CI mode for node
yarikbratashchuk Dec 12, 2024
13cc399
Fix full node
yarikbratashchuk Dec 16, 2024
503c98b
Docs gen
yarikbratashchuk Dec 16, 2024
0fb08e1
Fix lint errors
yarikbratashchuk Dec 17, 2024
00ad30d
Fix vulns found by dependabot
yarikbratashchuk Dec 17, 2024
b7d5ec0
Fix markdown lint
yarikbratashchuk Dec 17, 2024
a2c4b28
Fixes for lint fixes
yarikbratashchuk Dec 17, 2024
975a289
Remove rpc-equivalency-coverage
yarikbratashchuk Dec 17, 2024
0abc30d
Fix serialization tests
yarikbratashchuk Dec 17, 2024
590b8a6
Remove proxy client creator
yarikbratashchuk Jan 7, 2025
a8529b5
Fix linting issues
yarikbratashchuk Jan 7, 2025
6468fc5
Fix tests, typos
yarikbratashchuk Jan 9, 2025
5bb907a
Start mock executor on rollkit start
yarikbratashchuk Jan 9, 2025
efa6ad2
Comment out publish block test
yarikbratashchuk Jan 9, 2025
5a9cb2d
Comment out node failing tests for now, will uncomment and fix them o…
yarikbratashchuk Jan 9, 2025
f6b391d
Revorking tests, commenting out execution bits
yarikbratashchuk Jan 15, 2025
c93989b
WIP: revorking tests
yarikbratashchuk Jan 16, 2025
fa42d1a
Remove tendermint types from state proto to make restarting work
yarikbratashchuk Jan 17, 2025
ca9bcfe
Fix linting issues
yarikbratashchuk Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint errors
  • Loading branch information
yarikbratashchuk committed Dec 17, 2024
commit 0fb08e1a6ed83012d1b3b3ee00cbaa792ba75680
25 changes: 5 additions & 20 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func NewManager(
if err != nil {
return nil, err
}
// allow buffer for the block header and protocol encoding
//nolint:ineffassign // This assignment is needed
Comment thread
yarikbratashchuk marked this conversation as resolved.
maxBlobSize -= blockProtocolOverhead

isProposer, err := isProposer(proposerKey, s)
Expand Down Expand Up @@ -475,7 +475,7 @@ func (m *Manager) BatchRetrieveLoop(ctx context.Context) {

// AggregationLoop is responsible for aggregating transactions into rollup-blocks.
func (m *Manager) AggregationLoop(ctx context.Context) {
initialHeight := uint64(m.genesis.InitialHeight) //nolint:gosec
initialHeight := m.genesis.InitialHeight //nolint:gosec
Comment on lines -481 to +483

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ideally we'd have a defensive check here as InitialHeight might be -1:

if initial < 0 {
    return fmt.Errorf("initial height cannot be negative: %d", m.genesis.InitialHeight)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's of type uint64

height := m.store.Height()
var delay time.Duration

Expand Down Expand Up @@ -1285,7 +1285,7 @@ func (m *Manager) processVoteExtension(ctx context.Context, header *types.Signed
*/
}

func (m *Manager) voteExtensionEnabled(newHeight uint64) bool {
func (m *Manager) voteExtensionEnabled(_ uint64) bool {
return false
//enableHeight := m.lastState.ConsensusParams.Abci.VoteExtensionsEnableHeight
//return m.lastState.ConsensusParams.Abci != nil && enableHeight != 0 && uint64(enableHeight) <= newHeight //nolint:gosec
Expand All @@ -1303,22 +1303,6 @@ func (m *Manager) getExtendedCommit(ctx context.Context, height uint64) (abci.Ex
return *extendedCommit, nil
}

func buildExtendedCommit(header *types.SignedHeader, extension []byte, sign []byte) *abci.ExtendedCommitInfo {
extendedCommit := &abci.ExtendedCommitInfo{
Round: 0,
Votes: []abci.ExtendedVoteInfo{{
Validator: abci.Validator{
Address: header.Validators.GetProposer().Address,
Power: header.Validators.GetProposer().VotingPower,
},
VoteExtension: extension,
ExtensionSignature: sign,
BlockIdFlag: cmproto.BlockIDFlagCommit,
}},
}
return extendedCommit
}

func (m *Manager) recordMetrics(data *types.Data) {
m.metrics.NumTxs.Set(float64(len(data.Txs)))
m.metrics.TotalTxs.Add(float64(len(data.Txs)))
Expand Down Expand Up @@ -1434,6 +1418,7 @@ func (m *Manager) exponentialBackoff(backoff time.Duration) time.Duration {
return backoff
}

//nolint:unused // This function is kept for future validator set management
func (m *Manager) getLastStateValidators() *cmtypes.ValidatorSet {
m.lastStateMtx.RLock()
defer m.lastStateMtx.RUnlock()
Expand Down Expand Up @@ -1471,7 +1456,7 @@ func (m *Manager) applyBlock(ctx context.Context, header *types.SignedHeader, da
return m.execApplyBlock(ctx, m.lastState, header, data)
}

func (m *Manager) execValidate(lastState types.State, h *types.SignedHeader, d *types.Data) error {
func (m *Manager) execValidate(_ types.State, _ *types.SignedHeader, _ *types.Data) error {
// TODO(tzdybal): implement
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions block/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ func TestInitialStateClean(t *testing.T) {
emptyStore := store.New(es)
s, err := getInitialState(context.TODO(), genesis, emptyStore, execTest.NewDummyExecutor())
require.NoError(err)
require.Equal(s.LastBlockHeight, uint64(genesis.InitialHeight-1))
require.Equal(uint64(genesis.InitialHeight), s.InitialHeight)
require.Equal(s.LastBlockHeight, genesis.InitialHeight-1)
require.Equal(genesis.InitialHeight, s.InitialHeight)
}

func TestInitialStateStored(t *testing.T) {
Expand Down
3 changes: 3 additions & 0 deletions node/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func newFullNode(
return node, nil
}

//nolint:unused
func initProxyApp(clientCreator proxy.ClientCreator, logger log.Logger, metrics *proxy.Metrics) (proxy.AppConns, error) {
proxyApp := proxy.NewAppConns(clientCreator, metrics)
proxyApp.SetLogger(logger.With("module", "proxy"))
Expand Down Expand Up @@ -239,12 +240,14 @@ func initDALC(nodeConfig config.NodeConfig, logger log.Logger) (*da.DAClient, er
namespace, submitOpts, logger.With("module", "da_client")), nil
}

//nolint:unused
func initMempool(memplMetrics *mempool.Metrics) *mempool.CListMempool {
mempool := mempool.NewCListMempool(llcfg.DefaultMempoolConfig(), nil, 0, mempool.WithMetrics(memplMetrics))
mempool.EnableTxsAvailable()
return mempool
}

//nolint:unused
func initMempoolReaper(m mempool.Mempool, rollupID []byte, seqClient *seqGRPC.Client, logger log.Logger) *mempool.CListMempoolReaper {
return mempool.NewCListMempoolReaper(m, rollupID, seqClient, logger)
}
Expand Down
2 changes: 1 addition & 1 deletion node/full_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func generateSingleKey() crypto.PrivKey {
return key
}

// getPeerID generates a peer ID
//nolint:unused
func getPeerID(t *testing.T) peer.ID {
key := generateSingleKey()

Expand Down
1 change: 1 addition & 0 deletions node/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (ids *mempoolIDs) GetForPeer(peer peer.ID) uint16 {
return id
}

//nolint:unused
func newMempoolIDs() *mempoolIDs {
return &mempoolIDs{
peerMap: make(map[peer.ID]uint16),
Expand Down