public contracts

hi, i couldn't find info on this. can contracts be hidden or everyone knows who made a contract with whom? also can you publicly verify if a contract has been executed or is this knowledge only known to the participating parties? also can you verify publicly the existence of a contract if you participate in it or can there be a contract that references you as a target without you knowing it for example?

Comments

  • chris613chris613 Member Posts: 93 ✭✭
    >can contracts be hidden or everyone knows who made a contract with whom?

    Everyone knows which address created a contract and which addresses subsequently transact with it. There are no secrets to do with contracts at all.

    >can you publicly verify if a contract has been executed or is this knowledge only known to the participating parties?

    Contracts are (currently) run by every node and the results are verified through the regular mechanisms of blockchain consensus. All verification is 100% public. There is not really a concept of "participating parties"; the parties are simply: the party that creates the contract, those that subsequently send it ether, and those that the contracts sends ether to.

    >can you verify publicly the existence of a contract if you participate in it or can there be a contract that references you as a target without you knowing it for example?

    The only thing a contract could actively do to you without your explicit participation is send you ether. This could happen by encoding your address into a payment operation in the initial contract (which would be public so you could see it ahead of time if you were watching), or it could respond to someone else's transaction which includes your address for a target of a payment operation. These can happen entirely without your consent or fore-knowledge. While not actively affecting you, it could also store your address in its memory, for example as part of a reputation system. I can't think of any other ways that a contract could "references you without you knowing.
  • arisgarisg Member Posts: 6
    ok last question, can everyone see the code of the contract?
  • mids106mids106 Member Posts: 188 ✭✭✭
    Yes, everybody can see the (compiled) Ethereum Script, which looks like this:
    PUSH 0 PUSH 3 MSTORE PUSH 1 PUSH 4 MSTORE PUSH 3 MLOAD PUSH 997 LT NOT PUSH 42 JMPI PUSH 4 MLOAD PUSH 3 MUL PUSH 997 MOD PUSH 4 MSTORE PUSH 3 MLOAD PUSH 1 ADD PUSH 3 MSTORE PUSH 10 JMP PUSH 4 MLOAD PUSH 0 PUSH 1 SUB SSTORE
    The source code (CLL) wouldn't be publically available, but could be decompiled from this:
    i = 0
    a = 1
    while i < 997:
    a = (a * 3) % 997
    i = i + 1
    contract.storage[-1] = a
  • comtechnetcomtechnet Member Posts: 57
    should we not have "name" contracts? a database of contracts / biz for customers/prospects to entertain? and a "pitch" about why they should consider the contract or a derivative - who can I work with on this? @vitalik?
Sign In or Register to comment.