Pages:
Author

Topic: cbitcoin - Bitcoin implementation in C. Currently in development. (Read 20319 times)

legendary
Activity: 1190
Merit: 1004
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
legendary
Activity: 1190
Merit: 1004
I'll announce quickly that cbitcoin 1.0 is now discontinued, so say hello to cbitcoin 2.0.

I'm developing a full validating node and an SPV node for cbitcoin 2.0, and cbitcoin 2.0 will have various enhancements over cbitcoin 1.0. This means cbitcoin 1.0 will never have another alpha release or reach beta. You can still obtain the alpha releases for cbitcoin 1.0 (and read the documentation) on http://cbitcoin.com.

I've updated the README with more information, including some more information for those that would like to contribute to the project. I've also placed all the source files into one directory, so that should help with the creation of a makefile.

Be warned that some files are not compilable at this moment.
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Thank you for that comment. I will likely use a dual license with the GPL.

Awesome.

Here is standard-issue gift centipede cat for you:



Thank you. When should I expect it in the post?

You don't expect centipede cat.
The centipede cat expects you.
legendary
Activity: 1190
Merit: 1004
I already offered to do this (would take about a day) but he wants to keep the existing directory layout which would be PITA for any automake set-up ... so probably have to stick to his python hack make until he can change that.

I'm glad to see someone will be able to do it at some point.  I confess I tried to read the autotools documentation but I found it quite tough to grasp so I kind of gave up.

If you can do it, it's great.  It's ok if you prefer to wait until he changes the directory structure.  There is no rush.

If it's not easily possible to make a makefile (no pun intended there) without using a flat directory structure, then please change it. I'm fine with that. Even though I like the tree structure, it can be sacrificed for more important things.

Thank you for that comment. I will likely use a dual license with the GPL.

Awesome.

Here is standard-issue gift centipede cat for you:



Thank you. When should I expect it in the post?
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Thank you for that comment. I will likely use a dual license with the GPL.

Awesome.

Here is standard-issue gift centipede cat for you:

legendary
Activity: 1288
Merit: 1080
I already offered to do this (would take about a day) but he wants to keep the existing directory layout which would be PITA for any automake set-up ... so probably have to stick to his python hack make until he can change that.

I'm glad to see someone will be able to do it at some point.  I confess I tried to read the autotools documentation but I found it quite tough to grasp so I kind of gave up.

If you can do it, it's great.  It's ok if you prefer to wait until he changes the directory structure.  There is no rush.
newbie
Activity: 41
Merit: 0
The reason I don't have a makefile is because it's not a trivial thing to compile and I'm not good with makefiles. A makefile would be nice be it's not something I want to produce right now. Anyone is highly welcome to create a makefile however. I do ask that the tree structure of the source and header files remains intact, so you'd need some sort of bash code to work through that (One thing that made me use python instead).

Still, it would be great if we could compile your library with a classic "./configure && make"

I'm not good enough a GNU programmer, but if someone here is, please help.

Meanwhile, I'll read the automake manual and I'll see what I can do.

Anyway your project really seem like an awesome step towards a GNU version of bitcoin (C language + GNU license).  Please keep up.

I already offered to do this (would take about a day) but he wants to keep the existing directory layout which would be PITA for any automake set-up ... so probably have to stick to his python hack make until he can change that.
legendary
Activity: 1120
Merit: 1164
Thank you for that comment. I will likely use a dual license with the GPL.

Sounds great!
legendary
Activity: 1190
Merit: 1004
Thank you for that comment. I will likely use a dual license with the GPL.
legendary
Activity: 1120
Merit: 1164
Smart lawyers spent years on the current licenses, including rounds of open review and comments across multiple jurisdictions in the world.

It is doubtful lone efforts will match that sufficiently to make a bulletproof license, compared to existing ones.

Well I plan to have a lawyer look over the license before I would use it. Many people use customer software licenses which might not have as much review as the popular licenses you talk about but at least have lawyers look at them.

That's nice and all, but now if I'm going to use your software, I need to get my lawyers to look over the license. On top of that, if I write some software using your library, and distribute it to others, they need to have their lawyers look over it. With the standard licenses all our lawyers have already done this saving a tonne of effort. These days younger lawyers with a copyright law specialty might have even studied the standard open-source licenses in school. If I were a developer considering whether to use your license or not, I'd take one look at it and reject it purely out of the uncertainty.

Even the standard licenses are often misunderstood:

What about linking to the library which is what I really mean to say. That's a different story isn't it?

LGPL:

Proprietary, closed source versions of the library are NOT permitted.
Proprietary, closed source applications using cbitcoin library are permitted.

GPL:

Proprietary, closed source versions of the library are NOT permitted.
Proprietary, closed source applications using cbitcoin library are NOT permitted.

In either case, LGPL or GPL, your cbitcoin code remains free software.  Nobody is permitted to modify and distribute cbitcoin without also providing source code.


jgarzik got the gist of the LGPL right, and probably already knows about the point I'm about to make, but something a lot of people don't realize is that when you distribute LGPL using proprietary software in addition to distributing any changes to the LGPL library you must also make it possible for your end users to link your binaries to their own changed version of that library. While this is rarely an issue with dynamic libraries, let alone libraries in interpreted languages, it does mean you have to take special steps to distribute a statically linked binary. From the LGPL itself:

Quote
Code:
d) Do one of the following:

    0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding
Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the
Application with a modified version of the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
    1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that
(a) uses at run time a copy of the Library already present on the user's computer system, and (b) will
operate properly with a modified version of the Library that is interface-compatible with the Linked Version.

FWIW I just started a new timestamping project, written in Python, and have licensed the client command line utility and core library under the LGPL (>=3). However the server daemon and library functions related to implementing that server are license under the FSF AGPL, (>=3) which requires source-code distribution not only to those you distribute the software too, but also those who you allow to access servers running that software over a network. Basically that means that there is an RPC command called "getsourceurl" and to comply with the license if you modify the source for the server you need to put that source code up somewhere publicly (github would be ideal) and in the config file set the sourcecode url to the new location. I'm also going to include some explanation in the LICENSE file making it clear that trivial changes are just that and don't trigger that requirement. Similarly that config files are not considered a part of the sourcecode.

My thinking is quite like RMS's stance on Bitcoin: I want the timestamping system itself to become widely used, even integrated into proprietary applications. However I'd like to see the timestamping servers remain absolutely open source, and indeed, the system itself is most secure and tamper-proof in an "open source" environment where everyone validates each others timestamps.

Of course, even though the AGPL is an official Free Software Foundation license it's still obscure enough that I may be making the same mistake you are.


If you still really really want to use something different from the standard FSF licenses at least consider dual licensing, or licensing + additional license exemptions. For instance if you licensed your library under the standard GPL-3, but then included an additional statement like:

Quote
As an additional permission, above and beyond the standard rights granted by the GPL3.0, you may also distribute a binary containing code from this library, provided that you allow such binary to be freely distributed.

This clause only adds additional permissions to the GPL3 license; if you do not require such permissions, you are free to ignore this clause and follow the terms in the standard GPL3 license.

This kind of thing has precedent already with the GPL linking exemption http://en.wikipedia.org/wiki/GPL_linking_exception used by some projects. Another example is in the modified GPL used by some ADA programs: http://en.wikipedia.org/wiki/GNAT_Modified_General_Public_License Finally the GPL font exemption: http://en.wikipedia.org/wiki/GPL_font_exception

At least with GPL+exemptions and GPL+other dual licensing a developer can look at the license file and immediately see that they can treat the project as GPL licensed and be "in the clear" by complying with the GPL. Lawyers don't need to be involved, and everyone already knows exactly what's required to comply.
legendary
Activity: 1190
Merit: 1004
Smart lawyers spent years on the current licenses, including rounds of open review and comments across multiple jurisdictions in the world.

It is doubtful lone efforts will match that sufficiently to make a bulletproof license, compared to existing ones.

Well I plan to have a lawyer look over the license before I would use it. Many people use customer software licenses which might not have as much review as the popular licenses you talk about but at least have lawyers look at them.

And the license will be a modified GPL license, only changing necessary parts to satisfy my requirements. If you look at what I've done so far I've just removed a lot of the GPL restrictions and added an additional part to the "Additional Terms" section in attempt to create compatibility with the Apache License 1.0 which is needed for OpenSSL.
legendary
Activity: 1072
Merit: 1189
Well what's the point of emailing RMS? His answer is always GPL...

No, it isn't.  He has a fully nuanced answer.  I will attempt to condense and summarize, but he explains it better, so it is worth the time to read it.

By the way, at the London conference, we had a discussion with RMS about Bitcoin and the license of its implementation. Afterwards in his talk, he acknowledged that a weaker license than GPL may be appropriate for things like Bitcoin, to increase the ability of adopting the system.
legendary
Activity: 1596
Merit: 1100
It is generally inadvisable to come up with licenses on your own.

Smart lawyers spent years on the current licenses, including rounds of open review and comments across multiple jurisdictions in the world.

It is doubtful lone efforts will match that sufficiently to make a bulletproof license, compared to existing ones.

Typically the choice is GPL (and variants like LGPL) or BSD (and variants like MIT/X11).  Those licenses are much more likely to have established court and legal precedent.

full member
Activity: 121
Merit: 102
But, if you have a library that does something that no one else does, it would be better (for the free software community) if the library was full GPL.  This way, developers that don't particularly support the free software ideals will have to decide if keeping their software non-free is worth the effort of duplicating the GPL library.  Some developers will choose to make their software free to avoid duplicating that effort, which increases the freedom in the world.

He has a point if the market is such that a commercial entity would invest in that closed source alternative.  Bitcoin however is looking to encourage uptake, not discourage it.  By putting that financial and technical hurdle in front of business, you are killing innovation before it starts.
legendary
Activity: 1190
Merit: 1004
Here's a draft copy of a largely modified GPLv3 license which is closer to what I want.

Code:
DRAFT LICENSE

1. Definitions

"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

"The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

A "covered work" means either the unmodified Program or a work based
on the Program.

To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

2. Permissions

All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.

You may convey verbatim copies of any part of the Program's source code
 as it is. These copies must remain licensed under this license.

You may convey a work based on the Program, or the modifications to
produce it from the Program, providing the work is licensed under the
entire terms of this license and any applicable additional terms allowed
in section 3.

3. Additional Terms

Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  g) Requiring copyright attributions or legal notices in advertising
    material.

You may not add any further license terms to the material. Additional
terms can only apply to the material you add to the covered work and
cannot be applied to this Program.

Additional obligations may be placed upon you under an aggreement with any
party. You may supplement additional terms to this license with an
agreement between you and another party providing these terms comply with
section 7.

4. Termination.

You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 8).

However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 6.

5. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

6. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License and any applicable
additional terms allowed in section 3.  You are not
responsible for enforcing compliance by third parties with this License.

An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph.

You may not initiate litigation (including a cross-claim or counterclaim
in a lawsuit) alleging that any patent claim is infringed by making,
using, selling, offering for sale, or importing the Program or any portion
of it.

7. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from your obigations under this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

8. Patents

A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

In the following two paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

9. Disclaimer of Warranty

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

10. Limitation of Liability

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

11. Interpretation of Sections 9 and 10.

If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
kjj
legendary
Activity: 1302
Merit: 1026

After some thought, and a few mail exchanges with RMS, my opinion is that it would be nice if Mathew could stick to GPL (yes, GPL, not LGPL).    People would indeed not be able to link to cbitcoin without releasing their source code.  So be it.

Well what's the point of emailing RMS? His answer is always GPL...

No, it isn't.  He has a fully nuanced answer.  I will attempt to condense and summarize, but he explains it better, so it is worth the time to read it.

Basically, if you have a library that does something that everyone already does, using LGPL is the right way to go, as it allows people to use free libraries with their non-free software.  If they don't use the LGPL library, they will just use some other library that is worse (for the free software community).  It is better for the world to have free alternatives for common things, than not to.

But, if you have a library that does something that no one else does, it would be better (for the free software community) if the library was full GPL.  This way, developers that don't particularly support the free software ideals will have to decide if keeping their software non-free is worth the effort of duplicating the GPL library.  Some developers will choose to make their software free to avoid duplicating that effort, which increases the freedom in the world.
legendary
Activity: 1190
Merit: 1004
Yes, you would expect GPL to be the only answer. I did email him my idea. I expect to have criticism on it.  Smiley

I have a good amount of experience in open source licensing so if you need to bounce ideas off of someone I can help, though to be honest, I'm philosophically quite a bit apart from you.  All of my recent open source work has been published under MIT allowing anyone to do pretty much whatever they please with it.  I don't care if people make money off of my work.  I can always charge them for support on the backend or make money off my reputation in the community.  It's been very successful for me so far. 

I don't care if people make money using cbitcoin. That would be great. You clearly do not understand. I do not want proprietary software being made using cbitcoin. By that I mean software with use, copy and/or modification restrictions.
legendary
Activity: 1064
Merit: 1001

After some thought, and a few mail exchanges with RMS, my opinion is that it would be nice if Mathew could stick to GPL (yes, GPL, not LGPL).    People would indeed not be able to link to cbitcoin without releasing their source code.  So be it.

Well what's the point of emailing RMS? His answer is always GPL...
legendary
Activity: 1288
Merit: 1080

After some thought, and a few mail exchanges with RMS, my opinion is that it would be nice if Mathew could stick to GPL (yes, GPL, not LGPL).    People would indeed not be able to link to cbitcoin without releasing their source code.  So be it.
Pages:
Jump to: