Comments (3)
Hey,
Let me understand the situation. The user is running the website on their machine (i.e. vote.html) and then trying to connect to an Ethereum node (i.e. Geth) on a distant machine? I'll ask around as I haven't tried this before, but is there any reason for this approach?
I'm not sure if Web3 can guarantee it is talking to a legit full Ethereum node (i.e. has a full copy of the blockchain). This is not normally a concern since a node is on the user's actual machine, but if it is in the distance then that implies a different trust model i.e. we are trusting remote machine to really be running an Ethereum node. If this is the trust model you have - why not just run have vote.html connect directly to the web server (some .php scripts) instead of the Ethereum node?
from anonymousvoting.
A friend told me the following:
You'll have to make sure your request passes the correct 'origin' property.
Either anonymous or with-credentials.
Then your remote server needs to have the correct CORS policy.
See your server docs to see how to set this.
(Example with GET requests:)
AllowedOrigin: *
AllowedMethod: GET
AllowedHeader: *
I hope the above is a good pointer on what to do next?
from anonymousvoting.
Thanks for your answer !
I didn't got the time yet to try your solution but I will keep you informed of the results.
For more informations, i'm trying to build a Docker image which can automatically connect to a private Blockchain with rpc allowed, to simplify the connection to the Blockchain for the user.
- The user launch the Docker image on his local machine and is connected to the Blockchain.
- Then he runs the website on his local machine, and the javascript code connects to the node with rpc.
The issue is that the Docker Engine create a virtual machine on Windows and a network between the host and this machine. The Ethereum node is on this machine, and the website need to go through this network to be connected to the node.
To summerize, the user is running the website on their machine (i.e. vote.html) and then trying to connect to an Ethereum node (i.e. Geth) on the "virtual" distant machine. All machines are locals but Chrome "think" the Ethereum node is on a distant machine and refuse the connection.
I don't know if I'm really clear, my English is not so good, and it's a bit complicated to explain ^^.
from anonymousvoting.
Related Issues (20)
- Is it possible to avoid to restart the protocol if someone doesn't vote in round 2 ? HOT 2
- Loss of password of the private key after registration. HOT 3
- callback contain no result Gas required exceeds limit: 3000000 HOT 5
- ZKP for the multi candidate elections HOT 13
- WaveVote project HOT 1
- Polys
- anonymousvotingAddr.owner() always "0x" HOT 4
- Problems following the video tutorial HOT 2
- Gas consumption is too high to create AnonymousVoting contract! HOT 2
- encrypt on chain
- Monitoring order of votes breaks anonymity HOT 7
- voting project using cosmos-sdk based on this project
- Strategies for alternative behavioural paths? HOT 1
- Question: can the user be guessed after submit the vote?
- how to run the code? HOT 2
- Browser-solidity : callback contain no result Gas required exceeds block gas limit: 4294967295 HOT 11
- Question: Does this require any trusted computing? HOT 1
- JS conversion of the Java file HOT 5
- Question: Is there something special about voters[1]? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anonymousvoting.