fix wordings

This commit is contained in:
Roman Storm 2020-04-29 12:26:36 -07:00
parent 0dde625894
commit 0667915dbf
No known key found for this signature in database
GPG Key ID: 522F2A785F34E71F
13 changed files with 19584 additions and 19509 deletions

View File

@ -16,7 +16,7 @@
> >
<b-input v-model="userName" @blur="restrictSymbols('userName')" maxlength="35"></b-input> <b-input v-model="userName" @blur="restrictSymbols('userName')" maxlength="35"></b-input>
</b-field> </b-field>
<b-field label="Company"> <b-field label="Project">
<b-input <b-input
v-model="userCompany" v-model="userCompany"
@blur="restrictSymbols('userCompany')" @blur="restrictSymbols('userCompany')"

View File

@ -4,7 +4,7 @@ module.exports = {
** Headers of the page ** Headers of the page
*/ */
head: { head: {
title: 'Tornado Trusted Setup Ceremony', title: 'Tornado.cash Trusted Setup Ceremony',
meta: [ meta: [
{ charset: 'utf-8' }, { charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' }, { name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' },
@ -22,7 +22,8 @@ module.exports = {
{ {
hid: 'og:description', hid: 'og:description',
property: 'og:description', property: 'og:description',
content: 'Non-custodial, trustless, serverless, private transactions on Ethereum network' content:
"Improve security of tornado.cash by contributing to Trusted Setup Ceremony. Let's make it fully trustless!"
}, },
{ {
hid: 'og:url', hid: 'og:url',
@ -42,7 +43,8 @@ module.exports = {
{ {
hid: 'description', hid: 'description',
name: 'description', name: 'description',
content: 'Non-custodial, trustless, serverless, private transactions on Ethereum network' content:
"Improve security of tornado.cash by contributing to Trusted Setup Ceremony. Let's make it fully trustless!"
}, },
{ {
hid: 'keywords', hid: 'keywords',

View File

@ -23,7 +23,7 @@
<div v-show="status.type !== ''" class="status"> <div v-show="status.type !== ''" class="status">
<div :class="status.type" class="status-message">{{ status.msg }}</div> <div :class="status.type" class="status-message">{{ status.msg }}</div>
<div v-show="status.type === 'is-success'" class="status-message is-success"> <div v-show="status.type === 'is-success'" class="status-message is-success">
Now you can post attestation from your twitter account. Now you can post your attestation to Twitter.
<div class="buttons is-centered"> <div class="buttons is-centered">
<b-button @click="makeTweet" type="is-primary" tag="a" target="_blank" outlined> <b-button @click="makeTweet" type="is-primary" tag="a" target="_blank" outlined>
Post attestation Post attestation
@ -60,9 +60,9 @@ export default {
return null return null
} }
if (!this.isLoggedIn) { if (!this.isLoggedIn) {
return `Do you want to authorize your contribution #${this.contributionIndex}? Please sign in.` return `Would you like to provide identity for your contribution #${this.contributionIndex}?`
} else { } else {
return `Please, specify your name and organization.` return `Please, specify your name and project.`
} }
} }
}, },
@ -97,7 +97,7 @@ export default {
body: JSON.stringify(body) body: JSON.stringify(body)
}) })
if (response.ok) { if (response.ok) {
this.status.msg = `Your contribution authorized.` this.status.msg = `Your contribution has been updated.`
this.status.type = 'is-success' this.status.type = 'is-success'
this.hideSaveBtn = true this.hideSaveBtn = true
} else { } else {

View File

@ -4,13 +4,13 @@
Tornado.cash <span>Trusted Setup Ceremony</span> Tornado.cash <span>Trusted Setup Ceremony</span>
</h1> </h1>
<p class="p is-size-6"> <p class="p is-size-6">
zk-SNARKs require a pre-existing setup between the prover and verifier. A set of public zk-SNARKs require a pre-existing setup between Prover and Verifier. A set of public parameters
parameters define the rules of the game for the construction of zk-SNARKs. Please contribute defines the rules of the game for the construction of zk-SNARKs. Please contribute with your
with your source of entropy, so that tornado.cash can be trustless. source of entropy, so that Tornado.cash can become fully trustless.
</p> </p>
<div class="buttons is-centered"> <div class="buttons is-centered">
<b-button type="is-primary" outlined tag="router-link" to="/make-contribution"> <b-button type="is-primary" outlined tag="router-link" to="/make-contribution">
Make the contribution Contribute
</b-button> </b-button>
</div> </div>
<div class="currently"> <div class="currently">
@ -50,7 +50,7 @@
{{ props.row.name }} {{ props.row.name }}
</b-table-column> </b-table-column>
<b-table-column field="company" label="Company"> <b-table-column field="company" label="Project">
{{ props.row.company }} {{ props.row.company }}
</b-table-column> </b-table-column>

View File

@ -7,10 +7,10 @@
Using pure Rust implementation: Using pure Rust implementation:
</h2> </h2>
<figure class="highlight"> <figure class="highlight">
<pre v-highlightjs><code class="bash"># Install rust <pre v-highlightjs><code class="bash"># Install Rust
curl -sSf https://sh.rustup.rs | sh curl -sSf https://sh.rustup.rs | sh
# Clone the repository with ceremony code # Clone the repository with the ceremony code
git clone https://github.com/tornadocash/phase2-bn254 git clone https://github.com/tornadocash/phase2-bn254
cd phase2-bn254/phase2 cd phase2-bn254/phase2
@ -24,11 +24,11 @@ cargo run --release --bin tornado</code></pre>
<div class="content p"> <div class="content p">
<p> <p>
Using this method you will download and compile ceremony source code from our git repo in a Using this method, you will download and compile the ceremony source code from our git repo
stock Rust container. This is not a prebuilt container distribution. in a stock Rust container. This is not a prebuilt container distribution.
</p> </p>
<p> <p>
First you need to install the docker on your system: Start by installing Docker on your system:
<a <a
href="https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe" href="https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe"
target="_blank" target="_blank"
@ -40,7 +40,7 @@ cargo run --release --bin tornado</code></pre>
</div> </div>
<figure class="highlight"> <figure class="highlight">
<pre v-highlightjs><code class="bash"># Download dockerfile <pre v-highlightjs><code class="bash"># Download Dockerfile
wget https://raw.githubusercontent.com/tornadocash/phase2-bn254/master/Dockerfile wget https://raw.githubusercontent.com/tornadocash/phase2-bn254/master/Dockerfile
# Build docker image # Build docker image

View File

@ -4,7 +4,7 @@
Hello, <span>@{{ userHandle }}</span> Hello, <span>@{{ userHandle }}</span>
</h1> </h1>
<h2 class="subtitle"> <h2 class="subtitle">
What way do you want to contribute to the Tornado.cash Trusted Setup Ceremony? How would you like to contribute to the Tornado.cash Trusted Setup Ceremony?
</h2> </h2>
<fieldset :disabled="status.type === 'is-success'"> <fieldset :disabled="status.type === 'is-success'">
<div class="columns is-centered"> <div class="columns is-centered">
@ -20,7 +20,7 @@
</div> </div>
<div class="column is-one-third"> <div class="column is-one-third">
<div :class="{ 'is-hovered': isLoggedIn }" class="box"> <div :class="{ 'is-hovered': isLoggedIn }" class="box">
<div class="title is-5">Using a social account</div> <div class="title is-5">By using social account</div>
<Form /> <Form />
</div> </div>
</div> </div>
@ -44,7 +44,7 @@
v-show="status.type === 'is-success' && contributionType !== 'anonymous'" v-show="status.type === 'is-success' && contributionType !== 'anonymous'"
class="status-message is-success" class="status-message is-success"
> >
Now you can post attestation from your twitter account. And now you can post your attestation to Twitter.
<div class="buttons is-centered"> <div class="buttons is-centered">
<b-button @click="makeTweet" type="is-primary" tag="a" target="_blank" outlined> <b-button @click="makeTweet" type="is-primary" tag="a" target="_blank" outlined>
Post attestation Post attestation
@ -53,8 +53,8 @@
</div> </div>
</div> </div>
<div v-show="authorizeLink" class="status"> <div v-show="authorizeLink" class="status">
You still can authorize your contribution by following this You can still provide identity for your contribution by following
<a :href="authorizeLink" class="has-text-primary">link</a>. <a :href="authorizeLink" class="has-text-primary">this link</a>.
</div> </div>
<div class="buttons is-centered"> <div class="buttons is-centered">
@ -65,13 +65,13 @@
type="is-primary" type="is-primary"
outlined outlined
> >
Make the contribution Contribute
</b-button> </b-button>
</div> </div>
<p class="p"> <p class="p">
If you dont trust binaries, we encorage you to follow this If you dont trust binaries, we encorage you to follow these
<router-link to="/instructions">instruction</router-link> to contribute by compiling from <router-link to="/instructions">instructions</router-link> to contribute by compiling from the
source code. It is very easy! source code. It is fairly easy!
</p> </p>
</div> </div>
</template> </template>
@ -159,10 +159,11 @@ export default {
getUserRandom() { getUserRandom() {
this.$buefy.dialog.prompt({ this.$buefy.dialog.prompt({
title: 'Contribution', title: 'Contribution',
message: `Please provide a random input. The input, along with browser randomness, will be used as a source of entropy for your contribution.`, message: `Please provide your random input that will be used as a source of entropy for your contribution along with browser's RNG.`,
inputAttrs: { inputAttrs: {
maxlength: 300 maxlength: 300
}, },
confirmText: 'Contribute',
trapFocus: true, trapFocus: true,
onConfirm: (userInput) => { onConfirm: (userInput) => {
this.makeContribution({ userInput }) this.makeContribution({ userInput })
@ -181,7 +182,7 @@ export default {
this.$root.$emit( this.$root.$emit(
'enableLoading', 'enableLoading',
'Generating random contribution. Your browser may appear unresponsive. It can take a minute or so' 'Generating random contribution. Your browser may appear unresponsive. It can take a minute or so to complete'
) )
await timeout(100) // allow UI to update before freezing in wasm await timeout(100) // allow UI to update before freezing in wasm
console.log('Source params', data) console.log('Source params', data)
@ -226,7 +227,7 @@ export default {
if (resp.ok) { if (resp.ok) {
const responseData = await resp.json() const responseData = await resp.json()
this.$store.commit('user/SET_CONTRIBUTION_INDEX', responseData.contributionIndex) this.$store.commit('user/SET_CONTRIBUTION_INDEX', responseData.contributionIndex)
this.status.msg = 'Your contribution is verified and recorded.' this.status.msg = 'Your contribution has been verified and recorded.'
this.status.type = 'is-success' this.status.type = 'is-success'
this.contributionHash = hash this.contributionHash = hash
if (this.contributionType === 'anonymous') { if (this.contributionType === 'anonymous') {

View File

@ -83,15 +83,13 @@ router.post('/response', upload.single('response'), async (req, res) => {
} else { } else {
token = crypto.randomBytes(32).toString('hex') token = crypto.randomBytes(32).toString('hex')
} }
await Contribution.create({ name, company, handle, socialType, token })
console.log('Contribution is correct, uploading to storage') console.log('Contribution is correct, uploading to storage')
if (process.env.DISABLE_S3 !== 'true') { if (process.env.DISABLE_S3 !== 'true') {
await uploadToS3({ filename: req.file.filename, contributionIndex }) await uploadToS3({ filename: req.file.filename, contributionIndex })
} }
console.log('Committing changes') console.log('Committing changes')
await Contribution.create({ name, company, handle, socialType, token })
await fs.copyFile(`/tmp/tornado/${req.file.filename}`, './server/snark_files/current.params') await fs.copyFile(`/tmp/tornado/${req.file.filename}`, './server/snark_files/current.params')
await fs.copyFile( await fs.copyFile(
'./server/snark_files/current.params', './server/snark_files/current.params',
@ -111,7 +109,7 @@ router.post('/response', upload.single('response'), async (req, res) => {
router.post('/authorize_contribution', async (req, res) => { router.post('/authorize_contribution', async (req, res) => {
if (!req.body || !req.body.name || !req.body.token) { if (!req.body || !req.body.name || !req.body.token) {
res.status(404).send('Wrong request params') res.status(404).send('Invalid request params')
} }
const contribution = await Contribution.findOne({ where: { token: req.body.token } }) const contribution = await Contribution.findOne({ where: { token: req.body.token } })
@ -121,7 +119,7 @@ router.post('/authorize_contribution', async (req, res) => {
} }
if (contribution.dataValues.socialType !== 'anonymous') { if (contribution.dataValues.socialType !== 'anonymous') {
res.status(404).send('The contribution is already authorized') res.status(404).send('Your contribution is already identified.')
return return
} }

View File

@ -8,10 +8,10 @@ function isValidName(value, minLength = 4) {
const validate = (contribution, options) => { const validate = (contribution, options) => {
const { name, company, socialType } = contribution.dataValues const { name, company, socialType } = contribution.dataValues
if (socialType !== 'anonymous' && !isValidName(name)) { if (socialType !== 'anonymous' && !isValidName(name)) {
throw new Error('Wrong name') throw new Error('Invalid user name')
} }
if (company && !isValidName(company, 0)) { if (company && !isValidName(company, 0)) {
throw new Error('Wrong company') throw new Error('Invalid company name')
} }
} }
@ -33,12 +33,12 @@ module.exports = (sequelize, DataTypes) => {
} }
} }
) )
Contribution.nextContributionIndex = async function() { Contribution.nextContributionIndex = async function () {
const rowsCount = await this.count() const rowsCount = await this.count()
return rowsCount + 1 return rowsCount + 1
} }
Contribution.associate = function(models) { Contribution.associate = function (models) {
// associations can be defined here // associations can be defined here
} }
return Contribution return Contribution

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -53,7 +53,9 @@ const actions = {
window.location.replace(`/api/connect/${provider}`) window.location.replace(`/api/connect/${provider}`)
}, },
makeTweet({ state }) { makeTweet({ state }) {
const tweetText = `Just made the contribution %23${state.contributionIndex} to @TornadoCash Trusted Setup Ceremony! 🚀 %23${process.env.hashtag}` const tweetText = `I just made the contribution %23${state.contributionIndex} to @TornadoCash Trusted Setup Ceremony!
🚀 Let's make it more secure and trustless %23${process.env.hashtag} \n
https://ceremony.tornado.cash`
const popUpWindowWidth = 600 const popUpWindowWidth = 600
const popUpWindowHeight = 250 const popUpWindowHeight = 250
const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX