Skip to content

Commit 680237c

Browse files
committed
Add staging net
1 parent 10c4083 commit 680237c

18 files changed

+40
-36
lines changed

cmd/bootstrap/cmd/block.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func parseChainID(chainID string) flow.ChainID {
2626
return flow.Mainnet
2727
case "test":
2828
return flow.Testnet
29-
case "canary":
30-
return flow.Canary
29+
case "staging":
30+
return flow.Stagingnet
3131
case "bench":
3232
return flow.Benchnet
3333
case "local":

cmd/bootstrap/cmd/keygen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func init() {
104104

105105
// optional parameters, used for generating machine account files
106106
keygenCmd.Flags().BoolVar(&flagDefaultMachineAccount, "machine-account", false, "whether or not to generate a default (same as networking key) machine account key file")
107-
keygenCmd.Flags().StringVar(&flagRootChain, "root-chain", "local", "chain ID for the root block (can be 'main', 'test', 'canary', 'bench', or 'local'")
107+
keygenCmd.Flags().StringVar(&flagRootChain, "root-chain", "local", "chain ID for the root block (can be 'main', 'test', 'staging', 'bench', or 'local'")
108108
}
109109

110110
// isEmptyDir returns True if the directory contains children

cmd/bootstrap/cmd/machine_account.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ func validateMachineAccountAddress(addressStr string) error {
121121
return nil
122122
}
123123
if flow.Testnet.Chain().IsValid(address) {
124-
log.Warn().Msgf("Machine account address (%s) is **TESTNET/CANARY** address - ensure this is desired before continuing", address)
124+
log.Warn().Msgf("Machine account address (%s) is **TESTNET** address - ensure this is desired before continuing", address)
125+
return nil
126+
}
127+
if flow.Stagingnet.Chain().IsValid(address) {
128+
log.Warn().Msgf("Machine account address (%s) is **STAGINGNET** address - ensure this is desired before continuing", address)
125129
return nil
126130
}
127131
if flow.Localnet.Chain().IsValid(address) {

cmd/scaffold.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -858,12 +858,12 @@ func (fnb *FlowNodeBuilder) initFvmOptions() {
858858
fvm.WithBlocks(blockFinder),
859859
fvm.WithAccountStorageLimit(true),
860860
}
861-
if fnb.RootChainID == flow.Testnet || fnb.RootChainID == flow.Canary || fnb.RootChainID == flow.Mainnet {
861+
if fnb.RootChainID == flow.Testnet || fnb.RootChainID == flow.Stagingnet || fnb.RootChainID == flow.Mainnet {
862862
vmOpts = append(vmOpts,
863863
fvm.WithTransactionFeesEnabled(true),
864864
)
865865
}
866-
if fnb.RootChainID == flow.Testnet || fnb.RootChainID == flow.Canary || fnb.RootChainID == flow.Localnet || fnb.RootChainID == flow.Benchnet {
866+
if fnb.RootChainID == flow.Testnet || fnb.RootChainID == flow.Stagingnet || fnb.RootChainID == flow.Localnet || fnb.RootChainID == flow.Benchnet {
867867
vmOpts = append(vmOpts,
868868
fvm.WithContractDeploymentRestricted(false),
869869
)

flips/component-interface.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ A component will now be started by passing a `SignalerContext` to its `Start` me
160160
// It is meant to inspect the error, determining its type and seeing if e.g. a restart or some other measure is suitable,
161161
// and then return an ErrorHandlingResult indicating how RunComponent should proceed.
162162
// Before returning, it could also:
163-
// - panic (in canary / benchmark)
163+
// - panic (in stagingnet / benchmark)
164164
// - log in various Error channels and / or send telemetry ...
165165
type OnError = func(err error) ErrorHandlingResult
166166

fvm/systemcontracts/system_contracts.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ func init() {
177177
}
178178
contractAddressesByChainID[flow.Testnet] = testnet
179179

180-
// Canary test network
180+
// Stagingnet test network
181181
// All system contracts are deployed to the service account
182-
canary := map[string]flow.Address{
183-
ContractNameEpoch: flow.Canary.Chain().ServiceAddress(),
184-
ContractNameClusterQC: flow.Canary.Chain().ServiceAddress(),
185-
ContractNameDKG: flow.Canary.Chain().ServiceAddress(),
182+
stagingnet := map[string]flow.Address{
183+
ContractNameEpoch: flow.Stagingnet.Chain().ServiceAddress(),
184+
ContractNameClusterQC: flow.Stagingnet.Chain().ServiceAddress(),
185+
ContractNameDKG: flow.Stagingnet.Chain().ServiceAddress(),
186186
}
187-
contractAddressesByChainID[flow.Canary] = canary
187+
contractAddressesByChainID[flow.Stagingnet] = stagingnet
188188

189189
// Transient test networks
190190
// All system contracts are deployed to the service account

fvm/systemcontracts/system_contracts_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
// TestSystemContract_Address tests that we can retrieve a canonical address
1414
// for all accepted chains and contracts.
1515
func TestSystemContracts(t *testing.T) {
16-
chains := []flow.ChainID{flow.Mainnet, flow.Testnet, flow.Canary, flow.Benchnet, flow.Localnet, flow.Emulator}
16+
chains := []flow.ChainID{flow.Mainnet, flow.Testnet, flow.Stagingnet, flow.Benchnet, flow.Localnet, flow.Emulator}
1717

1818
for _, chain := range chains {
1919
_, err := SystemContractsForChain(chain)
@@ -34,7 +34,7 @@ func TestSystemContract_InvalidChainID(t *testing.T) {
3434
// TestServiceEvents tests that we can retrieve service events for all accepted
3535
// chains and contracts.
3636
func TestServiceEvents(t *testing.T) {
37-
chains := []flow.ChainID{flow.Mainnet, flow.Testnet, flow.Canary, flow.Benchnet, flow.Localnet, flow.Emulator}
37+
chains := []flow.ChainID{flow.Mainnet, flow.Testnet, flow.Stagingnet, flow.Benchnet, flow.Localnet, flow.Emulator}
3838

3939
for _, chain := range chains {
4040
_, err := ServiceEventsForChain(chain)
@@ -46,7 +46,7 @@ func TestServiceEvents(t *testing.T) {
4646
// TestServiceEventLookup_Consistency sanity checks consistency of the lookup
4747
// method, in case an update to ServiceEvents forgets to update the lookup.
4848
func TestServiceEventAll_Consistency(t *testing.T) {
49-
chains := []flow.ChainID{flow.Mainnet, flow.Testnet, flow.Canary, flow.Benchnet, flow.Localnet, flow.Emulator}
49+
chains := []flow.ChainID{flow.Mainnet, flow.Testnet, flow.Stagingnet, flow.Benchnet, flow.Localnet, flow.Emulator}
5050

5151
fields := reflect.TypeOf(ServiceEvents{}).NumField()
5252
for _, chain := range chains {

k8s/local/flow-collection-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ metadata:
146146
# Best practice labels:
147147
# app: <app-name> (the non-unique version of metadata.name)
148148
# kind: [web|worker]
149-
# env: [staging|production|canary|test|dev]
149+
# env: [staging|production|test|dev]
150150
# owner: who to ask about this service
151151
# version: the major version of this service (v1/v2/v1beta1)
152152
labels:

k8s/local/flow-consensus-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
# Best practice labels:
99
# app: <app-name> (the non-unique version of metadata.name)
1010
# kind: [web|worker]
11-
# env: [staging|production|canary|test|dev]
11+
# env: [staging|production|test|dev]
1212
# owner: who to ask about this service
1313
# version: the major version of this service (v1/v2/v1beta1)
1414
labels:

k8s/local/flow-execution-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
# Best practice labels:
99
# app: <app-name> (the non-unique version of metadata.name)
1010
# kind: [web|worker]
11-
# env: [staging|production|canary|test|dev]
11+
# env: [staging|production|test|dev]
1212
# owner: who to ask about this service
1313
# version: the major version of this service (v1/v2/v1beta1)
1414
labels:

k8s/local/flow-verification-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
# Best practice labels:
99
# app: <app-name> (the non-unique version of metadata.name)
1010
# kind: [web|worker]
11-
# env: [staging|production|canary|test|dev]
11+
# env: [staging|production|test|dev]
1212
# owner: who to ask about this service
1313
# version: the major version of this service (v1/v2/v1beta1)
1414
labels:

k8s/staging/flow-collection-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ metadata:
146146
# Best practice labels:
147147
# app: <app-name> (the non-unique version of metadata.name)
148148
# kind: [web|worker]
149-
# env: [staging|production|canary|test|dev]
149+
# env: [staging|production|test|dev]
150150
# owner: who to ask about this service
151151
# version: the major version of this service (v1/v2/v1beta1)
152152
labels:

k8s/staging/flow-consensus-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
# Best practice labels:
99
# app: <app-name> (the non-unique version of metadata.name)
1010
# kind: [web|worker]
11-
# env: [staging|production|canary|test|dev]
11+
# env: [staging|production|test|dev]
1212
# owner: who to ask about this service
1313
# version: the major version of this service (v1/v2/v1beta1)
1414
labels:

k8s/staging/flow-execution-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
# Best practice labels:
99
# app: <app-name> (the non-unique version of metadata.name)
1010
# kind: [web|worker]
11-
# env: [staging|production|canary|test|dev]
11+
# env: [staging|production|test|dev]
1212
# owner: who to ask about this service
1313
# version: the major version of this service (v1/v2/v1beta1)
1414
labels:

k8s/staging/flow-verification-node-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
# Best practice labels:
99
# app: <app-name> (the non-unique version of metadata.name)
1010
# kind: [web|worker]
11-
# env: [staging|production|canary|test|dev]
11+
# env: [staging|production|test|dev]
1212
# owner: who to ask about this service
1313
# version: the major version of this service (v1/v2/v1beta1)
1414
labels:

model/flow/address_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func testAddressConstants(t *testing.T) {
9898
Mainnet,
9999
Testnet,
100100
Emulator,
101-
Canary,
101+
Stagingnet,
102102
}
103103

104104
for _, chainID := range chainIDs {
@@ -147,7 +147,7 @@ func testAddressGeneration(t *testing.T) {
147147
Mainnet,
148148
Testnet,
149149
Emulator,
150-
Canary,
150+
Stagingnet,
151151
}
152152

153153
for _, chainID := range chainIDs {
@@ -240,7 +240,7 @@ func testAddressesIntersection(t *testing.T) {
240240
Mainnet,
241241
Testnet,
242242
Emulator,
243-
Canary,
243+
Stagingnet,
244244
}
245245

246246
for _, chainID := range chainIDs {
@@ -309,7 +309,7 @@ func testIndexFromAddress(t *testing.T) {
309309
mainnet,
310310
testnet,
311311
emulator,
312-
canary,
312+
stagingnet,
313313
}
314314

315315
for _, chain := range chains {

model/flow/chain.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const (
2121

2222
// Testnet is the chain ID for the testnet chain.
2323
Testnet ChainID = "flow-testnet"
24-
// Canary is the chain ID for internal canary chain.
25-
Canary ChainID = "flow-canary"
24+
// Stagingnet is the chain ID for internal stagingnet chain.
25+
Stagingnet ChainID = "flow-stagingnet"
2626

2727
// Transient test networks
2828

@@ -52,7 +52,7 @@ func (c ChainID) getChainCodeWord() uint64 {
5252
return 0
5353
case Testnet:
5454
return invalidCodeTestNetwork
55-
case Canary:
55+
case Stagingnet:
5656
return invalidCodeCanaryNetwork
5757
case Emulator, Localnet, Benchnet, BftTestnet:
5858
return invalidCodeTransientNetwork
@@ -175,9 +175,9 @@ var bftTestNet = &addressedChain{
175175
},
176176
}
177177

178-
var canary = &addressedChain{
178+
var stagingnet = &addressedChain{
179179
chainImpl: &linearCodeImpl{
180-
chainID: Canary,
180+
chainID: Stagingnet,
181181
},
182182
}
183183

@@ -210,8 +210,8 @@ func (c ChainID) Chain() Chain {
210210
return mainnet
211211
case Testnet:
212212
return testnet
213-
case Canary:
214-
return canary
213+
case Stagingnet:
214+
return stagingnet
215215
case Benchnet:
216216
return benchnet
217217
case Localnet:

module/component/component.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type ComponentFactory func() (Component, error)
3030
// It is meant to inspect the error, determining its type and seeing if e.g. a restart or some other measure is suitable,
3131
// and then return an ErrorHandlingResult indicating how RunComponent should proceed.
3232
// Before returning, it could also:
33-
// - panic (in canary / benchmark)
33+
// - panic (in stagingnet / benchmark)
3434
// - log in various Error channels and / or send telemetry ...
3535
type OnError = func(error) ErrorHandlingResult
3636

0 commit comments

Comments
 (0)