-
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
bug: Vocone can not download from IPFS censuses created by census3 #1126
Comments
so, upon investigation, this is due to a bug in Lines 129 to 136 in ddea83d
crucially, it's missing vocdoni-node/service/offchaindata.go Lines 16 to 37 in 61101a8
this is a simple fix diff --git a/vocone/vocone.go b/vocone/vocone.go
index 568e0444..6200ea99 100644
--- a/vocone/vocone.go
+++ b/vocone/vocone.go
@@ -129,12 +129,12 @@ func NewVocone(dataDir string, keymanager *ethereum.SignKeys, disableIPFS bool)
// Create the data downloader and offchain data handler
if !disableIPFS {
- offchaindatahandler.NewOffChainDataHandler(
- vc.app,
- downloader.NewDownloader(vc.storage),
- vc.censusdb,
- false,
- )
+ srv.App = vc.app
+ srv.Storage = vc.storage
+ srv.CensusDB = vc.censusdb
+ globalCfg := config.NewConfig()
+ srv.Config = globalCfg.Vochain
+ srv.OffChainDataHandler()
}
return vc, err but i'll try refactoring the whole voconed, to make it much more similar to vocdoni-node, to diminish these kind of bugs and ease future maintenance |
WORKSFORME diff --git a/docker-compose.yml b/docker-compose.yml
index e964703..7ee1689 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -29,6 +29,8 @@ services:
voconed:
# pull main tag (instead of latest) to ensure we're testing against bleeding edge
image: vocdoni/vocdoni-node:main
+ build:
+ context: https://github.com/vocdoni/vocdoni-node.git#f/offchaindh-fixes
entrypoint: /app/voconed
environment:
- VOCONED_PORT=9095 after building the voconed docker image from that branch, i see the census being downloaded and added to censusdb
|
Describe the bug
Using the deploy-snippets repo I found an error during the creation of elections using a "Token-based census" from Census3.
Census3 syncs, creates and publishes successfully the census to IPFS but the Vocone can not download it, so the census never is created and the voters can cast any vote.
To validate the published census, you can use the following gist. Example:
To Reproduce (please complete the following information)
curl
:localhost:8080
and create an election with a token-based census using theToken Monkeys (MON)
.The text was updated successfully, but these errors were encountered: