v2.0.0-p3

This commit is contained in:
Cassandra Heart 2024-10-14 14:39:52 -07:00
parent aec21504bc
commit 3efeea0b06
No known key found for this signature in database
GPG Key ID: 6352152859385958
6 changed files with 17 additions and 7 deletions

View File

@ -650,12 +650,10 @@ func FetchTokenBalance(client protobufs.NodeServiceClient) (TokenBalance, error)
return TokenBalance{}, errors.Wrap(err, "error getting token info")
}
// owned := new(big.Int).SetBytes(info.OwnedTokens)
unconfirmedOwned := new(big.Int).SetBytes(info.UnconfirmedOwnedTokens)
owned := new(big.Int).SetBytes(info.OwnedTokens)
return TokenBalance{
// Owned: owned,
UnconfirmedOwned: unconfirmedOwned,
Owned: owned,
}, nil
}

View File

@ -20,6 +20,7 @@ type Node struct {
logger *zap.Logger
dataProofStore store.DataProofStore
clockStore store.ClockStore
coinStore store.CoinStore
keyManager keys.KeyManager
pubSub p2p.PubSub
execEngines map[string]execution.ExecutionEngine
@ -44,6 +45,7 @@ func newNode(
logger *zap.Logger,
dataProofStore store.DataProofStore,
clockStore store.ClockStore,
coinStore store.CoinStore,
keyManager keys.KeyManager,
pubSub p2p.PubSub,
// execution engines wire in here
@ -59,6 +61,7 @@ func newNode(
logger,
dataProofStore,
clockStore,
coinStore,
keyManager,
pubSub,
execEngines,
@ -172,6 +175,10 @@ func (n *Node) GetClockStore() store.ClockStore {
return n.clockStore
}
func (n *Node) GetCoinStore() store.CoinStore {
return n.coinStore
}
func (n *Node) GetDataProofStore() store.DataProofStore {
return n.dataProofStore
}

View File

@ -40,6 +40,7 @@ func NewDebugNode(configConfig *config.Config, selfTestReport *protobufs.SelfTes
pebbleDB := store.NewPebbleDB(dbConfig)
pebbleDataProofStore := store.NewPebbleDataProofStore(pebbleDB, zapLogger)
pebbleClockStore := store.NewPebbleClockStore(pebbleDB, zapLogger)
pebbleCoinStore := store.NewPebbleCoinStore(pebbleDB, zapLogger)
keyConfig := configConfig.Key
fileKeyManager := keys.NewFileKeyManager(keyConfig, zapLogger)
p2PConfig := configConfig.P2P
@ -50,7 +51,7 @@ func NewDebugNode(configConfig *config.Config, selfTestReport *protobufs.SelfTes
masterTimeReel := time.NewMasterTimeReel(zapLogger, pebbleClockStore, engineConfig, wesolowskiFrameProver)
inMemoryPeerInfoManager := p2p.NewInMemoryPeerInfoManager(zapLogger)
masterClockConsensusEngine := master.NewMasterClockConsensusEngine(engineConfig, zapLogger, pebbleClockStore, fileKeyManager, blossomSub, kzgInclusionProver, wesolowskiFrameProver, masterTimeReel, inMemoryPeerInfoManager, selfTestReport)
node, err := newNode(zapLogger, pebbleDataProofStore, pebbleClockStore, fileKeyManager, blossomSub, masterClockConsensusEngine)
node, err := newNode(zapLogger, pebbleDataProofStore, pebbleClockStore, pebbleCoinStore, fileKeyManager, blossomSub, masterClockConsensusEngine)
if err != nil {
return nil, err
}
@ -63,6 +64,7 @@ func NewNode(configConfig *config.Config, selfTestReport *protobufs.SelfTestRepo
pebbleDB := store.NewPebbleDB(dbConfig)
pebbleDataProofStore := store.NewPebbleDataProofStore(pebbleDB, zapLogger)
pebbleClockStore := store.NewPebbleClockStore(pebbleDB, zapLogger)
pebbleCoinStore := store.NewPebbleCoinStore(pebbleDB, zapLogger)
keyConfig := configConfig.Key
fileKeyManager := keys.NewFileKeyManager(keyConfig, zapLogger)
p2PConfig := configConfig.P2P
@ -73,7 +75,7 @@ func NewNode(configConfig *config.Config, selfTestReport *protobufs.SelfTestRepo
masterTimeReel := time.NewMasterTimeReel(zapLogger, pebbleClockStore, engineConfig, wesolowskiFrameProver)
inMemoryPeerInfoManager := p2p.NewInMemoryPeerInfoManager(zapLogger)
masterClockConsensusEngine := master.NewMasterClockConsensusEngine(engineConfig, zapLogger, pebbleClockStore, fileKeyManager, blossomSub, kzgInclusionProver, wesolowskiFrameProver, masterTimeReel, inMemoryPeerInfoManager, selfTestReport)
node, err := newNode(zapLogger, pebbleDataProofStore, pebbleClockStore, fileKeyManager, blossomSub, masterClockConsensusEngine)
node, err := newNode(zapLogger, pebbleDataProofStore, pebbleClockStore, pebbleCoinStore, fileKeyManager, blossomSub, masterClockConsensusEngine)
if err != nil {
return nil, err
}

View File

@ -36,5 +36,5 @@ func FormatVersion(version []byte) string {
}
func GetPatchNumber() byte {
return 0x02
return 0x03
}

View File

@ -424,6 +424,7 @@ func main() {
node.GetLogger(),
node.GetDataProofStore(),
node.GetClockStore(),
node.GetCoinStore(),
node.GetKeyManager(),
node.GetPubSub(),
node.GetMasterClock(),

View File

@ -336,6 +336,7 @@ func NewRPCServer(
logger *zap.Logger,
dataProofStore store.DataProofStore,
clockStore store.ClockStore,
coinStore store.CoinStore,
keyManager keys.KeyManager,
pubSub p2p.PubSub,
masterClock *master.MasterClockConsensusEngine,
@ -347,6 +348,7 @@ func NewRPCServer(
logger: logger,
dataProofStore: dataProofStore,
clockStore: clockStore,
coinStore: coinStore,
keyManager: keyManager,
pubSub: pubSub,
masterClock: masterClock,