New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add assurances that a node can't modify the payload in a CREATE transaction #327
Comments
Issue #347 is in the same vein as this one. I wouldn't say that one is a duplicate of the other, but whoever tackles one should look at both. |
@ttmc Removing Since a If correct, please close this ticket. |
ProposalThis should address both this issue and #347 In the initial design of BigchainDB it was decided that only federation nodes could issue assets on behalf of the users. This seemed like a good idea at the time but we never added any additional logic or found a use case where this was helpful. Moreover we introduced transaction malleability and other problems #347 . With the introduction of bigchaindb common one of the solutions was to have the clients themselves issue the assets. This way a client creates and signs a The problem now is that when creating an asset the client does not have any condition to fulfill however it still needs to provide a signature in the form of a fulfillment. Since
Note that these are the same rules for default conditions that we already use for transfer transactions with single and multiple owners. To be discussed:
|
What does it mean to have an |
The Before when only the federation nodes could create assets |
Ahh... I see (@ttmc I think you were telling me this last week too). Do we want to support cases where you can immediately register an asset for someone else? This runs into #347 with nodes being able to "steal" assets getting created (albeit now they'll be legitimate ones). Would it be much worse if we just mandated that the |
This is a different problem from #347. In #347 the problem was that since the client didn't sign the transaction I could just ask a federation node to create an asset for any public key.
We could do this but then we would just be annoying since the only thing a client would need to do would be to create 2 transactions instead of one:
Instead he can just do:
|
The proposal by @r-marques would work technically, as far as I can tell. It retains the weirdness of having fulfillments in a CREATE transaction, which causes a lot of confusion. Question: Why are there fulfillments in a CREATE transaction? What conditions are they fulfilling? Answer: Implicit conditions... So we'll have to explain those implicit conditions. That is doable, but I sense we'll get the same question over and over again, until we're sick of it. I suggest something technically identical to @r-marques proposal, but easier to understand:
Why am I suggesting we add This is easy to generalize to multiple submitters: Fun fact: Long ago, before the days of conditions and fulfillments, the signature actually was outside the PragmaticsWe could start by implementing @r-marques proposal. Issue #339 would remain unresolved, as would the confusing fulfillments-in-create-transactions. Those two issues could be resolved by implementing what I described above. |
Honestly I don't think #339 is an issue. Regarding the rest I don't think that adding another transaction model, another name for a public key and another way to sign and verify signatures will reduce confusion, not to mention the added complexity to the code |
@r-marques I agree that my proposal would require more changes. Maybe we can revisit it, or something like it, in the future, if necessary (e.g. if we find that fulfillments-in-create-transactions is causing a lot confusion and human error). For now, your original proposal will work. 👍 |
It would be nice, when time allows, to revisit @ttmc's proposal. |
Resolved by pull request #794 (which did more than implement divisible assets). |
Right now, when a client sends a payload to a node to create a new asset, the node can change the payload and sign that to create the asset/transaction that actually gets stored.
Sophisticated clients can do things to make such shenanigans detectable by other clients (e.g. by including their public key and a signature in the payload itself, and by sending two transactions, with the first one having the hash of the second payload).
We could make it easier for clients to rest assured that a node can't corrupt their payload before the node creates the asset:
The initial node can't change the client's public key (in both places): the client-provided signature would change.
The initial node can't change the payload only: the client-provided signature would change.
The initial node could change the client's public key and payload, but then it's basically a totally different transaction! The client could see that their transaction never ended up in the bigchain, report a problem, and send their transaction to a different node.
To Consider Next: What about TRANSFER transactions? They can also have a payload (but might not).
The text was updated successfully, but these errors were encountered: