You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will generate a flamegraph of the `cast_vote` function and save the output svg to the `target` directory. You can open the svg file in your browser to visualize the flamegraph.
99
99
100
100
You can also run the same command with `SERVE=1` to serve the flamegraph on a local server.
This function takes the admin argument and writes it to the storage. We are also using this function to set the `vote_ended` boolean as false in the same way.
112
112
@@ -122,7 +122,7 @@ To ensure someone only votes once, we will create a nullifier as part of the fun
In this function, we do not create a nullifier with the address directly. This would leak privacy as it would be easy to reverse-engineer. We must add some randomness or some form of secret, like nullifier secrets.
128
128
@@ -132,7 +132,7 @@ After pushing the nullifier, we update the `tally` to reflect this vote. As we k
We set it as `utility` because we don't intend to call this as part of a transaction: we want to call it from our application code to e.g. display the result in a UI.
150
150
@@ -154,7 +154,7 @@ To ensure that only an `admin` can end a voting period, we can use another `asse
0 commit comments