-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vochain fork: refactor ZkCircuits handling
* circuit/config: rename `dev` -> `v0.0.1` and add voceremony as `v1.0.0` * circuit/config: rename `tag` concept into `version` * circuit/config: now ZkCircuitConfig has Version field, drop app.circuitConfigTag * TransactionHandler: unexport zkCircuit field, expose over ZkCircuit methods that implement sync.Mutex * api: /chain/info now returns circuitVersion (instead of misspelt cicuitConfigurationTag) * apiclient: small fix, LoadZkCircuit once on NewHTTPclient instead of every Vote * testsuite: mount zkCircuits cache dir in test container as well * vochain/app.go: SetZkCircuit during beginBlock * add config/forks.go * circuit: add DownloadZkCircuits funcs * DownloadZkCircuitsForChainID * DownloadDefaultZkCircuit NewBaseApplication now calls circuit.DownloadDefaultZkCircuit instead of transactionHandler.LoadZkCircuit and newTendermint now calls circuit.DownloadZkCircuitsForChainID
- Loading branch information
Showing
16 changed files
with
182 additions
and
108 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
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
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
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,27 @@ | ||
package config | ||
|
||
// ForksCfg allows applying softforks at specified heights | ||
type ForksCfg struct { | ||
VoceremonyForkBlock uint32 | ||
} | ||
|
||
// Forks is a map of chainIDs | ||
var Forks = map[string]*ForksCfg{ | ||
"vocdoni/DEV/29": { | ||
VoceremonyForkBlock: 180000, // estimated 2023-11-30T23:45:29.095375169Z | ||
}, | ||
"vocdoni/STAGE/9": { | ||
VoceremonyForkBlock: 190000, // estimated 2023-12-04T11:25:38.643517797Z | ||
}, | ||
"vocdoni/LTS/1.2": { | ||
VoceremonyForkBlock: 350000, // estimated 2023-12-06T05:59:27.529386884Z | ||
}, | ||
} | ||
|
||
// ForksForChainID returns the ForksCfg of chainID, if found, or an empty ForksCfg otherwise | ||
func ForksForChainID(chainID string) *ForksCfg { | ||
if cfg, found := Forks[chainID]; found { | ||
return cfg | ||
} | ||
return &ForksCfg{} | ||
} |
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
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
Oops, something went wrong.