Skip to content
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

add validator state #1344

Open
wants to merge 12 commits into
base: uptime-tracking-base
Choose a base branch
from
Open

add validator state #1344

wants to merge 12 commits into from

Conversation

ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented Sep 16, 2024

Why this should be merged

Adds validator state that can persist validator information and implements uptime.State.

How this was tested

Added UT

How is this documented

Comments in code

@ceyonur ceyonur mentioned this pull request Sep 16, 2024
@ceyonur ceyonur marked this pull request as ready for review September 17, 2024 15:08
@ceyonur ceyonur requested review from darioush and a team as code owners September 17, 2024 15:08
plugin/evm/validators/state.go Outdated Show resolved Hide resolved
plugin/evm/validators/state.go Outdated Show resolved Hide resolved
plugin/evm/validators/state.go Outdated Show resolved Hide resolved
plugin/evm/validators/state.go Outdated Show resolved Hide resolved
plugin/evm/validators/state.go Outdated Show resolved Hide resolved
plugin/evm/validators/state_test.go Outdated Show resolved Hide resolved
plugin/evm/validators/state_test.go Outdated Show resolved Hide resolved
go.mod Outdated
@@ -5,7 +5,7 @@ go 1.21.12
require (
github.com/VictoriaMetrics/fastcache v1.12.1
github.com/antithesishq/antithesis-sdk-go v0.3.8
github.com/ava-labs/avalanchego v1.11.11
github.com/ava-labs/avalanchego v1.11.12-0.20240910093928-8c6a486205ce
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you link the modified avalanchego branch in the PR description?

plugin/evm/validators/state.go Outdated Show resolved Hide resolved
plugin/evm/validators/state.go Outdated Show resolved Hide resolved
@ceyonur ceyonur changed the base branch from master to uptime-tracking-base September 19, 2024 17:47
@ceyonur
Copy link
Collaborator Author

ceyonur commented Sep 19, 2024

Changed the target branch to uptime-tracking-base since these PRs should not be merged to master as they depend on a avalanchego feature branch that not merged yet.

IsActive: true,
},
},
{
name: "invalid codec version",
name: " ",
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems this was modified unintentionally

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

uhh weird


// write state, should reflect to DB
require.NoError(state.WriteState())
require.True(db.Has(vID[:]))

// set uptime
newUpDuration := 2 * time.Minute
newuptime := 2 * time.Minute
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: newUptime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants