Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultEthRPC() string
- func DefaultRegistryAddress() string
- func GetDbURL() string
- func GetEnvWithDefault(key, defaultValue string) string
- func GetEthRPC() string
- func GetRegistryAddress() string
- func GetRuntimeEnvironment() string
- func MakeRewards(claimAuthorities []rewards.ClaimAuthority, rewardExtensions []rewards.Reward) []rewards.Reward
- type Config
- type NodeType
- type RollupInterval
- type SandboxVars
- type StateSyncConfig
Constants ¶
View Source
const ( ModuleConsole = "console" ModuleDebug = "debug" ModulePprof = "pprof" ModuleComet = "comet" ModuleGraphQL = "graphql" )
View Source
const ( ProdRegistryAddress = "0xd976d3b4f4e22a238c1A736b6612D22f17b6f64C" StageRegistryAddress = "0xc682C2166E11690B64338e11633Cb8Bb60B0D9c0" DevRegistryAddress = "0xABbfF712977dB51f9f212B85e8A4904c818C2b63" ProdAcdcAddress = "0x1Cd8a543596D499B9b6E7a6eC15ECd2B7857Fd64" StageAcdcAddress = "0x1Cd8a543596D499B9b6E7a6eC15ECd2B7857Fd64" DevAcdcAddress = "0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B" ProdEthRpc = "https://eth-validator.audius.co" StageEthRpc = "https://eth-validator.staging.audius.co" DevEthRpc = "http://eth-ganache:8545" DiscoveryDbURL = "postgresql://postgres:postgres@localhost:5432/audius_discovery" ContentDbURL = "postgresql://postgres:postgres@localhost:5432/audius_creator_node" )
View Source
const ( ProdPersistentPeers = "" /* 484-byte string literal not displayed */ StagePersistentPeers = "" /* 362-byte string literal not displayed */ DevPersistentPeers = "ffad25668e060a357bbe534c8b7e5b4e1274368b@audiusd-1:26656" )
View Source
const ( ProdStateSyncRpcs = "creatornode.audius.co,creatornode2.audius.co" StageStateSyncRpcs = "creatornode11.audius.co,creatornode5.audius.co" )
View Source
const PrivilegedServiceSocket = "/tmp/cometbft.privileged.sock"
Variables ¶
View Source
var ( DevClaimAuthorities = []rewards.ClaimAuthority{{Address: "0x73EB6d82CFB20bA669e9c178b718d770C49BB52f", Name: "TikiLabsDiscovery"}, {Address: "0xfc3916B97489d2eFD81DDFDf11bad8E33ad5b87a", Name: "TikiLabsBridge"}} StageClaimAuthorities = []rewards.ClaimAuthority{{Address: "0x8fcFA10Bd3808570987dbb5B1EF4AB74400FbfDA", Name: "TikiLabsDiscovery"}, {Address: "0x788aab45F3D4b7e44dBE71c688589942a9261651", Name: "TikiLabsBridge"}} ProdClaimAuthorities = []rewards.ClaimAuthority{{Address: "0xf1a1Bd34b2Bc73629aa69E50E3249E89A3c16786", Name: "TikiLabsDiscovery"}, {Address: "0x66C72FC7D7b36c7691ed72CA243dd427880C8ec8", Name: "TikiLabsBridge"}} )
View Source
var ( // BaseRewards contains all rewards that are common across all environments BaseRewards = []rewards.Reward{ { Amount: 1, RewardId: "p", Name: "profile completion", }, { Amount: 1, RewardId: "e", Name: "endless listen streak", }, { Amount: 1, RewardId: "u", Name: "upload tracks", }, { Amount: 1, RewardId: "r", Name: "referrals", }, { Amount: 1, RewardId: "rv", Name: "referrals verified", }, { Amount: 1, RewardId: "rd", Name: "referred", }, { Amount: 5, RewardId: "v", Name: "verified", }, { Amount: 1, RewardId: "m", Name: "mobile install", }, { Amount: 1000, RewardId: "tt", Name: "trending tracks", }, { Amount: 1000, RewardId: "tut", Name: "trending underground", }, { Amount: 100, RewardId: "tp", Name: "trending playlist", }, { Amount: 2, RewardId: "ft", Name: "first tip", }, { Amount: 2, RewardId: "fp", Name: "first playlist", }, { Amount: 5, RewardId: "b", Name: "audio match buyer", }, { Amount: 5, RewardId: "s", Name: "audio match seller", }, { Amount: 1, RewardId: "o", Name: "airdrop 2", }, { Amount: 1, RewardId: "c", Name: "first weekly comment", }, { Amount: 25, RewardId: "p1", Name: "play count milestone", }, { Amount: 100, RewardId: "p2", Name: "play count milestone", }, { Amount: 1000, RewardId: "p3", Name: "play count milestone", }, { Amount: 100, RewardId: "t", Name: "tastemaker", }, } // Environment-specific reward extensions DevRewardExtensions = []rewards.Reward{} StageRewardExtensions = []rewards.Reward{} ProdRewardExtensions = []rewards.Reward{} )
View Source
var Version string
Functions ¶
func DefaultEthRPC ¶
func DefaultEthRPC() string
func DefaultRegistryAddress ¶
func DefaultRegistryAddress() string
func GetEnvWithDefault ¶
func GetRegistryAddress ¶
func GetRegistryAddress() string
func GetRuntimeEnvironment ¶
func GetRuntimeEnvironment() string
func MakeRewards ¶
Types ¶
type Config ¶
type Config struct { /* Comet Config */ RootDir string RPCladdr string P2PLaddr string PSQLConn string PersistentPeers string Seeds string ExternalAddress string AddrBookStrict bool MaxInboundPeers int MaxOutboundPeers int CometLogLevel string RetainHeight int64 /* Audius Config */ Environment string WalletAddress string ProposerAddress string GRPCladdr string CoreServerAddr string NodeEndpoint string Archive bool LogLevel string /* Ethereum Config */ EthRPCUrl string EthRegistryAddress string /* System Config */ RunDownMigration bool SlaRollupInterval int ValidatorVotingPower int UseHttpsForSdk bool StateSync *StateSyncConfig /* Derived Config */ GenesisFile *types.GenesisDoc EthereumKey *ecdsa.PrivateKey CometKey *ed25519.PrivKey NodeType NodeType Rewards []rewards.Reward /* Optional Modules */ ConsoleModule bool DebugModule bool CometModule bool PprofModule bool /* Attestation Thresholds */ AttRegistrationMin int // minimum number of attestations needed to register a new node AttRegistrationRSize int // rendezvous size for registration attestations (should be >= to AttRegistrationMin) AttDeregistrationMin int // minimum number of attestations needed to deregister a node AttDeregistrationRSize int // rendezvous size for deregistration attestations (should be >= to AttDeregistrationMin) /* Feature flags */ ERNAccessControlEnabled bool }
func SetupNode ¶
Reads in config, sets up comet files, and cleans up state based on setup configuration.
- reads in env config - determines env - gathers chain id
func (*Config) NewSandboxVars ¶
func (c *Config) NewSandboxVars(env ...string) *SandboxVars
func (*Config) RunDownMigrations ¶
type RollupInterval ¶
type RollupInterval struct {
BlockInterval int
}
type SandboxVars ¶
type StateSyncConfig ¶
type StateSyncConfig struct { // will periodically save pg_dumps to disk and serve them to other nodes ServeSnapshots bool // will download pg_dumps from other nodes on initial sync Enable bool // list of rpc endpoints to download pg_dumps from RPCServers []string // number of snapshots to keep on disk Keep int // interval to save snapshots in blocks BlockInterval int64 // number of chunk fetchers to use ChunkFetchers int32 }
Click to show internal directories.
Click to hide internal directories.