as i understand it, a smart contract is stored on the chain and is executed on your computer whenever you make a transaction that triggers the contract, or something like that. so the whole thing happens on my or your computer and not somewhere else.
when i host a website and a user access that website, then it causes the host server to compute whatever the user asks for.
if i put my "website" on the chain as an app (a dapp?) then i guess it is downloaded to the users computer and executed there.
how can the blockchain help me access computing resources on third party services?
i suppose that devices could register themselves on the blockchain as having computing resources available, and an application can then access those resources.
Smart contracts execute on the blockchain, which means they execute on thousands or millions of computers in lockstep. Extra hardware doesn't add capability, it adds redundancy.
Since the blockchain is public there are things you can get out of it for free by looking at the public state, but actually performing a computation that has some sort of world-wide visible effect involves executing that code on every node at once, so it's amazingly costly.
a cursory search suggests that this is not the case and that smart contracts only run on a single node. the result of the smart contract that creates another blockchain entry causes the calculation of the new entry on every node that is mining.
internet computer should be using the blockchain to manage computing resources that themselves also don't run on the blockchain.
Blockchains are structured so that you don't need to trust, you can verify. You follow the longest valid chain, and by "valid" I mean that your node verifies every block and checks everything complies with the rules.
For running code, it's the same thing. You can trust that your code won't be subverted by some rogue node because everyone else is double-checking those computations, and if a node breaks the rules its work will be rejected.
> internet computer should be using the blockchain to manage computing resources that themselves also don't run on the blockchain.
Not sure what's this supposed to mean. In general though blockchains are only effective within themselves. Any interaction with the outside hits the oracle problem -- you're trusting some outside source not to lie, so the blockchain doesn't really add anything.
well, that is what i am trying to understand. for now i don't think that is right. it doesn't make sense to put everything directly on the chain. that would be to costly. not every computation needs to be trusted. i can still implement some checks to verify that computations are ok without the computation needing to run on the chain itself. but the chain can provide a mechanism to manage the resources (who gets to use how much and where, and who pays for it) which would be more difficult to do without a chain.
It's the same issue as with NFTs. Yes, you can store on the blockchain stuff like "User 0xabcdef owns the Godslayer of Hitpoints sword". And a game can look at the blockchain, and make use of that record.
But absolutely nothing whatsoever stops it from deciding to stop caring, or replacing your fancy sword with a rubber duck, or deciding that screw this particular user, they're banned regardless of what the chain says.
Also even to the extent this stuff works it's not nice to use. If the blockchain has you have some sort of resource (money, quota, etc), then if somebody ever gets their hands on your account they're now the rightful owner as far as the blockchain is concerned. So if per the chain you're owed say, 1 year worth of GPU time or something, that automatically becomes a self-paying bounty. Everyone can see it, and has an incentive to try and hack you.
how could data off the chain be replaced if it is signed? sure it can be lost, so that's a different issue. if the chain itself is trusted and it says that, say a movie that has this signature is owned by this studio then noone can replace the movie or even steal it because they need the chain to access it. if the studio doesn't keep a copy of their movie and they loose it that's their own fault. same with NFTs. i think the idea is stupid, but i don't see the risks you are suggesting.
to your last point, that's only an issue if you pay in advance, not if you pay after use. and stealing money on the blockchain is nothing new. that's of course a problem, but one that affects the whole ecosystem, so it will eventually have to be fixed. adding computing resources into the mix doesn't change anything.
i am not really interested in discussing why something should or should not be done. because i do not know enough about how it actually works before i can argue about that.
so i really first want to understand how it works so i can make up my own mind on whether it is a good idea or not.
> how could data off the chain be replaced if it is signed?
It's very simple. You ignore the chain. The chain isn't magic, if it has any authority it's only because something else decides to consult the chain and to care about what can be found there.
Any actual usefulness of the blockchain is limited to things that reside exclusively in the blockchain.
Anything external, like some service that determines ownership of movies (not sure what scheme you're envisioning exactly) can arbitrarily decide to stop caring about the chain at any time, or to even selectively stop caring about parts of it.
of course you can ignore the chain, but i already said that. if you have assets outside the chain you need to watch them yourself. but if the key to open that asset is on the chain, then even if you get a copy of the asset you can't do anything with it without using the chain. you can't replace it either because that would change the signature, and the owner can just reupload his original copy with the correct signature.
you can store encrypted data on the chain. if i sell you a movie, i can give you the encrypted movie and use your public key to store an encrypted message with the key to open the movie. that way i can use a smart contract on the chain to track if you opened the movie.
Yeah, signatures may change. But that only matters to the extent that people do. The chain has no effect.
if the signature is on the chain and the chain is used to verify your ownership claim, then how exactly does the chain have no effect?
What owner?
the owner of the digital asset. an NFT for example, let's ignore for a moment that NFTs are stupid. or a movie. the purpose that it serves is to track the ownership of an asset. sure, you can make a copy of it. but you don't own that copy. if i discover that you made a copy, i can charge you with theft (see piracy) because i'll use the chain as proof of ownership and i can prove that you don't own your copy.
i am not saying that we want this. i am not a fan of blockchains. but to my understanding this is how they can be used.
> you can store encrypted data on the chain. if i sell you a movie, i can give you the encrypted movie and use your public key to store an encrypted message with the key to open the movie. that way i can use a smart contract on the chain to track if you opened the movie.
That's not going to work. Any encrypted material in the blockchain is public. Any algorithm in it is also public. So I can just execute the code by hand, skipping any tracking code.
> if the signature is on the chain and the chain is used to verify your ownership claim, then how exactly does the chain have no effect?
This is all contingent on everyone caring about what the chain says. If I get hold of the movie and the key, the chain may say you own the movie, but I don't care. Now what?
> the purpose that it serves is to track the ownership of an asset. sure, you can make a copy of it. but you don't own that copy.
Movies are sold by the millions. Is the idea here making a million different watermarked copies of any given movie? If so, the watermark is the important bit, so what do you want the blockchain for? Just point to the court that John Smith has a movie that was tagged as having been sold to Joe Bloggs, and thus isn't his.
> if i discover that you made a copy, i can charge you with theft (see piracy) because i'll use the chain as proof of ownership and i can prove that you don't own your copy.
1. I bet it's going to be fun to explain all the details of the blockchain to the court and to convince them that this is indeed a tight proof of ownership.
2. If the blockchain is the ultimate arbiter of who owns what, then as soon as I manage to hack you, I can steal all your stuff, become its rightful owner in the view of both the blockchain and the law, and then sue you.
i don't want the blockchain for anything. i want to understand what it is capable of. i don't need arguments that explain that i can do the same without the blockchain. i already know that. i am trying to learn what the blockchain can do, regardless if it is useful or not. your answers are not helping.
Any encrypted material in the blockchain is public. Any algorithm in it is also public. So I can just execute the code by hand, skipping any tracking code.
i do not believe this is true. otherwise smart contracts would not work. if i store something on the chain, and accessing it triggers a smart contract, then you should not be able to bypass the contract. i don't know how that works, but if it didn't work then smart contracts would not be enforceable. if that is the case i'd really like to see evidence of that.
Is the idea here making a million different watermarked copies of any given movie?
a watermark only tracks ownership, but it doesn't call home to count how many times the movie has been watched.
it's not something i want. but it is something the blockchain would enable. and again, i am not interested in learning how to solve that problem without the blockchain, but i want to learn how the blockchain would solve this problem, regarless of better alternatives.
If the blockchain is the ultimate arbiter of who owns what, then as soon as I manage to hack you
you would not just have to hack me, but you would have to initiate an ownership transfer on the chain. and these things already happen, millions of coins have been stolen by some mechanism that allowed the transfer of ownership on the chain. and the transfer could not be undone, at least not without resetting the chain. so clearly this is a weakness of the whole blockchain concept. and something the developers will need to address. the question here is, can it be addressed or is the whole concept so flawed that this can't be fixed?
> i do not believe this is true. otherwise smart contracts would not work.
Smart contracts work because they keep everything on the chain. You're proposing a weird hybrid model, like "let's tie the legitimate possession of a real-life movie to the state of an item in World of Warcraft".
Things work if you're within WoW fully, or dealing with a physical DVD fully. Trying to combine both into a single system is where things get weird.
> if i store something on the chain, and accessing it triggers a smart contract, then you should not be able to bypass the contract.
This works so long everything you care about is on the chain. But your movie isn't.
> i don't know how that works, but if it didn't work then smart contracts would not be enforceable. if that is the case i'd really like to see evidence of that.
Try to think of a mechanism that would force me to have a WoW account, and to register my interactions within WoW every time I wanted to watch say, Guardians of the Galaxy.
> a watermark only tracks ownership, but it doesn't call home to count how many times the movie has been watched.
I think you're not getting that the blockchain and the movie exist separately. For the blockchain to refer to my particular copy of the movie, my copy has to be unique in some way. It has to have an unique SHA256. I'm saying that if my copy is already unique, it's already identifiable as mine, so the blockchain doesn't really add much to solving anything here.
Your legal issues are solvable by just "Look, here's a record that I sold this movie to Bob Smith and his copy has SHA256 ABCDEF0123...., and look, here it is on Pirate Bay"
> the question here is, can it be addressed or is the whole concept so flawed that this can't be fixed?
IMO, it's unfixable. The whole point of blockchains is the lack of a central authority. Your identity on one starts and ends in the possession of a public/private key pair. The second somebody gets their hands on that, as far as the chain is concerned, they're you. At that point they transfer your stuff to their account and you're screwed. There's nobody to appeal to, because the very point of the system is that nobody can override that mechanism.
if the blockchain can protect access to anything on the chain, should't it be enough to store the key to encrypted data on the chain, without the data itself?
sure, once you decrypt it, you can potentially copy it, but that's not a failure of the blockchain, because the same is true without it. the blockchain has other benefits here.
your movie becomes unique by encrypting it with with your public key. you can probably keep a watermark in the movie too, but that only makes it harder to share the decrypted movie, not impossible.
> if the blockchain can protect access to anything on the chain, should't it be enough to store the key to encrypted data on the chain, without the data itself?
No, I mean, think of an open source game. You have both the code and the data. Say it's a fighting game.
The game only has effective power if your interest lies entirely within the game. If what you want is to beat a friend in a match then you must act within the game's rules -- use the controller, use the provided moves, and win by applying your skill.
But if all you want to do is to watch the ending cinematic, then you can escape the game's rules. You can just read the source, find the right file, and decode the ending cinematic. You can skip the requirement to finish the game or to play in hard mode. You have the code and the data, so you can break the rules.
Blockchain stuff is like that. So long what you want is within the blockchain and nowhere else, the blockchain has power.
You can store encrypted data on the chain. But since the data is public and the code is public, you can always bypass the chain. You can just take the secret, feed it yourself into OpenSSL, apply the decryption key, and bypass whatever stats accounting/etc might be part of the smart contract.
> sure, once you decrypt it, you can potentially copy it, but that's not a failure of the blockchain, because the same is true without it. the blockchain has other benefits here.
It doesn't have any, it only has weaknesses. A standard webserver would be stronger, because a webserver can work with secrets you can't access. A blockchain is by definition open code, and works with open data. It can't keep any secrets from you, or to reach into any private storage.
Okay? I don't think you're actually reading those. See the conclusion:
"Private data in a smart contract is not private as such since we are dealing with public blockchains"
Yeah, "private" exists as a language construct, in the way it does in C++. No, it's not actually private from the world though, and so anything you put there is something I can get my hands on trivially.
when i host a website and a user access that website, then it causes the host server to compute whatever the user asks for.
if i put my "website" on the chain as an app (a dapp?) then i guess it is downloaded to the users computer and executed there.
how can the blockchain help me access computing resources on third party services?
i suppose that devices could register themselves on the blockchain as having computing resources available, and an application can then access those resources.
am i missing anything?