What happens if you put up a smart contract involving GPL- or AGPL-licensed code? When must you serve up source code, according to those licenses? Is the answer different for GPLv2 and GPLv3?


  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    You just have to serve up the source code somewhere. Dunno if the 'binary' has to refer to the source code. I suppose you could but wastes a lot. Maybe there could be a little service that links every contract to its source code insofar known.(could even be a DAO, without listing everything on-blockchain)
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    @Jasper does just that - linking binary signatures to contract code.
  • robmyersrobmyers Member Posts: 65 ✭✭✭

    With the AGPL the contract (or its UI) has to return a link to the source code to anyone who uses it.

    With the GPL you just have to be able to get the source if you receive the code. Which I guess is when you download the blockchain.

    The blockchain is a collective work IMO, so merely adding (A)GPL work to it doesn't require everything on the blockchain to be (A)GPL. Although it's not clear what permission you have or need to run *any* code on the blockchain anyway...

    Now about what happens when you call one contract from another under the GPL...
  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    What if it is GPL, but then non-GPL compliant call the GPL contract?

    If you upload something to the blockchain you know it is going to run if someone sends messages to it. Maybe it is a bit like driving your car onto someone elses land, and then demanding stuff about the road.(better analogies?)
  • eaglgenes101eaglgenes101 Member Posts: 43
    That above case seems analagous to dynamically linking to a GPL library. The debate is still roiling about that.
  • robmyersrobmyers Member Posts: 65 ✭✭✭
    > If you upload something to the blockchain you know it is going to run if someone sends messages to it.

    Remember how long it took to establish that viewing a web page was legal. If you upload your code to the blockchain, you are within your rights to do that. Now, by what right do I download and execute that code?

    Dynamically linking to a GPL library creates a work covered by the GPL:

    But calling a GPL program via an environment such as the shell doesn't necessarily:

    I think whether contract A messages contract B for information or uses it to implement some of its functionality might be a useful distinction.
Sign In or Register to comment.