-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9c7de2
commit cd56489
Showing
10 changed files
with
92 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,16 +1,13 @@ | ||
package common | ||
|
||
type Block struct { | ||
|
||
} | ||
type Transactions struct{ | ||
|
||
type Transactions struct { | ||
} | ||
|
||
// can be an enum | ||
type BlockTag struct { | ||
|
||
} | ||
|
||
// need some error structs and enums as well | ||
// Example: BlockNotFoundError | ||
// need some error structs and enums as well | ||
// Example: BlockNotFoundError |
This file contains 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 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 |
---|---|---|
@@ -1,70 +1,64 @@ | ||
package checkpoints | ||
|
||
//networks file will be used (import package config) | ||
type StartEndTime struct{ | ||
|
||
// networks file will be used (import package config) | ||
type StartEndTime struct { | ||
} | ||
type Health struct{ | ||
|
||
type Health struct { | ||
} | ||
type CheckpointFallbackService struct{ | ||
|
||
type CheckpointFallbackService struct { | ||
} | ||
type CheckpointFallback struct{ | ||
|
||
type CheckpointFallback struct { | ||
} | ||
type RawSlotResponse struct{ | ||
|
||
type RawSlotResponse struct { | ||
} | ||
type RawSlotResponseData struct{ | ||
|
||
type RawSlotResponseData struct { | ||
} | ||
type Slot struct{ | ||
|
||
type Slot struct { | ||
} | ||
|
||
|
||
func get() {} | ||
func deserialize_slot() {} | ||
|
||
// parameters and return types need not be correct currently | ||
|
||
func (ch CheckpointFallback) new(){ | ||
func (ch CheckpointFallback) new() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) build(){ | ||
func (ch CheckpointFallback) build() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) fetch_latest_checkpoint(){ | ||
func (ch CheckpointFallback) fetch_latest_checkpoint() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) query_service(){ | ||
func (ch CheckpointFallback) query_service() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) fetch_latest_checkpoint_from_services(){ | ||
func (ch CheckpointFallback) fetch_latest_checkpoint_from_services() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) fetch_latest_checkpoint_from_api(){ | ||
func (ch CheckpointFallback) fetch_latest_checkpoint_from_api() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) construct_url(){ | ||
func (ch CheckpointFallback) construct_url() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) get_all_fallback_endpoints(){ | ||
func (ch CheckpointFallback) get_all_fallback_endpoints() { | ||
|
||
} | ||
|
||
func (ch CheckpointFallback) get_healthy_fallback_endpoints(){ | ||
|
||
func (ch CheckpointFallback) get_healthy_fallback_endpoints() { | ||
|
||
} | ||
func (ch CheckpointFallback) get_healthy_fallback_services() { | ||
|
||
} | ||
func (ch CheckpointFallback) get_healthy_fallback_services(){ | ||
func (ch CheckpointFallback) get_fallback_services() { | ||
|
||
} | ||
func (ch CheckpointFallback) get_fallback_services(){ | ||
|
||
} |
This file contains 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,8 @@ | ||
package config | ||
|
||
type CliConfig struct { | ||
} | ||
|
||
func (ch CliConfig) as_provider() { | ||
|
||
} |
This file contains 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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package config | ||
|
||
type Config struct{ | ||
|
||
type Config struct { | ||
} | ||
|
||
// only if we are using CLI | ||
func(c Config) from_file() Config{ | ||
func (c Config) from_file() Config { | ||
|
||
} | ||
func (c Config) to_base_config()BaseConfig{ | ||
func (c Config) to_base_config() BaseConfig { | ||
|
||
} | ||
func (c Config) fork_version(slot uint64) []uint8{ | ||
func (c Config) fork_version(slot uint64) []uint8 { | ||
|
||
} | ||
} |
This file contains 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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
package config | ||
|
||
|
||
type Network string | ||
|
||
const ( | ||
MAINNET Network = "MAINNET" | ||
GOERLI Network = "GOERLI" | ||
SEPOLIA Network = "SEPOLIA" | ||
MAINNET Network = "MAINNET" | ||
GOERLI Network = "GOERLI" | ||
SEPOLIA Network = "SEPOLIA" | ||
) | ||
|
||
// hardcode the base configurations for each of the networks | ||
//check s and write switch case | ||
func (n Network) base_config(s string)(BaseConfig,error){ | ||
// check s and write switch case | ||
func (n Network) base_config(s string) (BaseConfig, error) { | ||
|
||
} | ||
|
||
func (n Network) chain_id(s string)(uint64,error){ | ||
func (n Network) chain_id(s string) (uint64, error) { | ||
|
||
} | ||
} | ||
func data_dir() {} |
This file contains 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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
package consensus | ||
|
||
// uses config mmodule | ||
type Database interface{ | ||
new() | ||
save_checkpoint() | ||
load_checkpoint() | ||
type Database interface { | ||
new() | ||
save_checkpoint() | ||
load_checkpoint() | ||
} | ||
|
||
//NOTE: parameters are not included | ||
type FileDB struct{Database} | ||
// NOTE: parameters are not included | ||
type FileDB struct{ Database } | ||
|
||
func (f FileDB)new() FileDB{} | ||
func (f FileDB)save_checkpoint() FileDB{} | ||
func (f FileDB)load_checkpoint() FileDB{} | ||
func (f FileDB) new() FileDB {} | ||
func (f FileDB) save_checkpoint() FileDB {} | ||
func (f FileDB) load_checkpoint() FileDB {} | ||
|
||
type ConfigDB struct{ Database } | ||
|
||
|
||
type ConfigDB struct{Database} | ||
func (cdb ConfigDB)new() ConfigDB{} | ||
func (cdb ConfigDB)save_checkpoint() ConfigDB{} | ||
func (cdb ConfigDB)load_checkpoint() ConfigDB{} | ||
func (cdb ConfigDB) new() ConfigDB {} | ||
func (cdb ConfigDB) save_checkpoint() ConfigDB {} | ||
func (cdb ConfigDB) load_checkpoint() ConfigDB {} |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package rpc | ||
|
||
//if we need to test the working we can by adding the whole code of nimbus_rpc here | ||
// and add a path to some local testdata folder | ||
// and add a path to some local testdata folder |
This file contains 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 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