This repository was archived by the owner on Dec 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 278
Uptime tracking api #1374
Merged
Merged
Uptime tracking api #1374
Changes from all commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
ce36343
add validator state
ceyonur 549d319
add pausable uptime manager
ceyonur 9987248
remove stuttering name
ceyonur e1ef744
Merge branch 'master' into validator-state
ceyonur b33ffbe
Merge branch 'validator-state' into pausable-uptime-manager
ceyonur 0f16af2
rename state listener
ceyonur df3ce63
Merge branch 'validator-state' into pausable-uptime-manager
ceyonur 5f64be3
add uptime tracking to VM
ceyonur 6ff4954
remove unused param
ceyonur 55927b2
add wg for update validators
ceyonur 92fba2e
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur bdc2cc3
update state before network shutdown
ceyonur 657e542
restart bootstrapping status in test
ceyonur 9d6d40e
Merge branch 'uptime-tracking' of https://github.com/ava-labs/subnet-…
ceyonur 9eaa3f3
add get validator to state
ceyonur 66747f8
rename uptime to validator
ceyonur 86a68c8
fix mock state
ceyonur f43bae2
tests
ceyonur 92f6b7e
Update plugin/evm/validators/state.go
ceyonur 0db2041
use update enum
ceyonur c5520bc
Update plugin/evm/validators/state.go
ceyonur dea94af
Update plugin/evm/validators/state.go
ceyonur c0f6ff4
respond to comments
ceyonur b7de0f6
Merge branch 'validator-state' of https://github.com/ava-labs/subnet-…
ceyonur b566103
update avalanchego dep branch
ceyonur 66ab74b
update avalanchego dep branch
ceyonur ad3a35a
reviews
ceyonur 64fe238
reword errs
ceyonur 33d24d1
Merge branch 'pausable-uptime-manager' of https://github.com/ava-labs…
ceyonur d7338da
fix test changes
ceyonur 8eab611
Merge branch 'master' into uptime-tracking-base
ceyonur 9ad5528
fix upgrades after deactivating latest in context
ceyonur 4536590
Merge branch 'uptime-tracking-base' into validator-state
ceyonur fc71949
Merge branch 'validator-state' into pausable-uptime-manager
ceyonur 4304ac5
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur 3225a32
use test branch from avalanchego
ceyonur df6ad02
use branch commit for ava version
ceyonur 738003f
update e2e ava version
ceyonur 29a501d
update avago dep
ceyonur 71c7de0
remove extra line...
ceyonur cc6ce95
Merge branch 'master' into uptime-tracking-base
ceyonur bcd4c9c
Merge branch 'uptime-tracking-base' into validator-state
ceyonur a49dd8d
Merge branch 'validator-state' into pausable-uptime-manager
ceyonur 27884f4
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur b9d6336
export struct
ceyonur 734b201
Merge branch 'master' into validator-state
ceyonur 3e94861
Merge branch 'validator-state' into pausable-uptime-manager
ceyonur cab1ddf
reviews
ceyonur d1a0ae8
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur 5f8bf5b
conflict fix
ceyonur 0ba2869
custom err msg
ceyonur 374d885
add listener mock
ceyonur 1fcca58
Merge branch 'master' into validator-state
ceyonur c41f39c
Merge branch 'validator-state' into pausable-uptime-manager
ceyonur f828d53
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur 9e707ad
bump avago test branch
ceyonur cc73266
remove config
ceyonur 8ef763f
remove api changes
ceyonur 2a9da82
Revert "remove api changes"
ceyonur 9a50ee8
use non-version db for validatorsDB
ceyonur 58b9c35
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur af39b2c
remove errs from resume and pause
ceyonur d5d3545
check after stopping
ceyonur 6fffc2b
use expectedTime in tests
ceyonur 4625f7c
reviews
ceyonur e1975cf
Update plugin/evm/vm.go
ceyonur 74bd249
fix len
ceyonur e5ab9f2
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur 7c33221
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur 733da4c
Merge branch 'master' into pausable-uptime-manager
ceyonur 347055c
Merge branch 'pausable-uptime-manager' into uptime-tracking
ceyonur 335d8bc
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur 2aebfe6
remove log
ceyonur 25076c3
disable validators api by default
ceyonur d737c11
Merge branch 'master' into uptime-tracking
ceyonur 6468d36
use interfaces from pkgs
ceyonur 10c4bd4
improve comments
ceyonur 9490aae
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur fd462c5
Merge branch 'uptime-tracking-api' of https://github.com/ava-labs/sub…
ceyonur 5974170
new fields and refactorings
ceyonur 0388e84
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur 7dca70e
add new fields
ceyonur 48ef70f
Merge branch 'master' into uptime-tracking
ceyonur 424e7a7
fix linter
ceyonur 4fa19b9
clarify comments
ceyonur 4559ab9
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur 3d5261d
update comment
ceyonur a80c028
bump to poc branch
ceyonur a417614
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur c39c7e0
enable validators API by default
ceyonur 15886c1
reviews
ceyonur bf9b962
Merge branch 'master' into uptime-tracking
ceyonur ebaaefc
update comment
ceyonur 3283e36
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur a943b6f
update to avago master
ceyonur a8abbc3
Merge branch 'uptime-tracking' into uptime-tracking-api
ceyonur 09c4401
Merge branch 'master' into uptime-tracking-api
ceyonur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // (c) 2019-2020, Ava Labs, Inc. All rights reserved. | ||
| // See the file LICENSE for licensing terms. | ||
|
|
||
| package evm | ||
|
|
||
| import ( | ||
| "context" | ||
| "math/big" | ||
|
|
||
| "github.com/ethereum/go-ethereum/common" | ||
| "github.com/ethereum/go-ethereum/log" | ||
| ) | ||
|
|
||
| // SnowmanAPI introduces snowman specific functionality to the evm | ||
| type SnowmanAPI struct{ vm *VM } | ||
|
|
||
| // GetAcceptedFrontReply defines the reply that will be sent from the | ||
| // GetAcceptedFront API call | ||
| type GetAcceptedFrontReply struct { | ||
| Hash common.Hash `json:"hash"` | ||
| Number *big.Int `json:"number"` | ||
| } | ||
|
|
||
| // GetAcceptedFront returns the last accepted block's hash and height | ||
| func (api *SnowmanAPI) GetAcceptedFront(ctx context.Context) (*GetAcceptedFrontReply, error) { | ||
| blk := api.vm.blockChain.LastConsensusAcceptedBlock() | ||
| return &GetAcceptedFrontReply{ | ||
| Hash: blk.Hash(), | ||
| Number: blk.Number(), | ||
| }, nil | ||
| } | ||
|
|
||
| // IssueBlock to the chain | ||
| func (api *SnowmanAPI) IssueBlock(ctx context.Context) error { | ||
| log.Info("Issuing a new block") | ||
| api.vm.builder.signalTxsReady() | ||
| return nil | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.