more adjustments from testing

This commit is contained in:
Cassandra Heart 2024-10-25 00:46:38 -05:00
parent ec94872ca7
commit 7296cb0ea2
No known key found for this signature in database
GPG Key ID: 6352152859385958
5 changed files with 12 additions and 9 deletions

View File

@ -60,6 +60,10 @@ func (e *DataClockConsensusEngine) runLoop() {
dataFrame.FrameNumber > latestFrame.FrameNumber {
latestFrame = dataFrame
}
e.logger.Info(
"current frame head",
zap.Uint64("frame_number", latestFrame.FrameNumber),
)
if e.latestFrameReceived < latestFrame.FrameNumber {
e.latestFrameReceived = latestFrame.FrameNumber

View File

@ -207,7 +207,7 @@ func (e *DataClockConsensusEngine) handleClockFrame(
trie := e.GetFrameProverTries()[0]
if !trie.Contains(addr.Bytes()) {
e.logger.Info(
e.logger.Debug(
"prover not in trie at frame, address may be in fork",
zap.Binary("address", address),
zap.Binary("filter", frame.Filter),
@ -216,7 +216,7 @@ func (e *DataClockConsensusEngine) handleClockFrame(
return nil
}
e.logger.Info(
e.logger.Debug(
"got clock frame",
zap.Binary("address", address),
zap.Binary("filter", frame.Filter),
@ -225,11 +225,11 @@ func (e *DataClockConsensusEngine) handleClockFrame(
)
if err := e.frameProver.VerifyDataClockFrame(frame); err != nil {
e.logger.Error("could not verify clock frame", zap.Error(err))
e.logger.Debug("could not verify clock frame", zap.Error(err))
return errors.Wrap(err, "handle clock frame data")
}
e.logger.Info(
e.logger.Debug(
"clock frame was valid",
zap.Binary("address", address),
zap.Binary("filter", frame.Filter),

View File

@ -132,7 +132,7 @@ func (e *DataClockConsensusEngine) runPreMidnightProofWorker() {
if status.Increment != 0 {
increment = status.Increment - 1
} else {
} else if !bytes.Equal(status.Address, make([]byte, 32)) {
increment = 0
}
}

View File

@ -661,7 +661,8 @@ func printNodeInfo(cfg *config.Config) {
conn, err := app.ConnectToNode(cfg)
if err != nil {
panic(err)
fmt.Println("Could not connect to node. If it is still booting, please wait.")
os.Exit(1)
}
defer conn.Close()

View File

@ -23,7 +23,6 @@ import (
"google.golang.org/grpc/reflection"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
"source.quilibrium.com/quilibrium/monorepo/node/consensus/data"
"source.quilibrium.com/quilibrium/monorepo/node/consensus/master"
"source.quilibrium.com/quilibrium/monorepo/node/execution"
"source.quilibrium.com/quilibrium/monorepo/node/keys"
@ -43,7 +42,6 @@ type RPCServer struct {
keyManager keys.KeyManager
pubSub p2p.PubSub
masterClock *master.MasterClockConsensusEngine
dataClock *data.DataClockConsensusEngine
executionEngines []execution.ExecutionEngine
}
@ -163,7 +161,7 @@ func (r *RPCServer) GetNodeInfo(
}
peerScore := r.pubSub.GetPeerScore(r.pubSub.GetPeerID())
head := r.dataClock.GetFrame()
head := r.executionEngines[0].GetFrame()
frame := uint64(0)
if head != nil {
frame = head.FrameNumber