Doichain / dapp

Doichan dApp - a Meteor.js implementation of the "Doichain Atomic Double-Opt-In" Protocol
https://www.doichain.org
MIT License
6 stars 6 forks source link

"name_new value too long" - when adding new SOI #17

Closed silkroadnomad closed 4 years ago

silkroadnomad commented 6 years ago
  1. we changed our IP-address to a hostname with domain name in the production environment.
  2. result after /opt-in was "name to long" from https://github.com/Doichain/dapp/blob/master/imports/modules/server/namecoin/claim_and_transfer.js#L46

Question why we have to save the hostname in the blockchain with every transaction? Is there no simpler approach?

Also: "Soi-timestamp" was removed in order to fix the problem in the current test run. (value was short enough for now)

Possible Solution: saving the URL to the template host inside a special namespace e.g. t/template-for-project-a (or a hash for instead a clear name) instead of saving the whole url in the blockchain we could safe the "name" which leads to that template unencrypted. (we could leave the template data inside this new namespace encrypted instead)

silkroadnomad commented 4 years ago

Instead of encrypting a potentially too long URL into the blockchain we could just store an (encrypted) IPFS hash in the blockchain, this way it stays short.

Bob's logic (validator) who picks up the template from Alice must be changed too. Here we get the file from IPFS instead via REST.

Question stays how to make sure that nobody else can read the template "by chance"? In this case I'd suggest to encrypt the template too and Bob can decrypt it.

This practice can be problematic too when implementing multiple validators. Here we have the problem, that "some untrusted node" could archive and analyze templates and sell the information from DOI-request email contents.