-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fork LTS (merge main into release-lts-1) #1215
Merged
Merged
Conversation
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
Contributor
altergui
commented
Dec 11, 2023
- cleanup unused leftovers
- vochain: pass whole vochainCfg to NewBaseApplication
- renamed confusing VochainCfg.Chain -> VochainCfg.Network
- util: move zk.BigToFF and zk.BytesToArboStr to util package
- vochain fork: refactor ZkCircuits handling
- vochain/indexer: add an Options struct
- vochain/indexer: invert "live results" option
- vochain/indexer: move DataDir to Options
- vochain/indexer: add support for backups
- vochain fork: bump vocdoni/STAGE/9 ForkBlock
* TransactionHandler.ZkVKs * genesis.Circuits
this avoids an import cycle in upcoming refactor of circuit package
* circuit package now has a Global() circuit, and all packages (including TransactionHandler) use that * circuit/config.go: rename `dev` -> `v0.0.1` and add voceremony as `v1.0.0` * circuit/config.go: rename `tag` concept into `version` * circuit/config.go: now ZkCircuitConfig has Version field, drop app.circuitConfigTag * circuit/config.go: now PublicSignals is a property of each circuit (previously hardcoded in prover) * prover: use PubSignals from circuit.Global() instead of hardcoded indexes * 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 DownloadArtifacts funcs * DownloadArtifactsForChainID * DownloadDefaultArtifacts * NewBaseApplication now calls circuit.DownloadDefaultArtifacts instead of transactionHandler.LoadZkCircuit * newTendermint now calls circuit.DownloadArtifactsForChainID
We will add more options like a backup file to restore from, and more boolean or string parameters will start getting confusing. A struct also allows us to add more options in the future without immediately breaking existing users. While here, rename indexer.NewIndexer to indexer.New to avoid repetition.
This matches IndexerCfg.IgnoreLiveResults and Indexer.ignoreLiveResults, so the logic is now overall simpler and we don't negate twice. Moreover, the vast majority of calls do want to count live results, such as all the calls to newTestIndexer, so those can default to false.
Simplifies the function calls a bit.
A new SaveBackup method which creates a backup to a file on disk, and a new RestoreBackup method which can restore them. Note that the restoring can only happen shortly after calling New, since otherwise any indexing or queries happening at the same time can easily lead to bad data since they would race to lock the database. This only implements backing up and restoring from a file on disk. Future changes will integrate this with the rest of the codebase, such as taking regular backups or listing the stored backups. Updates #1062.
Pull Request Test Coverage Report for Build 7167888524
💛 - Coveralls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.