Git Product home page Git Product logo

Comments (6)

DavidVorick avatar DavidVorick commented on August 12, 2024

Further investigation makes it seem important that the hash of the transaction be included when determining output ids. Right now, different transactions could result in the same outputID, which means that someone spending an output could create signatures that are valid for transactions that they perhaps didn't mean to sign.

It means that you could reorganize the blockchain and change who sent someone coins, but the act of spending those coins is still valid. Example:

Chain 1: miner A has coins of OutputID a, sends them to Bob, resulting id is b. Sends them to Charlie, resulting id is c. Charlie signs something that spends the coins he received, sending them to Chuck.
Chain 2: miner A has coins of OutputID a, sends them to Bill, resulting id is still b. Bill sends them to Charlie, resulting id is c. Charlie's signature spending the coins is still valid, so Chuck can spend the coins without Charlie's consent, even though Charlie has potentially received the coins from a different person.

This attack is weirdness, and I feel like there are some subtle problems with leaving it possible.

from sia.

DavidVorick avatar DavidVorick commented on August 12, 2024

So, I've implemented it such that the output id includes the hash of the transaction that announced it. That's all fancy for transactions, but I've left a quirk in the contracts, which I'm probably also going to change, but not entirely sold that it's a necessary change.

A contract output has the same ID regardless of where the money is sent. So the output id for window_i is going to be the same, regardless of whether the address in the output is the host's address or the client's address. This should also be changed.

from sia.

DavidVorick avatar DavidVorick commented on August 12, 2024

fxd

from sia.

lukechampine avatar lukechampine commented on August 12, 2024

should probably reference the commit that fixed it. Or mention "fixes 32" in the commit message. I frequently forget to do that though.

from sia.

DavidVorick avatar DavidVorick commented on August 12, 2024

hmm. It's really implemented in the whole pull request. #40

from sia.

lukechampine avatar lukechampine commented on August 12, 2024

In that case I should mention it in the merge commit. Whatevs

from sia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.