Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Therefore, Phalanx has achieved satisfying performance and performs better in re

The Phalanx mempool is constructed as following image.

![image](img/workflow-detail.jpg)
![image](docs/img/workflow-detail.jpg)

One of the consensus journey as follows.

![image](img/process-consensus.jpg)
![image](docs/img/process-consensus.jpg)

If you need to start the service for Phalanx, please go into the [bamboo-phalanx](https://github.com/Grivn/bamboo-phalanx) repo, and start the service on [grivn/phalanx-mempool](https://github.com/Grivn/bamboo-phalanx/tree/grivn/phalanx-mempool) branch.

Expand Down
130 changes: 0 additions & 130 deletions common/mocks/mock_crypto.go

This file was deleted.

46 changes: 0 additions & 46 deletions common/mocks/mock_executor.go

This file was deleted.

70 changes: 0 additions & 70 deletions common/mocks/mock_network.go

This file was deleted.

18 changes: 9 additions & 9 deletions core/config.go → config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ package phalanx
import (
"time"

"github.com/Grivn/phalanx/external"
"github.com/Grivn/phalanx/pkg/external"
)

type Config struct {
Author uint64
OLeader uint64
Byz bool
Snapping bool
OligarchID uint64
IsByzantine bool
IsSnapping bool
NodeID uint64
NodeCount int
OpenLatency int
Duration time.Duration
Interval int
CDuration time.Duration
N int
Multi int
LogCount int
MemSize int
CommandSize int
Selected uint64
PrivateKey external.PrivateKey
PublicKeys map[uint64]external.PublicKey
Exec external.ExecutionService
Network external.NetworkService
PublicKeys external.PublicKeys
Executor external.Executor
Network external.Sender
Logger external.Logger
}
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions executor/finality/config.go

This file was deleted.

6 changes: 3 additions & 3 deletions core/phalanx_log_schema.go → logger_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package phalanx
import (
"os"
"strconv"
"github.com/Grivn/phalanx/common/types"
"github.com/Grivn/phalanx/external"

"github.com/Grivn/phalanx/pkg/common/types"
"github.com/Grivn/phalanx/pkg/external"
)

type moduleLogger struct {
Expand Down
66 changes: 66 additions & 0 deletions logger_schema_v2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package phalanx

import (
"os"
"strconv"

"github.com/Grivn/phalanx/pkg/common/types"
"github.com/Grivn/phalanx/pkg/external"
)

type moduleLoggerV2 struct {
commandTrackerLog external.Logger
attemptTrackerLog external.Logger
checkpointTrackerLog external.Logger
proposerLog external.Logger
consensusEngineLog external.Logger
sequencingEngineLog external.Logger
finalityEngine external.Logger
sequencerLog external.Logger
memoryPoolLog external.Logger
finalityLog external.Logger
}

func newPLoggerV2(logger external.Logger, divided bool, author uint64) (*moduleLoggerV2, error) {
// print phalanx logs in system file.
if !divided {
return &moduleLoggerV2{
commandTrackerLog: logger,
attemptTrackerLog: logger,
checkpointTrackerLog: logger,
proposerLog: logger,
consensusEngineLog: logger,
sequencingEngineLog: logger,
finalityEngine: logger,
sequencerLog: logger,
memoryPoolLog: logger,
finalityLog: logger,
}, nil
}

// print phalanx logs in divided files.
logDir := "phalanx_node" + strconv.Itoa(int(author))
err := os.RemoveAll(logDir)
if err != nil {
logger.Errorf("Mkdir Failed: %s", err)
return nil, err
}
err = os.Mkdir(logDir, os.ModePerm)
if err != nil {
logger.Errorf("Mkdir Failed: %s", err)
return nil, err
}

return &moduleLoggerV2{
commandTrackerLog: types.NewRawLoggerFile(logDir + "/commandTrackerLog"),
attemptTrackerLog: types.NewRawLoggerFile(logDir + "/attemptTrackerLog"),
checkpointTrackerLog: types.NewRawLoggerFile(logDir + "/checkpointTrackerLog"),
proposerLog: types.NewRawLoggerFile(logDir + "/proposerLog"),
consensusEngineLog: types.NewRawLoggerFile(logDir + "/consensusEngineLog"),
sequencingEngineLog: types.NewRawLoggerFile(logDir + "/sequencingEngineLog"),
finalityEngine: types.NewRawLoggerFile(logDir + "/finalityEngine"),
sequencerLog: types.NewRawLoggerFile(logDir + "/sequencerLog"),
memoryPoolLog: types.NewRawLoggerFile(logDir + "/memoryPoolLog"),
finalityLog: types.NewRawLoggerFile(logDir + "/finalityLog"),
}, nil
}
Loading