Skip to content

Commit

Permalink
Merge branch 'feature/alphanet' into use-alpha1-protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
egieseke committed Jul 7, 2022
2 parents 1a2e86e + fa26cd4 commit e5bf1c2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const Devnet protocol.NetworkID = "devnet"
// Betanet identifies the 'beta network' use for early releases of feature to the public prior to releasing these to mainnet/testnet
const Betanet protocol.NetworkID = "betanet"

// Alphanet identifies the 'alpha network' use for performance releases of feature/alphanet to the public prior to releasing these to mainnet/testnet
const Alphanet protocol.NetworkID = "alphanet"

// Devtestnet identifies the 'development network for tests' use for running tests against development and not generally accessible publicly
const Devtestnet protocol.NetworkID = "devtestnet"

Expand Down
11 changes: 11 additions & 0 deletions config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,10 +1152,21 @@ func initConsensusProtocols() {
Consensus[protocol.ConsensusFuture] = vFuture

vAlpha1 := v32
vAlpha1.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{}

vAlpha1.AgreementFilterTimeoutPeriod0 = 2 * time.Second
vAlpha1.MaxTxnBytesPerBlock = 5000000

Consensus[protocol.ConsensusVAlpha1] = vAlpha1

vAlpha2 := vAlpha1
vAlpha2.AgreementFilterTimeoutPeriod0 = 3500 * time.Millisecond
vAlpha2.MaxTxnBytesPerBlock = 5 * 1024 * 1024

Consensus[protocol.ConsensusVAlpha2] = vAlpha2

// vAlpha1 can be upgraded to vAlpha2, with a short update delay of a few hours
vAlpha1.ApprovedUpgrades[protocol.ConsensusVAlpha2] = 10000
}

// Global defines global Algorand protocol parameters which should not be overridden.
Expand Down
2 changes: 2 additions & 0 deletions config/localTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ func (cfg Local) DNSBootstrap(network protocol.NetworkID) string {
return "devnet.algodev.network"
} else if network == Betanet {
return "betanet.algodev.network"
} else if network == Alphanet {
return "alphanet.algodev.network"
}
}
return strings.Replace(cfg.DNSBootstrapID, "<network>", string(network), -1)
Expand Down
6 changes: 6 additions & 0 deletions protocol/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ const ConsensusVAlpha1 = ConsensusVersion(
"alpha1",
)

// ConsensusVAlpha2 is the second consensus protocol for AlphaNet, which increases the
// filter timeout to 3.5 seconds and uses 5MiB blocks.
const ConsensusVAlpha2 = ConsensusVersion(
"alpha2",
)

// !!! ********************* !!!
// !!! *** Please update ConsensusCurrentVersion when adding new protocol versions *** !!!
// !!! ********************* !!!
Expand Down

0 comments on commit e5bf1c2

Please sign in to comment.