-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LocalNet] Execution Height and Connection Errors #433
Comments
Check the state and you can also do Inside of // TODO: Populate the entire state from the persistence module: validator set, quorum cert, last block hash, etc...
func (m *consensusModule) loadPersistedState() error {
persistenceContext, err := m.GetBus().GetPersistenceModule().NewReadContext(-1) // Unknown height
if err != nil {
return nil
}
defer persistenceContext.Close()
latestHeight, err := persistenceContext.GetLatestBlockHeight()
if err != nil || latestHeight == 0 {
// TODO: Proper state sync not implemented yet
return nil
}
m.height = uint64(latestHeight) + 1 // +1 because the height of the consensus module is where it is actively participating in consensus
m.nodeLog(fmt.Sprintf("Starting consensus module at height %d", latestHeight))
return nil
} |
Quoting @deblasis from discord:
|
This command doesn't solve this issue, because I execute
Therefore, I believe the persistence module should not be loading from an existing state. I will investigate further to see what might be going wrong. I also tried executing Could you please confirm you are able to run Local Net on the latest main branch? If that is the case, then something is wrong with my local env. |
Closed per @gokutheengineer's comment above 👌 |
Objective
I am experiencing the following unexpected behaviors when running LocalNet:
Issue 1. When LocalNet is run on main branch with the current commands in the README, and running the fresh LocalNet after executing the first
TriggerNextView
command and runningPrintNodeState
the height is printed as2
, which is supposed to be1
.Issue 2. Also, there is one other weird error I am receiving, but I am not sure if it is only on my setup. After doing few iterations of
TriggerNextView
,PrintNodeState
, and thenResetToGenesis
one or some of the nodes refuse connections.Origin Document
Issue 1:
![Screen Shot 2023-01-08 at 11 33 45](https://user-images.githubusercontent.com/118421317/211195380-ce4e65e8-91cc-4727-94f3-31d19ac9084b.png)
Issue 2:
![Screen Shot 2023-01-08 at 15 57 52](https://user-images.githubusercontent.com/118421317/211197252-eb0d1ae5-79ce-4202-b6d4-542459cec267.png)
Goals
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @gokutheengineer
Co-Owners:
The text was updated successfully, but these errors were encountered: