Feature #24
Die unendliche Wahl
Description
Because of the troubles around the Austrian presidential election 2016, there was the idea to build a PoC for a blockchain based online voting.
It was about getting some practical experience and about having something tangible to showcase.
In the end the theme of an "infinite election" emerged and was implemented.
The election is ongoing, but restarts every midnight. The result of the previous day is shown.
For more context, see Blockvote wiki page.
Open issues:
- compat: On a Samsung Galaxy phone with default browser (seems to be a Samsung branded Chrome), the "Authenticate" button doesn't work
Layout: The string of the loading page is cut off (doesn't fit horizontally) on some mobiles- Functional: The result chart is sometimes not shown.
UX: When switching view, the page should be scrolled to the top (not to previous scroll position as is now)** Still not working on mobile Firefox (didn't test other mobile browsers)- UX: The top bar state items suggest to be buttons, should visually reflect that they are not input elements
- Eth: Check if transaction was successful
- Eth: Check if Blockchain is reorganized (tricky. Event with deleted flag)
- Eth: unsubscribe events when page in background (don't slow down the device)
compat: Support Mist and Metamask (and Status.im)(TODO: should ask for account in Mist when none connected.) ** Not yet working on status (see notes)- deploy: get rid of unused (Aurelia) depencencies
- deploy: fix bundle script
- not tested on iOS browser
Subtasks
Related issues
Associated revisions
initial import
- Added convenience scripts for dev blockchain and election round switching
- Added countdown to next round in result view
- Use Ethereum events instead of polling for observing election status
- Renamed main contract file
- Added relay contract. Can be used for updatable contract. Not yet used
changed page title and loading string
changed wording
lowered the gas limit to 2M
fixed redirect to pdf for unsupported browsers
scroll to top when changing view
show message instead of missing chart if nobody voted in last round, use better (?) workaround for canvas not immediately ready issue
smaller splash message on mobile
Added support for web3 aware environment. Barely tested with Metamask and Mist, untested with Status.im
Retry in loop as long as result chart isn't created. This fix seems to work
History
#1 Updated by didi almost 8 years ago
- Description updated (diff)
#2 Updated by didi almost 8 years ago
- Description updated (diff)
#3 Updated by didi almost 8 years ago
- Description updated (diff)
#5 Updated by didi almost 8 years ago
- Related to Research #26: status.im - mobile Ethereum browser added
#6 Updated by didi almost 8 years ago
- Description updated (diff)
Tested on status.im.
Fails the browser compatibility test because localStorage is not available (according to Modernizr).
Also, logcat shows the following:
12-21 18:51:11.521 9130 9130 I chromium: [INFO:CONSOLE(2)] "Mixed Content: The page at 'https://die-unendliche-wahl.at/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost:8545/'. This request has been blocked; the content must be served over HTTPS.", source: (2)
which is a bit weird.
The website is configured with the following rpc path: "rpc": "//die-unendliche-wahl.at/web3"
in app/config/config.json
.
This is then internally rewritten to localhost:2016 by nginx.
So, http://localhost:8545
must be a rewrite done by status.
I assume the check typeof web3 !== 'undefined'
in source:die-unendliche-wahl|app/src/logic.js@d54651c9#L51 is true.
Update: the mixed content issue is known to the devs.