Planetmint tarantool (#169)
* 31 restructue documentation (#138) * removed korean documentation Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * removed CN and KOR readme Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * changed to the press theme Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * first changes Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixe H3 vs H1 issues Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added missing png Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added missing file Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed warnings Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * moved documents Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * removed obsolete files Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * removed obsolete folder Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * removed obs. file Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added some final changes Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * removed obs. reference Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * moved chain migration to election types (#109) Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * Final zenroom (#147) * zenroom fixes Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * expl. defined the aiohttp package Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * increased version number and fixed a zenroom runtime bug Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added fialing zenroom tx signing test Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * extended test to pass zenrooom validation, but to fail planetmint validation. Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added manual tx crafting Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added zenroom fulfillment verification Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * the last mile before integration Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * zenroom unit tests are passing Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * simplified zenroom unit tests Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * removed obsolte lines from the zenroom tests Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed acceptance tests Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * adjusted zenroom integraiton tests Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed linting errors Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * simplified zenroom unit test Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * increased version number Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * using cryptoconditions without print message Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * increased cc usage to 0.9.9 readded daemon proceses Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * increased version to 0.9.6 Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed deployment issue for 0.9.6 Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * adjusted get_assets and from_db for tarantool Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * added comment Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * improve usability of zenroom (#159) * improve usability of zenroom * * increased version * fixed test cases * added changelog Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com> * migrated to AGPLv3 Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * 150 add cryptoconditions documentation (#166) * added smaller logos fixed reference issue Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed some erros and typos Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * added cryptoconditions reference to the subproject Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * docker all in one now install tarantool Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * added user to integration init.lua Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * updated integration test setup for tarantool Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * removed print statements Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * updated changelog Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed error messaging Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed exception verification Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> * fixed printing of testdata Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> Co-authored-by: Jürgen Eckel <eckelj@users.noreply.github.com> Co-authored-by: Lorenz Herzberger <64837895+LaurentDeMontBlanc@users.noreply.github.com> Co-authored-by: Alberto Lerda <30939098+albertolerda@users.noreply.github.com> Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>
22
CHANGELOG.md
@ -25,6 +25,28 @@ For reference, the possible headings are:
|
|||||||
* **Known Issues**
|
* **Known Issues**
|
||||||
* **Notes**
|
* **Notes**
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
### Feature Update
|
||||||
|
Tarantool integration
|
||||||
|
|
||||||
|
## [0.9.8] - 2022-06-27
|
||||||
|
|
||||||
|
### Feature Update
|
||||||
|
Changed license to AGPLv3
|
||||||
|
|
||||||
|
|
||||||
|
## [0.9.7] - 2022-06-17
|
||||||
|
|
||||||
|
### Feature Update
|
||||||
|
Deep Zenroom integration
|
||||||
|
|
||||||
|
## [0.9.6] - 2022-06-08
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
|
||||||
|
* removed Korean documentation
|
||||||
|
* removed Korean and Chinese README
|
||||||
|
|
||||||
## [2.2.2] - 2020-08-12
|
## [2.2.2] - 2020-08-12
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|||||||
@ -16,12 +16,11 @@ RUN apt-get update \
|
|||||||
&& pip install -e . \
|
&& pip install -e . \
|
||||||
&& apt-get autoremove
|
&& apt-get autoremove
|
||||||
|
|
||||||
# Install mongodb and monit
|
# Install tarantool and monit
|
||||||
RUN apt-get install -y dirmngr gnupg apt-transport-https software-properties-common ca-certificates curl
|
RUN apt-get install -y dirmngr gnupg apt-transport-https software-properties-common ca-certificates curl
|
||||||
RUN wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add -
|
|
||||||
RUN echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y mongodb-org monit
|
RUN curl -L https://tarantool.io/wrATeGF/release/2/installer.sh | bash
|
||||||
|
RUN apt-get install -y tarantool monit
|
||||||
|
|
||||||
# Install Tendermint
|
# Install Tendermint
|
||||||
RUN wget https://github.com/tendermint/tendermint/releases/download/v${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.tar.gz \
|
RUN wget https://github.com/tendermint/tendermint/releases/download/v${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.tar.gz \
|
||||||
@ -31,13 +30,10 @@ RUN wget https://github.com/tendermint/tendermint/releases/download/v${TM_VERSIO
|
|||||||
|
|
||||||
ENV TMHOME=/tendermint
|
ENV TMHOME=/tendermint
|
||||||
|
|
||||||
# Set permissions required for mongodb
|
|
||||||
RUN mkdir -p /data/db /data/configdb \
|
|
||||||
&& chown -R mongodb:mongodb /data/db /data/configdb
|
|
||||||
|
|
||||||
# Planetmint enviroment variables
|
# Planetmint enviroment variables
|
||||||
ENV PLANETMINT_DATABASE_PORT 27017
|
ENV PLANETMINT_DATABASE_PORT 3303
|
||||||
ENV PLANETMINT_DATABASE_BACKEND tarantool_db
|
ENV PLANETMINT_DATABASE_BACKEND tarantool_db
|
||||||
|
ENV PLANETMINT_DATABASE_HOST localhost
|
||||||
ENV PLANETMINT_SERVER_BIND 0.0.0.0:9984
|
ENV PLANETMINT_SERVER_BIND 0.0.0.0:9984
|
||||||
ENV PLANETMINT_WSSERVER_HOST 0.0.0.0
|
ENV PLANETMINT_WSSERVER_HOST 0.0.0.0
|
||||||
ENV PLANETMINT_WSSERVER_SCHEME ws
|
ENV PLANETMINT_WSSERVER_SCHEME ws
|
||||||
|
|||||||
796
LICENSE
@ -1,201 +1,661 @@
|
|||||||
Apache License
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
Version 2.0, January 2004
|
Version 3, 19 November 2007
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
1. Definitions.
|
Preamble
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
The licenses for most software and other practical works are designed
|
||||||
the copyright owner that is granting the License.
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users.
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
When we speak of free software, we are referring to freedom, not
|
||||||
other entities that control, are controlled by, or are under common
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
control with that entity. For the purposes of this definition,
|
have the freedom to distribute copies of free software (and charge for
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
them if you wish), that you receive source code or can get it if you
|
||||||
direction or management of such entity, whether by contract or
|
want it, that you can change the software or use pieces of it in new
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
free programs, and that you know you can do these things.
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
Developers that use our General Public Licenses protect your rights
|
||||||
exercising permissions granted by this License.
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
A secondary benefit of defending all users' freedom is that
|
||||||
including but not limited to software source code, documentation
|
improvements made in alternate versions of the program, if they
|
||||||
source, and configuration files.
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
The GNU Affero General Public License is designed specifically to
|
||||||
transformation or translation of a Source form, including but
|
ensure that, in such cases, the modified source code becomes available
|
||||||
not limited to compiled object code, generated documentation,
|
to the community. It requires the operator of a network server to
|
||||||
and conversions to other media types.
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
An older license, called the Affero General Public License and
|
||||||
Object form, made available under the License, as indicated by a
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
copyright notice that is included in or attached to the work
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
(an example is provided in the Appendix below).
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
|
this license.
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
The precise terms and conditions for copying, distribution and
|
||||||
form, that is based on (or derived from) the Work and for which the
|
modification follow.
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
TERMS AND CONDITIONS
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
0. Definitions.
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
works, such as semiconductor masks.
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
modifications, and in Source or Object form, provided that You
|
"recipients" may be individuals or organizations.
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
Derivative Works a copy of this License; and
|
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.
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
A "covered work" means either the unmodified Program or a work based
|
||||||
stating that You changed the files; and
|
on the Program.
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
To "propagate" a work means to do anything with it that, without
|
||||||
that You distribute, all copyright, patent, trademark, and
|
permission, would make you directly or secondarily liable for
|
||||||
attribution notices from the Source form of the Work,
|
infringement under applicable copyright law, except executing it on a
|
||||||
excluding those notices that do not pertain to any part of
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
the Derivative Works; and
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
To "convey" a work means any kind of propagation that enables other
|
||||||
distribution, then any Derivative Works that You distribute must
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
include a readable copy of the attribution notices contained
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
may provide additional or different license terms and conditions
|
to the extent that it includes a convenient and prominently visible
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
tells the user that there is no warranty for the work (except to the
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
extent that warranties are provided), that licensees may convey the
|
||||||
the conditions stated in this License.
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
1. Source Code.
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
The "source code" for a work means the preferred form of the work
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
for making modifications to it. "Object code" means any non-source
|
||||||
except as required for reasonable and customary use in describing the
|
form of a work.
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
A "Standard Interface" means an interface that either is an official
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
standard defined by a recognized standards body, or, in the case of
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
interfaces specified for a particular programming language, one that
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
is widely used among developers working in that language.
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
The "System Libraries" of an executable work include anything, other
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
unless required by applicable law (such as deliberate and grossly
|
packaging a Major Component, but which is not part of that Major
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
Component, and (b) serves only to enable use of the work with that
|
||||||
liable to You for damages, including any direct, indirect, special,
|
Major Component, or to implement a Standard Interface for which an
|
||||||
incidental, or consequential damages of any character arising as a
|
implementation is available to the public in source code form. A
|
||||||
result of this License or out of the use or inability to use the
|
"Major Component", in this context, means a major essential component
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
(kernel, window system, and so on) of the specific operating system
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
other commercial damages or losses), even if such Contributor
|
produce the work, or an object code interpreter used to run it.
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
The "Corresponding Source" for a work in object code form means all
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
the source code needed to generate, install, and (for an executable
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
work) run the object code and to modify the work, including scripts to
|
||||||
or other liability obligations and/or rights consistent with this
|
control those activities. However, it does not include the work's
|
||||||
License. However, in accepting such obligations, You may act only
|
System Libraries, or general-purpose tools or generally available free
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
programs which are used unmodified in performing those activities but
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
which are not part of the work. For example, Corresponding Source
|
||||||
defend, and hold each Contributor harmless for any liability
|
includes interface definition files associated with source files for
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
the work, and the source code for shared libraries and dynamically
|
||||||
of your accepting any such warranty or additional liability.
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic 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 covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. 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 11).
|
||||||
|
|
||||||
|
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 10.
|
||||||
|
|
||||||
|
9. 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.
|
||||||
|
|
||||||
|
10. 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. 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, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and 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.
|
||||||
|
|
||||||
|
11. 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 three 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 you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
12. 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 the conditions of 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.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. 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.
|
||||||
|
|
||||||
|
16. 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.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
If you develop a new program, and you want it to be of the greatest
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
possible use to the public, the best way to achieve this is to make it
|
||||||
replaced with your own identifying information. (Don't include
|
free software which everyone can redistribute and change under these terms.
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
you may not use this file except in compliance with the License.
|
Copyright (C) <year> <name of author>
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
This program is distributed in the hope that it will be useful,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
See the License for the specific language governing permissions and
|
GNU Affero General Public License for more details.
|
||||||
limitations under the License.
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|||||||
77
README_cn.md
@ -1,77 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
<!--- There is no shield to get the latest version
|
|
||||||
(including pre-release versions) from PyPI,
|
|
||||||
so show the latest GitHub release instead.
|
|
||||||
--->
|
|
||||||
|
|
||||||
[](https://codecov.io/github/planetmint/planetmint?branch=master)
|
|
||||||
[](https://github.com/planetmint/planetmint/releases)
|
|
||||||
[](https://pypi.org/project/Planetmint/)
|
|
||||||
[](https://travis-ci.com/planetmint/planetmint)
|
|
||||||
[](https://docs.planetmint.com/projects/server/en/latest/)
|
|
||||||
[](https://gitter.im/planetmint/planetmint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
||||||
|
|
||||||
# Planetmint 服务器
|
|
||||||
|
|
||||||
Planetmint 是区块链数据库. 这是 _BigchainDB 服务器_ 的仓库.
|
|
||||||
|
|
||||||
## 基础知识
|
|
||||||
|
|
||||||
* [尝试快速开始](https://docs.planetmint.com/projects/server/en/latest/quickstart.html)
|
|
||||||
* [阅读 Planetmint 2.0 白皮书](https://www.planetmint.com/whitepaper/)
|
|
||||||
* [查阅漫游指南](https://www.planetmint.com/developers/guide/)
|
|
||||||
|
|
||||||
## 运行和测试 `master` 分支的 Planetmint 服务器
|
|
||||||
|
|
||||||
运行和测试最新版本的 Planetmint 服务器非常简单. 确认你有安装最新版本的 [Docker Compose](https://docs.docker.com/compose/install/). 当你准备好了, 打开一个终端并运行:
|
|
||||||
|
|
||||||
```text
|
|
||||||
git clone https://github.com/planetmint/planetmint.git
|
|
||||||
cd planetmint
|
|
||||||
make run
|
|
||||||
```
|
|
||||||
|
|
||||||
Planetmint 应该可以通过 `http://localhost:9984/` 访问.
|
|
||||||
|
|
||||||
这里也有一些其他的命令你可以运行:
|
|
||||||
|
|
||||||
* `make start`: 通过源码和守护进程的方式运行 Planetmint (通过 `make stop` 停止).
|
|
||||||
* `make stop`: 停止运行 Planetmint.
|
|
||||||
* `make logs`: 附在日志上.
|
|
||||||
* `make test`: 运行所有单元和验收测试.
|
|
||||||
* `make test-unit-watch`: 运行所有测试并等待. 每次更改代码时都会再次运行测试.
|
|
||||||
* `make cov`: 检查代码覆盖率并在浏览器中打开结果.
|
|
||||||
* `make doc`: 生成 HTML 文档并在浏览器中打开它.
|
|
||||||
* `make clean`: 删除所有构建, 测试, 覆盖和 Python 生成物.
|
|
||||||
* `make reset`: 停止并移除所有容器. 警告: 您将丢失存储在 Planetmint 中的所有数据.
|
|
||||||
|
|
||||||
查看所有可用命令, 请运行 `make`.
|
|
||||||
|
|
||||||
## 一般人员链接
|
|
||||||
|
|
||||||
* [Planetmint.com](https://www.planetmint.com/) - Planetmint 主网站, 包括新闻订阅
|
|
||||||
* [路线图](https://github.com/planetmint/org/blob/master/ROADMAP.md)
|
|
||||||
* [博客](https://medium.com/the-planetmint-blog)
|
|
||||||
* [推特](https://twitter.com/Planetmint)
|
|
||||||
|
|
||||||
## 开发人员链接
|
|
||||||
|
|
||||||
* [所有的 Planetmint 文档](https://docs.planetmint.com/en/latest/)
|
|
||||||
* [Planetmint 服务器 文档](https://docs.planetmint.com/projects/server/en/latest/index.html)
|
|
||||||
* [CONTRIBUTING.md](.github/CONTRIBUTING.md) - how to contribute
|
|
||||||
* [社区指南](CODE_OF_CONDUCT.md)
|
|
||||||
* [公开问题](https://github.com/planetmint/planetmint/issues)
|
|
||||||
* [公开的 pull request](https://github.com/planetmint/planetmint/pulls)
|
|
||||||
* [Gitter 聊天室](https://gitter.im/planetmint/planetmint)
|
|
||||||
|
|
||||||
## 法律声明
|
|
||||||
|
|
||||||
* [许可](LICENSES.md) - 开源代码 & 开源内容
|
|
||||||
* [印记](https://www.planetmint.com/imprint/)
|
|
||||||
* [联系我们](https://www.planetmint.com/contact/)
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
[](https://codecov.io/github/planetmint/planetmint?branch=master)
|
|
||||||
[](https://github.com/planetmint/planetmint/releases)
|
|
||||||
[](https://pypi.org/project/Planetmint/)
|
|
||||||
[](https://travis-ci.org/planetmint/planetmint)
|
|
||||||
[](https://docs.planetmint.com/projects/server/en/latest/)
|
|
||||||
[](https://gitter.im/planetmint/planetmint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
||||||
|
|
||||||
# Planetmint 서버
|
|
||||||
|
|
||||||
BigchaingDB는 블록체인 데이터베이스입니다. 이 저장소는 _BigchaingDB 서버_를 위한 저장소입니다.
|
|
||||||
|
|
||||||
### 기본 사항
|
|
||||||
|
|
||||||
* [빠른 시작 사용해보기](https://docs.planetmint.com/projects/server/en/latest/quickstart.html)
|
|
||||||
* [Planetmint 2.0 백서 읽기](https://www.planetmint.com/whitepaper/)
|
|
||||||
* [BigchainDB에 대한 _Hitchiker's Guide_를 확인십시오.](https://www.planetmint.com/developers/guide/)
|
|
||||||
|
|
||||||
### `master` Branch에서 Planetmint 서버 실행 및 테스트
|
|
||||||
|
|
||||||
BigchaingDB 서버의 최신 버전을 실행하고 테스트하는 것은 어렵지 않습니다. [Docker Compose](https://docs.docker.com/compose/install/)의 최신 버전이 설치되어 있는지 확인하십시오. 준비가 되었다면, 터미널에서 다음을 실행하십시오.
|
|
||||||
|
|
||||||
```text
|
|
||||||
git clone https://github.com/planetmint/planetmint.git
|
|
||||||
cd planetmint
|
|
||||||
make run
|
|
||||||
```
|
|
||||||
|
|
||||||
이제 BigchainDB는 `http://localhost:9984/`에 연결되어야 합니다.
|
|
||||||
|
|
||||||
또한, 실행시키기 위한 다른 명령어들도 있습니다.
|
|
||||||
|
|
||||||
* `make start` : 소스로부터 BigchainDB를 실행하고 데몬화합니다. \(이는 `make stop` 을 하면 중지합니다.\)
|
|
||||||
* `make stop` : BigchainDB를 중지합니다.
|
|
||||||
* `make logs` : 로그에 첨부합니다.
|
|
||||||
* `make text` : 모든 유닛과 허가 테스트를 실행합니다.
|
|
||||||
* `make test-unit-watch` : 모든 테스트를 수행하고 기다립니다. 코드를 변경할 때마다 테스트는 다시 실행될 것입니다.
|
|
||||||
* `make cov` : 코드 커버리지를 확인하고 브라우저에서 결과를 엽니다.
|
|
||||||
* `make doc` : HTML 문서를 만들고, 브라우저에서 엽니다.
|
|
||||||
* `make clean` : 모든 빌드와 테스트, 커버리지 및 파이썬 아티팩트를 제거합니다.
|
|
||||||
* `make reset` : 모든 컨테이너들을 중지하고 제거합니다. 경고 : BigchainDB에 저장된 모든 데이터를 잃을 수 있습니다.
|
|
||||||
|
|
||||||
사용 가능한 모든 명령어를 보기 위해서는 `make` 를 실행하십시오.
|
|
||||||
|
|
||||||
### 모두를 위한 링크들
|
|
||||||
|
|
||||||
* [Planetmint.com ](https://www.planetmint.com/)- 뉴스 레터 가입을 포함하는 Planetmint 주요 웹 사이트
|
|
||||||
* [로드맵](https://github.com/planetmint/org/blob/master/ROADMAP.md)
|
|
||||||
* [블로그](https://medium.com/the-planetmint-blog)
|
|
||||||
* [트위터](https://twitter.com/Planetmint)
|
|
||||||
|
|
||||||
### 개발자들을 위한 링크들
|
|
||||||
|
|
||||||
* [모든 Planetmint 문서](https://docs.planetmint.com/en/latest/)
|
|
||||||
* [Planetmint 서버 문서](https://docs.planetmint.com/projects/server/en/latest/index.html)
|
|
||||||
* [CONTRIBUTING.md](https://github.com/planetmint/planetmint/blob/master/.github/CONTRIBUTING.md) - 기여를 하는 방법
|
|
||||||
* [커뮤니티 가이드라인](https://github.com/planetmint/planetmint/blob/master/CODE_OF_CONDUCT.md)
|
|
||||||
* [이슈 작성](https://github.com/planetmint/planetmint/issues)
|
|
||||||
* [pull request 하기](https://github.com/planetmint/planetmint/pulls)
|
|
||||||
* [Gitter 채팅방](https://gitter.im/planetmint/planetmint)
|
|
||||||
|
|
||||||
### 합법
|
|
||||||
|
|
||||||
* [라이선스](https://github.com/planetmint/planetmint/blob/master/LICENSES.md) - 오픈 소스 & 오픈 콘텐츠
|
|
||||||
* [발행](https://www.planetmint.com/imprint/)
|
|
||||||
* [연락처](https://www.planetmint.com/contact/)
|
|
||||||
@ -9,56 +9,10 @@ RUN apt-get install -y vim zsh build-essential cmake
|
|||||||
RUN mkdir -p /src
|
RUN mkdir -p /src
|
||||||
RUN /usr/local/bin/python -m pip install --upgrade pip
|
RUN /usr/local/bin/python -m pip install --upgrade pip
|
||||||
RUN pip install --upgrade meson ninja
|
RUN pip install --upgrade meson ninja
|
||||||
RUN pip install zenroom==2.0.0.dev1644927841
|
|
||||||
RUN pip install --upgrade \
|
RUN pip install --upgrade \
|
||||||
pycco \
|
pycco \
|
||||||
websocket-client~=0.47.0 \
|
websocket-client~=0.47.0 \
|
||||||
pytest~=3.0 \
|
pytest~=3.0 \
|
||||||
#git+https://github.com/planetmint/cryptoconditions.git@gitzenroom \
|
planetmint-cryptoconditions>=0.9.9\
|
||||||
#git+https://github.com/planetmint/planetmint-driver.git@gitzenroom \
|
planetmint-driver>=0.9.2 \
|
||||||
planetmint-cryptoconditions>=0.9.4\
|
|
||||||
planetmint-driver>=0.9.0 \
|
|
||||||
blns
|
blns
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#FROM python:3.9
|
|
||||||
#
|
|
||||||
#RUN apt-get update && apt-get install -y vim zsh
|
|
||||||
#RUN apt-get update \
|
|
||||||
# && apt-get install -y git zsh\
|
|
||||||
# && pip install -U pip \
|
|
||||||
# && apt-get autoremove \
|
|
||||||
# && apt-get clean
|
|
||||||
#RUN apt install sudo
|
|
||||||
#RUN apt-get install -y python3 openssl ca-certificates git python3-dev
|
|
||||||
#RUN apt-get install zsh gcc
|
|
||||||
#RUN apt-get install libffi-dev
|
|
||||||
#RUN apt-get install build-essential cmake -y
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#RUN mkdir -p /src
|
|
||||||
#RUN pip install --upgrade \
|
|
||||||
# pycco \
|
|
||||||
# websocket-client~=0.47.0 \
|
|
||||||
# pytest~=3.0 \
|
|
||||||
# planetmint-driver>=0.9.0 \
|
|
||||||
# blns \
|
|
||||||
# git+https://github.com/planetmint/cryptoconditions.git@gitzenroom >=0.9.0 \
|
|
||||||
# chardet==3.0.4 \
|
|
||||||
# aiohttp==3.7.4 \
|
|
||||||
# abci==0.8.3 \
|
|
||||||
# #planetmint-cryptoconditions>=0.9.0\
|
|
||||||
# flask-cors==3.0.10 \
|
|
||||||
# flask-restful==0.3.9 \
|
|
||||||
# flask==2.0.1 \
|
|
||||||
# gunicorn==20.1.0 \
|
|
||||||
# jsonschema==3.2.0 \
|
|
||||||
# logstats==0.3.0 \
|
|
||||||
# packaging>=20.9 \
|
|
||||||
# pymongo==3.11.4 \
|
|
||||||
# pyyaml==5.4.1 \
|
|
||||||
# requests==2.25.1 \
|
|
||||||
# setproctitle==1.2.2
|
|
||||||
#
|
|
||||||
|
|||||||
@ -5,37 +5,36 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
GENERATE_KEYPAIR = \
|
CONDITION_SCRIPT = """
|
||||||
"""Rule input encoding base58
|
Scenario 'ecdh': create the signature of an object
|
||||||
Rule output encoding base58
|
Given I have the 'keyring'
|
||||||
Scenario 'ecdh': Create the keypair
|
Given that I have a 'string dictionary' named 'houses' inside 'asset'
|
||||||
Given that I am known as 'Pippo'
|
When I create the signature of 'houses'
|
||||||
When I create the ecdh key
|
Then print the 'signature'"""
|
||||||
When I create the testnet key
|
|
||||||
Then print data"""
|
|
||||||
|
|
||||||
# secret key to public key
|
FULFILL_SCRIPT = """Scenario 'ecdh': Bob verifies the signature from Alice
|
||||||
SK_TO_PK = \
|
|
||||||
"""Rule input encoding base58
|
|
||||||
Rule output encoding base58
|
|
||||||
Scenario 'ecdh': Create the keypair
|
|
||||||
Given that I am known as '{}'
|
|
||||||
Given I have the 'keys'
|
|
||||||
When I create the ecdh public key
|
|
||||||
When I create the testnet address
|
|
||||||
Then print my 'ecdh public key'
|
|
||||||
Then print my 'testnet address'"""
|
|
||||||
|
|
||||||
FULFILL_SCRIPT = \
|
|
||||||
"""Rule input encoding base58
|
|
||||||
Rule output encoding base58
|
|
||||||
Scenario 'ecdh': Bob verifies the signature from Alice
|
|
||||||
Given I have a 'ecdh public key' from 'Alice'
|
Given I have a 'ecdh public key' from 'Alice'
|
||||||
Given that I have a 'string dictionary' named 'houses' inside 'asset'
|
Given that I have a 'string dictionary' named 'houses' inside 'asset'
|
||||||
Given I have a 'signature' named 'data.signature' inside 'result'
|
Given I have a 'signature' named 'signature' inside 'metadata'
|
||||||
When I verify the 'houses' has a signature in 'data.signature' by 'Alice'
|
When I verify the 'houses' has a signature in 'signature' by 'Alice'
|
||||||
Then print the string 'ok'"""
|
Then print the string 'ok'"""
|
||||||
|
|
||||||
|
SK_TO_PK = """Scenario 'ecdh': Create the keypair
|
||||||
|
Given that I am known as '{}'
|
||||||
|
Given I have the 'keyring'
|
||||||
|
When I create the ecdh public key
|
||||||
|
When I create the bitcoin address
|
||||||
|
Then print my 'ecdh public key'
|
||||||
|
Then print my 'bitcoin address'"""
|
||||||
|
|
||||||
|
GENERATE_KEYPAIR = """Scenario 'ecdh': Create the keypair
|
||||||
|
Given that I am known as 'Pippo'
|
||||||
|
When I create the ecdh key
|
||||||
|
When I create the bitcoin key
|
||||||
|
Then print data"""
|
||||||
|
|
||||||
|
ZENROOM_DATA = {"also": "more data"}
|
||||||
|
|
||||||
HOUSE_ASSETS = {
|
HOUSE_ASSETS = {
|
||||||
"data": {
|
"data": {
|
||||||
"houses": [
|
"houses": [
|
||||||
@ -46,44 +45,39 @@ HOUSE_ASSETS = {
|
|||||||
{
|
{
|
||||||
"name": "Draco",
|
"name": "Draco",
|
||||||
"team": "Slytherin",
|
"team": "Slytherin",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ZENROOM_DATA = {
|
metadata = {"units": 300, "type": "KG"}
|
||||||
'also': 'more data'
|
|
||||||
}
|
|
||||||
|
|
||||||
CONDITION_SCRIPT = """Rule input encoding base58
|
|
||||||
Rule output encoding base58
|
|
||||||
Scenario 'ecdh': create the signature of an object
|
|
||||||
Given I have the 'keys'
|
|
||||||
Given that I have a 'string dictionary' named 'houses' inside 'asset'
|
|
||||||
When I create the signature of 'houses'
|
|
||||||
When I rename the 'signature' to 'data.signature'
|
|
||||||
Then print the 'data.signature'"""
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def gen_key_zencode():
|
def gen_key_zencode():
|
||||||
return GENERATE_KEYPAIR
|
return GENERATE_KEYPAIR
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def secret_key_to_private_key_zencode():
|
def secret_key_to_private_key_zencode():
|
||||||
return SK_TO_PK
|
return SK_TO_PK
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def fulfill_script_zencode():
|
def fulfill_script_zencode():
|
||||||
return FULFILL_SCRIPT
|
return FULFILL_SCRIPT
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def condition_script_zencode():
|
def condition_script_zencode():
|
||||||
return CONDITION_SCRIPT
|
return CONDITION_SCRIPT
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def zenroom_house_assets():
|
def zenroom_house_assets():
|
||||||
return HOUSE_ASSETS
|
return HOUSE_ASSETS
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def zenroom_data():
|
def zenroom_data():
|
||||||
return ZENROOM_DATA
|
return ZENROOM_DATA
|
||||||
@ -1,68 +1,73 @@
|
|||||||
# GOAL:
|
import os
|
||||||
# In this script I tried to implement the ECDSA signature using zenroom
|
|
||||||
|
|
||||||
# However, the scripts are customizable and so with the same procedure
|
|
||||||
# we can implement more complex smart contracts
|
|
||||||
|
|
||||||
# PUBLIC IDENTITY
|
|
||||||
# The public identity of the users in this script (Bob and Alice)
|
|
||||||
# is the pair (ECDH public key, Testnet address)
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import base58
|
||||||
|
from hashlib import sha3_256
|
||||||
|
from cryptoconditions.types.ed25519 import Ed25519Sha256
|
||||||
|
from cryptoconditions.types.zenroom import ZenroomSha256
|
||||||
|
from zenroom import zencode_exec
|
||||||
|
from planetmint_driver import Planetmint
|
||||||
|
from planetmint_driver.crypto import generate_keypair
|
||||||
|
|
||||||
import hashlib
|
|
||||||
from cryptoconditions import ZenroomSha256
|
|
||||||
from json.decoder import JSONDecodeError
|
|
||||||
|
|
||||||
def test_zenroom(gen_key_zencode, secret_key_to_private_key_zencode, fulfill_script_zencode,
|
|
||||||
condition_script_zencode, zenroom_data, zenroom_house_assets):
|
|
||||||
alice = json.loads(ZenroomSha256.run_zenroom(gen_key_zencode).output)['keys']
|
|
||||||
bob = json.loads(ZenroomSha256.run_zenroom(gen_key_zencode).output)['keys']
|
|
||||||
|
|
||||||
zen_public_keys = json.loads(ZenroomSha256.run_zenroom(secret_key_to_private_key_zencode.format('Alice'),
|
|
||||||
keys={'keys': alice}).output)
|
|
||||||
zen_public_keys.update(json.loads(ZenroomSha256.run_zenroom(secret_key_to_private_key_zencode.format('Bob'),
|
|
||||||
keys={'keys': bob}).output))
|
|
||||||
|
|
||||||
# CRYPTO-CONDITIONS: instantiate an Ed25519 crypto-condition for buyer
|
|
||||||
zenSha = ZenroomSha256(script=fulfill_script_zencode, keys=zen_public_keys, data=zenroom_data)
|
def test_zenroom_signing(gen_key_zencode, secret_key_to_private_key_zencode,
|
||||||
|
fulfill_script_zencode, zenroom_data, zenroom_house_assets,
|
||||||
|
condition_script_zencode):
|
||||||
|
|
||||||
|
biolabs = generate_keypair()
|
||||||
|
version = '2.0'
|
||||||
|
|
||||||
|
alice = json.loads(zencode_exec(gen_key_zencode).output)['keyring']
|
||||||
|
bob = json.loads(zencode_exec(gen_key_zencode).output)['keyring']
|
||||||
|
|
||||||
|
zen_public_keys = json.loads(zencode_exec(secret_key_to_private_key_zencode.format('Alice'),
|
||||||
|
keys=json.dumps({'keyring': alice})).output)
|
||||||
|
zen_public_keys.update(json.loads(zencode_exec(secret_key_to_private_key_zencode.format('Bob'),
|
||||||
|
keys=json.dumps({'keyring': bob})).output))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
zenroomscpt = ZenroomSha256(script=fulfill_script_zencode, data=zenroom_data, keys=zen_public_keys)
|
||||||
|
print(F'zenroom is: {zenroomscpt.script}')
|
||||||
|
|
||||||
# CRYPTO-CONDITIONS: generate the condition uri
|
# CRYPTO-CONDITIONS: generate the condition uri
|
||||||
condition_uri = zenSha.condition.serialize_uri()
|
condition_uri_zen = zenroomscpt.condition.serialize_uri()
|
||||||
|
print(F'\nzenroom condition URI: {condition_uri_zen}')
|
||||||
|
|
||||||
# CRYPTO-CONDITIONS: construct an unsigned fulfillment dictionary
|
# CRYPTO-CONDITIONS: construct an unsigned fulfillment dictionary
|
||||||
unsigned_fulfillment_dict = {
|
unsigned_fulfillment_dict_zen = {
|
||||||
'type': zenSha.TYPE_NAME,
|
'type': zenroomscpt.TYPE_NAME,
|
||||||
'script': fulfill_script_zencode,
|
'public_key': base58.b58encode(biolabs.public_key).decode(),
|
||||||
'keys': zen_public_keys,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
'amount': '1000',
|
'amount': '10',
|
||||||
'condition': {
|
'condition': {
|
||||||
'details': unsigned_fulfillment_dict,
|
'details': unsigned_fulfillment_dict_zen,
|
||||||
'uri': condition_uri,
|
'uri': condition_uri_zen,
|
||||||
|
|
||||||
},
|
},
|
||||||
'data': zenroom_data,
|
'public_keys': [biolabs.public_key,],
|
||||||
'script': fulfill_script_zencode,
|
|
||||||
'conf': '',
|
|
||||||
'public_keys': (zen_public_keys['Alice']['ecdh_public_key'], ),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
input_ = {
|
input_ = {
|
||||||
'fulfillment': None,
|
'fulfillment': None,
|
||||||
'fulfills': None,
|
'fulfills': None,
|
||||||
'owners_before': (zen_public_keys['Alice']['ecdh_public_key'], ),
|
'owners_before': [biolabs.public_key,]
|
||||||
|
}
|
||||||
|
metadata = {
|
||||||
|
"result": {
|
||||||
|
"output": ["ok"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
token_creation_tx = {
|
token_creation_tx = {
|
||||||
'operation': 'CREATE',
|
'operation': 'CREATE',
|
||||||
'asset': zenroom_house_assets,
|
'asset': zenroom_house_assets,
|
||||||
'metadata': None,
|
'metadata': metadata,
|
||||||
'outputs': (output,),
|
'outputs': [output,],
|
||||||
'inputs': (input_,),
|
'inputs': [input_,],
|
||||||
'version': '2.0',
|
'version': version,
|
||||||
'id': None,
|
'id': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,12 +79,36 @@ condition_script_zencode, zenroom_data, zenroom_house_assets):
|
|||||||
ensure_ascii=False,
|
ensure_ascii=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
# major workflow:
|
||||||
assert(not zenSha.validate(message=message))
|
# we store the fulfill script in the transaction/message (zenroom-sha)
|
||||||
except JSONDecodeError:
|
# the condition script is used to fulfill the transaction and create the signature
|
||||||
pass
|
#
|
||||||
except ValueError:
|
# the server should ick the fulfill script and recreate the zenroom-sha and verify the signature
|
||||||
pass
|
|
||||||
|
|
||||||
message = zenSha.sign(message, condition_script_zencode, alice)
|
|
||||||
assert(zenSha.validate(message=message))
|
|
||||||
|
message = zenroomscpt.sign(message, condition_script_zencode, alice)
|
||||||
|
assert(zenroomscpt.validate(message=message))
|
||||||
|
|
||||||
|
message = json.loads(message)
|
||||||
|
fulfillment_uri_zen = zenroomscpt.serialize_uri()
|
||||||
|
|
||||||
|
message['inputs'][0]['fulfillment'] = fulfillment_uri_zen
|
||||||
|
tx = message
|
||||||
|
tx['id'] = None
|
||||||
|
json_str_tx = json.dumps(
|
||||||
|
tx,
|
||||||
|
sort_keys=True,
|
||||||
|
skipkeys=False,
|
||||||
|
separators=(',', ':')
|
||||||
|
)
|
||||||
|
# SHA3: hash the serialized id-less transaction to generate the id
|
||||||
|
shared_creation_txid = sha3_256(json_str_tx.encode()).hexdigest()
|
||||||
|
message['id'] = shared_creation_txid
|
||||||
|
|
||||||
|
|
||||||
|
# `https://example.com:9984`
|
||||||
|
plntmnt = Planetmint(os.environ.get('PLANETMINT_ENDPOINT'))
|
||||||
|
sent_transfer_tx = plntmnt.transactions.send_commit(message)
|
||||||
|
|
||||||
|
print( f"\n\nstatus and result : + {sent_transfer_tx}")
|
||||||
|
|||||||
3
docs/root/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"makefile.extensionOutputFolder": "./.vscode"
|
||||||
|
}
|
||||||
@ -190,7 +190,7 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
base_path = os.path.join(os.path.dirname(__file__),
|
base_path = os.path.join(os.path.dirname(__file__),
|
||||||
'source/installation/api/http-samples')
|
'source/connecting/http-samples')
|
||||||
if not os.path.exists(base_path):
|
if not os.path.exists(base_path):
|
||||||
os.makedirs(base_path)
|
os.makedirs(base_path)
|
||||||
|
|
||||||
|
|||||||
@ -37,3 +37,5 @@ urllib3==1.26.9
|
|||||||
wget==3.2
|
wget==3.2
|
||||||
zipp==3.8.0
|
zipp==3.8.0
|
||||||
nest-asyncio==1.5.5
|
nest-asyncio==1.5.5
|
||||||
|
sphinx-press-theme==0.8.0
|
||||||
|
sphinx-documatt-theme
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
BIN
docs/root/source/_static/PLANETMINT_COLOR_POS.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/root/source/_static/mongodb_cloud_manager_1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/root/source/_static/planet-mint-logo.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
13
docs/root/source/_static/planet-mint-logo.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 120 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g transform="matrix(0.20764,0,0,0.20764,14.4981,12.6907)">
|
||||||
|
<path d="M0,117.028C32.316,117.028 58.514,90.831 58.514,58.514C58.514,26.198 32.316,0 0,0C-32.316,0 -58.514,26.198 -58.514,58.514C-58.514,90.831 -32.316,117.028 0,117.028" style="fill:rgb(0,227,0);fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.20764,0,0,0.20764,20.2132,30.2549)">
|
||||||
|
<path d="M0,-55.048L-27.524,-27.524L-55.048,-55.048L-55.048,0L0,0L0,-55.048Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.20764,0,0,0.20764,117.634,29.1275)">
|
||||||
|
<path d="M0,-42.385C0,-45.539 -2.515,-47.568 -5.337,-47.568C-8.158,-47.568 -10.673,-45.539 -10.673,-42.385C-10.673,-39.215 -8.158,-37.173 -5.337,-37.173C-2.515,-37.173 0,-39.215 0,-42.385M-1.416,-42.385C-1.416,-40.007 -3.183,-38.283 -5.337,-38.283C-7.518,-38.283 -9.257,-40.007 -9.257,-42.385C-9.257,-44.748 -7.518,-46.458 -5.337,-46.458C-3.183,-46.458 -1.416,-44.748 -1.416,-42.385M-2.905,-39.479L-4.46,-42.024C-3.613,-42.094 -2.933,-42.51 -2.933,-43.58C-2.933,-44.845 -3.751,-45.303 -5.211,-45.303L-7.407,-45.303L-7.407,-39.479L-6.255,-39.479L-6.255,-41.967L-5.531,-41.967L-4.112,-39.479L-2.905,-39.479ZM-5.225,-42.87L-6.255,-42.87L-6.255,-44.401L-5.281,-44.401C-4.752,-44.401 -4.085,-44.29 -4.085,-43.677C-4.085,-42.968 -4.558,-42.87 -5.225,-42.87M-30.556,-36.925L-15.073,-36.925L-15.073,-46.475L-60.249,-46.475L-60.249,-11.82L-60.393,-11.82L-81.954,-46.475L-93.241,-46.475L-93.241,5.183L-82.605,5.183L-82.605,-29.401L-82.461,-29.401L-60.972,5.183L-49.613,5.183L-49.613,-36.925L-41.915,-36.925L-41.915,5.183L-30.556,5.183L-30.556,-36.925ZM-108.073,5.183L-96.714,5.183L-96.714,-46.475L-108.073,-46.475L-108.073,5.183ZM-122.181,5.183L-111.545,5.183L-111.545,-46.475L-127.535,-46.475L-138.967,-10.952L-139.111,-10.952L-151.194,-46.475L-167.183,-46.475L-167.183,5.183L-156.548,5.183L-156.548,-31.065L-156.403,-31.065L-143.742,5.183L-134.987,5.183L-122.326,-31.427L-122.181,-31.427L-122.181,5.183ZM-186.684,-36.925L-171.201,-36.925L-171.201,-46.475L-244.984,-46.475L-244.984,5.183L-205.77,5.183L-205.77,-4.368L-233.625,-4.368L-233.625,-17.029L-208.592,-17.029L-208.592,-25.856L-233.625,-25.856L-233.625,-36.925L-198.043,-36.925L-198.043,5.183L-186.684,5.183L-186.684,-36.925ZM-259.816,5.183L-248.457,5.183L-248.457,-46.475L-259.093,-46.475L-259.093,-11.82L-259.237,-11.82L-280.798,-46.475L-292.084,-46.475L-292.084,5.183L-281.449,5.183L-281.449,-29.401L-281.304,-29.401L-259.816,5.183ZM-305.52,5.183L-293.727,5.183L-313.044,-46.475L-324.693,-46.475L-340.675,-4.368L-356.154,-4.368L-356.154,-46.475L-367.513,-46.475L-367.513,5.183L-332.796,5.183L-328.744,-6.321L-309.427,-6.321L-305.52,5.183ZM-312.393,-14.786L-325.778,-14.786L-319.049,-33.742L-318.905,-33.742L-312.393,-14.786ZM-370.414,-29.907C-370.414,-38.3 -375.334,-46.475 -388.285,-46.475L-411.582,-46.475L-411.582,5.183L-400.223,5.183L-400.223,-13.339L-388.285,-13.339C-375.334,-13.339 -370.414,-21.514 -370.414,-29.907M-381.411,-29.907C-381.411,-23.323 -386.187,-22.165 -391.396,-22.165L-400.223,-22.165L-400.223,-37.649L-391.396,-37.649C-386.187,-37.649 -381.411,-36.491 -381.411,-29.907" style="fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.5 KiB |
BIN
docs/root/source/_static/planetmint-logo.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
13
docs/root/source/_static/planetmint-logo.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 120 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g transform="matrix(0.20764,0,0,0.20764,14.4981,12.6907)">
|
||||||
|
<path d="M0,117.028C32.316,117.028 58.514,90.831 58.514,58.514C58.514,26.198 32.316,0 0,0C-32.316,0 -58.514,26.198 -58.514,58.514C-58.514,90.831 -32.316,117.028 0,117.028" style="fill:rgb(0,227,0);fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.20764,0,0,0.20764,20.2132,30.2549)">
|
||||||
|
<path d="M0,-55.048L-27.524,-27.524L-55.048,-55.048L-55.048,0L0,0L0,-55.048Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.20764,0,0,0.20764,117.634,29.1275)">
|
||||||
|
<path d="M0,-42.385C0,-45.539 -2.515,-47.568 -5.337,-47.568C-8.158,-47.568 -10.673,-45.539 -10.673,-42.385C-10.673,-39.215 -8.158,-37.173 -5.337,-37.173C-2.515,-37.173 0,-39.215 0,-42.385M-1.416,-42.385C-1.416,-40.007 -3.183,-38.283 -5.337,-38.283C-7.518,-38.283 -9.257,-40.007 -9.257,-42.385C-9.257,-44.748 -7.518,-46.458 -5.337,-46.458C-3.183,-46.458 -1.416,-44.748 -1.416,-42.385M-2.905,-39.479L-4.46,-42.024C-3.613,-42.094 -2.933,-42.51 -2.933,-43.58C-2.933,-44.845 -3.751,-45.303 -5.211,-45.303L-7.407,-45.303L-7.407,-39.479L-6.255,-39.479L-6.255,-41.967L-5.531,-41.967L-4.112,-39.479L-2.905,-39.479ZM-5.225,-42.87L-6.255,-42.87L-6.255,-44.401L-5.281,-44.401C-4.752,-44.401 -4.085,-44.29 -4.085,-43.677C-4.085,-42.968 -4.558,-42.87 -5.225,-42.87M-30.556,-36.925L-15.073,-36.925L-15.073,-46.475L-60.249,-46.475L-60.249,-11.82L-60.393,-11.82L-81.954,-46.475L-93.241,-46.475L-93.241,5.183L-82.605,5.183L-82.605,-29.401L-82.461,-29.401L-60.972,5.183L-49.613,5.183L-49.613,-36.925L-41.915,-36.925L-41.915,5.183L-30.556,5.183L-30.556,-36.925ZM-108.073,5.183L-96.714,5.183L-96.714,-46.475L-108.073,-46.475L-108.073,5.183ZM-122.181,5.183L-111.545,5.183L-111.545,-46.475L-127.535,-46.475L-138.967,-10.952L-139.111,-10.952L-151.194,-46.475L-167.183,-46.475L-167.183,5.183L-156.548,5.183L-156.548,-31.065L-156.403,-31.065L-143.742,5.183L-134.987,5.183L-122.326,-31.427L-122.181,-31.427L-122.181,5.183ZM-186.684,-36.925L-171.201,-36.925L-171.201,-46.475L-244.984,-46.475L-244.984,5.183L-205.77,5.183L-205.77,-4.368L-233.625,-4.368L-233.625,-17.029L-208.592,-17.029L-208.592,-25.856L-233.625,-25.856L-233.625,-36.925L-198.043,-36.925L-198.043,5.183L-186.684,5.183L-186.684,-36.925ZM-259.816,5.183L-248.457,5.183L-248.457,-46.475L-259.093,-46.475L-259.093,-11.82L-259.237,-11.82L-280.798,-46.475L-292.084,-46.475L-292.084,5.183L-281.449,5.183L-281.449,-29.401L-281.304,-29.401L-259.816,5.183ZM-305.52,5.183L-293.727,5.183L-313.044,-46.475L-324.693,-46.475L-340.675,-4.368L-356.154,-4.368L-356.154,-46.475L-367.513,-46.475L-367.513,5.183L-332.796,5.183L-328.744,-6.321L-309.427,-6.321L-305.52,5.183ZM-312.393,-14.786L-325.778,-14.786L-319.049,-33.742L-318.905,-33.742L-312.393,-14.786ZM-370.414,-29.907C-370.414,-38.3 -375.334,-46.475 -388.285,-46.475L-411.582,-46.475L-411.582,5.183L-400.223,5.183L-400.223,-13.339L-388.285,-13.339C-375.334,-13.339 -370.414,-21.514 -370.414,-29.907M-381.411,-29.907C-381.411,-23.323 -386.187,-22.165 -391.396,-22.165L-400.223,-22.165L-400.223,-37.649L-391.396,-37.649C-386.187,-37.649 -381.411,-36.491 -381.411,-29.907" style="fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.5 KiB |
BIN
docs/root/source/_static/planetmint350x150.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
docs/root/source/_static/planetmint360x150white.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
@ -49,7 +49,7 @@ Port 443 is the default HTTPS port (TCP). Package managers might also get some p
|
|||||||
|
|
||||||
Port 9984 is the default port for the Planetmint client-server HTTP API (TCP), which is served by Gunicorn HTTP Server. It's _possible_ allow port 9984 to accept inbound traffic from anyone, but we recommend against doing that. Instead, set up a reverse proxy server (e.g. using Nginx) and only allow traffic from there. Information about how to do that can be found [in the Gunicorn documentation](http://docs.gunicorn.org/en/stable/deploy.html). (They call it a proxy.)
|
Port 9984 is the default port for the Planetmint client-server HTTP API (TCP), which is served by Gunicorn HTTP Server. It's _possible_ allow port 9984 to accept inbound traffic from anyone, but we recommend against doing that. Instead, set up a reverse proxy server (e.g. using Nginx) and only allow traffic from there. Information about how to do that can be found [in the Gunicorn documentation](http://docs.gunicorn.org/en/stable/deploy.html). (They call it a proxy.)
|
||||||
|
|
||||||
If Gunicorn and the reverse proxy are running on the same server, then you'll have to tell Gunicorn to listen on some port other than 9984 (so that the reverse proxy can listen on port 9984). You can do that by setting `server.bind` to 'localhost:PORT' in the [Planetmint Configuration Settings](../../installation/node-setup/configuration), where PORT is whatever port you chose (e.g. 9983).
|
If Gunicorn and the reverse proxy are running on the same server, then you'll have to tell Gunicorn to listen on some port other than 9984 (so that the reverse proxy can listen on port 9984). You can do that by setting `server.bind` to 'localhost:PORT' in the [Planetmint Configuration Settings](../node-setup/configuration), where PORT is whatever port you chose (e.g. 9983).
|
||||||
|
|
||||||
You may want to have Gunicorn and the reverse proxy running on different servers, so that both can listen on port 9984. That would also help isolate the effects of a denial-of-service attack.
|
You may want to have Gunicorn and the reverse proxy running on different servers, so that both can listen on port 9984. That would also help isolate the effects of a denial-of-service attack.
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ Planetmint Server writes its logs to two files: normal logs and error logs. The
|
|||||||
|
|
||||||
Log rotation is baked into Planetmint Server using Python's `logging` module. The logs for Planetmint Server are rotated when any of the above mentioned files exceeds 209715200 bytes (i.e. approximately 209 MB).
|
Log rotation is baked into Planetmint Server using Python's `logging` module. The logs for Planetmint Server are rotated when any of the above mentioned files exceeds 209715200 bytes (i.e. approximately 209 MB).
|
||||||
|
|
||||||
For more information, see the docs about [the Planetmint Server configuration settings related to logging](../../installation/node-setup/configuration#log).
|
For more information, see the docs about [the Planetmint Server configuration settings related to logging](../node-setup/configuration#log).
|
||||||
|
|
||||||
## Tendermint Logging and Log Rotation
|
## Tendermint Logging and Log Rotation
|
||||||
|
|
||||||
@ -119,13 +119,19 @@ of the outgoing paperclips (100).
|
|||||||
### Transaction Validity
|
### Transaction Validity
|
||||||
|
|
||||||
When a node is asked to check if a transaction is valid, it checks several
|
When a node is asked to check if a transaction is valid, it checks several
|
||||||
things. We documented those things in a post on *The Planetmint Blog*:
|
things. This got documentet by a BigchainDB post (previous version of Planetmint) at*The BigchainDB Blog*:
|
||||||
["What is a Valid Transaction in Planetmint?"](https://blog.planetmint.io/what-is-a-valid-transaction-in-planetmint-9a1a075a9598)
|
["What is a Valid Transaction in BigchainDB?"](https://blog.bigchaindb.com/what-is-a-valid-transaction-in-planetmint-9a1a075a9598)
|
||||||
(Note: That post was about Planetmint Server v1.0.0.)
|
(Note: That post was about Planetmint Server v1.0.0.)
|
||||||
|
|
||||||
### Example Transactions
|
### Example Transactions
|
||||||
|
|
||||||
There are example Planetmint transactions in
|
There are example Planetmint transactions in
|
||||||
[the HTTP API documentation](./installation/api/http-client-server-api)
|
[the HTTP API documentation](./connecting/http-client-server-api)
|
||||||
and
|
and
|
||||||
[the Python Driver documentation](./drivers/index).
|
[the Python Driver documentation](./connecting/drivers).
|
||||||
|
|
||||||
|
## Contracts & Conditions
|
||||||
|
|
||||||
|
Planetmint has been developed with simple logical gateways in mind. The logic got introduced by [cryptoconditions](https://https://docs.planetmint.io/projects/cryptoconditions). The cryptocondition documentation contains all details about how conditoins are defined and how they can be verified and fulfilled.
|
||||||
|
|
||||||
|
The integration of such into the transaction schema of Planetmint is shown below.
|
||||||
@ -30,14 +30,14 @@ from os import rename, remove
|
|||||||
|
|
||||||
# get version
|
# get version
|
||||||
_version = {}
|
_version = {}
|
||||||
with open('../../../planetmint/version.py') as fp:
|
with open("../../../planetmint/version.py") as fp:
|
||||||
exec(fp.read(), _version)
|
exec(fp.read(), _version)
|
||||||
|
|
||||||
|
|
||||||
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
parentdir = os.path.dirname(currentdir)
|
parentdir = os.path.dirname(currentdir)
|
||||||
sys.path.insert(0,parentdir)
|
sys.path.insert(0, parentdir)
|
||||||
#sys.path.insert(0, "/home/myname/pythonfiles")
|
# sys.path.insert(0, "/home/myname/pythonfiles")
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
@ -48,83 +48,95 @@ sys.path.insert(0,parentdir)
|
|||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
project = 'Planetmint'
|
project = "Planetmint"
|
||||||
|
|
||||||
import sphinx_rtd_theme
|
import sphinx_rtd_theme
|
||||||
|
|
||||||
extensions = [
|
extensions = [
|
||||||
'myst_parser',
|
"myst_parser",
|
||||||
'sphinx.ext.autosectionlabel',
|
"sphinx.ext.autosectionlabel",
|
||||||
'sphinx.ext.autodoc',
|
"sphinx.ext.autodoc",
|
||||||
'sphinx.ext.intersphinx',
|
"sphinx.ext.intersphinx",
|
||||||
'sphinx.ext.coverage',
|
"sphinx.ext.coverage",
|
||||||
'sphinx.ext.viewcode',
|
"sphinx.ext.viewcode",
|
||||||
'sphinx.ext.todo',
|
"sphinx.ext.todo",
|
||||||
'sphinx.ext.napoleon',
|
"sphinx.ext.napoleon",
|
||||||
'sphinxcontrib.httpdomain',
|
"sphinxcontrib.httpdomain",
|
||||||
'aafigure.sphinxext',
|
"aafigure.sphinxext",
|
||||||
|
#'sphinx_toolbox.collapse',
|
||||||
# Below are actually build steps made to look like sphinx extensions.
|
# Below are actually build steps made to look like sphinx extensions.
|
||||||
# It was the easiest way to get it running with ReadTheDocs.
|
# It was the easiest way to get it running with ReadTheDocs.
|
||||||
'generate_http_server_api_documentation',
|
"generate_http_server_api_documentation",
|
||||||
]
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
remove('contributing/cross-project-policies/code-of-conduct.md')
|
remove("contributing/cross-project-policies/code-of-conduct.md")
|
||||||
remove('contributing/cross-project-policies/release-process.md')
|
remove("contributing/cross-project-policies/release-process.md")
|
||||||
remove('contributing/cross-project-policies/python-style-guide.md')
|
remove("contributing/cross-project-policies/python-style-guide.md")
|
||||||
except:
|
except:
|
||||||
print('done')
|
print("done")
|
||||||
|
|
||||||
|
|
||||||
def get_old_new(url, old, new):
|
def get_old_new(url, old, new):
|
||||||
filename = wget.download(url)
|
filename = wget.download(url)
|
||||||
rename(old, new)
|
rename(old, new)
|
||||||
|
|
||||||
get_old_new('https://raw.githubusercontent.com/planetmint/planetmint/master/CODE_OF_CONDUCT.md',
|
|
||||||
'CODE_OF_CONDUCT.md', 'contributing/cross-project-policies/code-of-conduct.md')
|
|
||||||
|
|
||||||
get_old_new('https://raw.githubusercontent.com/planetmint/planetmint/master/RELEASE_PROCESS.md',
|
get_old_new(
|
||||||
'RELEASE_PROCESS.md', 'contributing/cross-project-policies/release-process.md')
|
"https://raw.githubusercontent.com/planetmint/planetmint/master/CODE_OF_CONDUCT.md",
|
||||||
|
"CODE_OF_CONDUCT.md",
|
||||||
|
"contributing/cross-project-policies/code-of-conduct.md",
|
||||||
|
)
|
||||||
|
|
||||||
get_old_new('https://raw.githubusercontent.com/planetmint/planetmint/master/PYTHON_STYLE_GUIDE.md',
|
get_old_new(
|
||||||
'PYTHON_STYLE_GUIDE.md', 'contributing/cross-project-policies/python-style-guide.md')
|
"https://raw.githubusercontent.com/planetmint/planetmint/master/RELEASE_PROCESS.md",
|
||||||
|
"RELEASE_PROCESS.md",
|
||||||
|
"contributing/cross-project-policies/release-process.md",
|
||||||
|
)
|
||||||
|
|
||||||
suppress_warnings = ['misc.highlighting_failure']
|
get_old_new(
|
||||||
|
"https://raw.githubusercontent.com/planetmint/planetmint/master/PYTHON_STYLE_GUIDE.md",
|
||||||
|
"PYTHON_STYLE_GUIDE.md",
|
||||||
|
"contributing/cross-project-policies/python-style-guide.md",
|
||||||
|
)
|
||||||
|
|
||||||
|
suppress_warnings = ["misc.highlighting_failure"]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ["_templates"]
|
||||||
|
|
||||||
# autodoc settings
|
# autodoc settings
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = "bysource"
|
||||||
autodoc_default_options = {
|
autodoc_default_options = {
|
||||||
'members': None,
|
"members": None,
|
||||||
}
|
}
|
||||||
|
|
||||||
# The suffix(es) of source filenames.
|
# The suffix(es) of source filenames.
|
||||||
# You can specify multiple suffix as a list of string:
|
# You can specify multiple suffix as a list of string:
|
||||||
#
|
#
|
||||||
# source_suffix = ['.rst', '.md']
|
# source_suffix = ['.rst', '.md']
|
||||||
source_suffix = ['.rst', '.md']
|
source_suffix = [".rst", ".md"]
|
||||||
|
|
||||||
# The encoding of source files.
|
# The encoding of source files.
|
||||||
#
|
#
|
||||||
# source_encoding = 'utf-8-sig'
|
# source_encoding = 'utf-8-sig'
|
||||||
|
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = "index"
|
||||||
autosectionlabel_prefix_document = True
|
autosectionlabel_prefix_document = True
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.now()
|
||||||
copyright = str(now.year) + ', Planetmint Contributors'
|
copyright = str(now.year) + ", Planetmint Contributors"
|
||||||
author = 'Planetmint Contributors'
|
author = "Planetmint Contributors"
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = _version['__short_version__']
|
version = _version["__short_version__"]
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = _version['__version__']
|
release = _version["__version__"]
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
@ -132,7 +144,7 @@ release = _version['__version__']
|
|||||||
#
|
#
|
||||||
# This is also used if you do content translation via gettext catalogs.
|
# This is also used if you do content translation via gettext catalogs.
|
||||||
# Usually you set "language" from the command line for these cases.
|
# Usually you set "language" from the command line for these cases.
|
||||||
language = 'en'
|
language = "en"
|
||||||
|
|
||||||
# There are two options for replacing |today|: either, you set today to some
|
# There are two options for replacing |today|: either, you set today to some
|
||||||
# non-false value, then it is used:
|
# non-false value, then it is used:
|
||||||
@ -168,7 +180,7 @@ exclude_patterns = []
|
|||||||
# show_authors = False
|
# show_authors = False
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
pygments_style = 'sphinx'
|
pygments_style = "sphinx"
|
||||||
|
|
||||||
# A list of ignored prefixes for module index sorting.
|
# A list of ignored prefixes for module index sorting.
|
||||||
# modindex_common_prefix = []
|
# modindex_common_prefix = []
|
||||||
@ -185,7 +197,8 @@ todo_include_todos = False
|
|||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
html_theme = 'sphinx_rtd_theme'
|
html_theme = "press"
|
||||||
|
# html_theme = 'sphinx_documatt_theme'
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
@ -194,7 +207,7 @@ html_theme = 'sphinx_rtd_theme'
|
|||||||
# html_theme_options = {}
|
# html_theme_options = {}
|
||||||
|
|
||||||
# Add any paths that contain custom themes here, relative to this directory.
|
# Add any paths that contain custom themes here, relative to this directory.
|
||||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
# html_theme_path = [press.get_html_theme_path()]
|
||||||
|
|
||||||
# The name for this set of Sphinx documents.
|
# The name for this set of Sphinx documents.
|
||||||
# "<project> v<release> documentation" by default.
|
# "<project> v<release> documentation" by default.
|
||||||
@ -208,7 +221,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
|||||||
# The name of an image file (relative to this directory) to place at the top
|
# The name of an image file (relative to this directory) to place at the top
|
||||||
# of the sidebar.
|
# of the sidebar.
|
||||||
#
|
#
|
||||||
# html_logo = None
|
html_logo = "_static/planetmint-logo.png"
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to use as a favicon of
|
# The name of an image file (relative to this directory) to use as a favicon of
|
||||||
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||||
@ -219,7 +232,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
|||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = ["_static"]
|
||||||
|
|
||||||
# Add any extra paths that contain custom files (such as robots.txt or
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
# .htaccess) here, relative to this directory. These files are copied
|
# .htaccess) here, relative to this directory. These files are copied
|
||||||
@ -299,23 +312,20 @@ html_static_path = ['_static']
|
|||||||
# html_search_scorer = 'scorer.js'
|
# html_search_scorer = 'scorer.js'
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'Planetmintdoc'
|
htmlhelp_basename = "Planetmintdoc"
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
#
|
#
|
||||||
'papersize': 'letterpaper',
|
"papersize": "letterpaper",
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
#
|
#
|
||||||
# 'pointsize': '10pt',
|
# 'pointsize': '10pt',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#
|
#
|
||||||
# 'preamble': '',
|
# 'preamble': '',
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
# Latex figure (float) alignment
|
||||||
#
|
#
|
||||||
# 'figure_align': 'htbp',
|
# 'figure_align': 'htbp',
|
||||||
@ -325,8 +335,13 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'Planetmint.tex', 'Planetmint Documentation',
|
(
|
||||||
'Planetmint Contributors', 'manual'),
|
master_doc,
|
||||||
|
"Planetmint.tex",
|
||||||
|
"Planetmint Documentation",
|
||||||
|
"Planetmint Contributors",
|
||||||
|
"manual",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
@ -366,10 +381,7 @@ latex_documents = [
|
|||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [(master_doc, "planetmint", "Planetmint Documentation", [author], 1)]
|
||||||
(master_doc, 'planetmint', 'Planetmint Documentation',
|
|
||||||
[author], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
# If true, show URL addresses after external links.
|
||||||
#
|
#
|
||||||
@ -382,9 +394,15 @@ man_pages = [
|
|||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'Planetmint', 'Planetmint Documentation',
|
(
|
||||||
author, 'Planetmint', 'One line description of project.',
|
master_doc,
|
||||||
'Miscellaneous'),
|
"Planetmint",
|
||||||
|
"Planetmint Documentation",
|
||||||
|
author,
|
||||||
|
"Planetmint",
|
||||||
|
"One line description of project.",
|
||||||
|
"Miscellaneous",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Documents to append as an appendix to all manuals.
|
# Documents to append as an appendix to all manuals.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
docs/root/source/connecting/_static/Node-components.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
BIN
docs/root/source/connecting/_static/mongodb_cloud_manager_1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -8,46 +8,53 @@
|
|||||||
Database Backend Interfaces
|
Database Backend Interfaces
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. automodule:: planetmint.backend
|
.. automodule:: planetmint.backend
|
||||||
:special-members: __init__
|
:special-members: __init__
|
||||||
|
|
||||||
|
|
||||||
Generic Interfaces
|
Generic Interfaces
|
||||||
==================
|
------------------
|
||||||
|
|
||||||
|
|
||||||
:mod:`planetmint.backend.connection`
|
:mod:`planetmint.backend.connection`
|
||||||
------------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. automodule:: planetmint.backend.connection
|
.. automodule:: planetmint.backend.connection
|
||||||
:special-members: __init__
|
:special-members: __init__
|
||||||
|
|
||||||
:mod:`planetmint.backend.query`
|
:mod:`planetmint.backend.query`
|
||||||
-------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
.. automodule:: planetmint.backend.query
|
.. automodule:: planetmint.backend.query
|
||||||
|
|
||||||
:mod:`planetmint.backend.schema`
|
:mod:`planetmint.backend.schema`
|
||||||
--------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
.. automodule:: planetmint.backend.schema
|
.. automodule:: planetmint.backend.schema
|
||||||
|
|
||||||
:mod:`planetmint.backend.utils`
|
:mod:`planetmint.backend.utils`
|
||||||
-------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
.. automodule:: planetmint.backend.utils
|
.. automodule:: planetmint.backend.utils
|
||||||
|
|
||||||
|
|
||||||
MongoDB Backend
|
MongoDB Backend
|
||||||
===============
|
---------------
|
||||||
|
|
||||||
|
|
||||||
.. automodule:: planetmint.backend.localmongodb
|
.. automodule:: planetmint.backend.localmongodb
|
||||||
:special-members: __init__
|
:special-members: __init__
|
||||||
|
|
||||||
:mod:`planetmint.backend.localmongodb.connection`
|
:mod:`planetmint.backend.localmongodb.connection`
|
||||||
-------------------------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
.. automodule:: planetmint.backend.localmongodb.connection
|
.. automodule:: planetmint.backend.localmongodb.connection
|
||||||
|
|
||||||
:mod:`planetmint.backend.localmongodb.query`
|
:mod:`planetmint.backend.localmongodb.query`
|
||||||
--------------------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. automodule:: planetmint.backend.localmongodb.query
|
.. automodule:: planetmint.backend.localmongodb.query
|
||||||
|
|
||||||
:mod:`planetmint.backend.localmongodb.schema`
|
:mod:`planetmint.backend.localmongodb.schema`
|
||||||
---------------------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. automodule:: planetmint.backend.localmongodb.schema
|
.. automodule:: planetmint.backend.localmongodb.schema
|
||||||
@ -5,7 +5,8 @@
|
|||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
Commands And Backend
|
Commands And Backend
|
||||||
====================
|
********************
|
||||||
|
|
||||||
|
|
||||||
This section contains auto-generated documentation of various functions, classes and methods
|
This section contains auto-generated documentation of various functions, classes and methods
|
||||||
in the Planetmint Server code, based on Python docstrings in the code itself.
|
in the Planetmint Server code, based on Python docstrings in the code itself.
|
||||||
@ -16,11 +17,9 @@ in the Planetmint Server code, based on Python docstrings in the code itself.
|
|||||||
if you want to know *for sure* what the code does,
|
if you want to know *for sure* what the code does,
|
||||||
then you have to read the code itself.
|
then you have to read the code itself.
|
||||||
|
|
||||||
.. toctree::
|
.. include:: ./commands.rst
|
||||||
:maxdepth: 1
|
.. include:: the-planetmint-class.rst
|
||||||
|
.. include:: backend.rst
|
||||||
commands
|
|
||||||
the-planetmint-class
|
|
||||||
backend
|
|
||||||
|
|
||||||
|
|
||||||
@ -4,13 +4,14 @@
|
|||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
Drivers
|
Drivers & Bindings
|
||||||
=======
|
******************
|
||||||
|
|
||||||
|
|
||||||
Connectors to Planetmint are referred to as drivers within the community. A driver is used to create valid transactions, to generate key pairs, to sign transactions and to post the transaction to the Planetmint API.
|
Connectors to Planetmint are referred to as drivers within the community. A driver is used to create valid transactions, to generate key pairs, to sign transactions and to post the transaction to the Planetmint API.
|
||||||
|
|
||||||
These drivers were originally created by the original BigchainDB team:
|
These drivers or bindings were originally created by the original BigchainDB team:
|
||||||
Planetmint
|
|
||||||
* `Python Driver <https://docs.planetmint.io/projects/py-driver/en/latest/index.html>`_
|
* `Python Driver <https://docs.planetmint.io/projects/py-driver/en/latest/index.html>`_
|
||||||
* `JavaScript / Node.js Driver <https://github.com/bigchaindb/js-bigchaindb-driver>`_
|
* `JavaScript / Node.js Driver <https://github.com/bigchaindb/js-bigchaindb-driver>`_
|
||||||
* `Java Driver <https://github.com/bigchaindb/java-bigchaindb-driver>`_
|
* `Java Driver <https://github.com/bigchaindb/java-bigchaindb-driver>`_
|
||||||
@ -4,10 +4,9 @@
|
|||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
.. _the-http-client-server-api:
|
HTTP Client-Server API
|
||||||
|
**************************
|
||||||
|
|
||||||
The HTTP Client-Server API
|
|
||||||
==========================
|
|
||||||
|
|
||||||
This page assumes you already know an API Root URL
|
This page assumes you already know an API Root URL
|
||||||
for a Planetmint node or reverse proxy.
|
for a Planetmint node or reverse proxy.
|
||||||
@ -18,10 +17,10 @@ If you set up a Planetmint node or reverse proxy yourself,
|
|||||||
and you're not sure what the API Root URL is,
|
and you're not sure what the API Root URL is,
|
||||||
then see the last section of this page for help.
|
then see the last section of this page for help.
|
||||||
|
|
||||||
.. _planetmint-root-url:
|
|
||||||
|
|
||||||
Planetmint Root URL
|
Planetmint Root URL
|
||||||
-------------------
|
===================
|
||||||
|
|
||||||
|
|
||||||
If you send an HTTP GET request to the Planetmint Root URL
|
If you send an HTTP GET request to the Planetmint Root URL
|
||||||
e.g. ``http://localhost:9984``
|
e.g. ``http://localhost:9984``
|
||||||
@ -34,10 +33,10 @@ with something like the following in the body:
|
|||||||
:language: http
|
:language: http
|
||||||
|
|
||||||
|
|
||||||
.. _api-root-endpoint:
|
.. _Api root endpoint:
|
||||||
|
|
||||||
API Root Endpoint
|
API Root Endpoint
|
||||||
-----------------
|
=================
|
||||||
|
|
||||||
|
|
||||||
If you send an HTTP GET request to the API Root Endpoint
|
If you send an HTTP GET request to the API Root Endpoint
|
||||||
e.g. ``http://localhost:9984/api/v1/``
|
e.g. ``http://localhost:9984/api/v1/``
|
||||||
@ -50,7 +49,8 @@ that allows you to discover the Planetmint API endpoints:
|
|||||||
|
|
||||||
|
|
||||||
Transactions Endpoint
|
Transactions Endpoint
|
||||||
---------------------
|
=====================
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -210,7 +210,8 @@ Transactions Endpoint
|
|||||||
|
|
||||||
|
|
||||||
Transaction Outputs
|
Transaction Outputs
|
||||||
-------------------
|
===================
|
||||||
|
|
||||||
|
|
||||||
The ``/api/v1/outputs`` endpoint returns transactions outputs filtered by a
|
The ``/api/v1/outputs`` endpoint returns transactions outputs filtered by a
|
||||||
given public key, and optionally filtered to only include either spent or
|
given public key, and optionally filtered to only include either spent or
|
||||||
@ -332,7 +333,8 @@ unspent outputs.
|
|||||||
|
|
||||||
|
|
||||||
Assets
|
Assets
|
||||||
------
|
======
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -456,7 +458,8 @@ Assets
|
|||||||
|
|
||||||
|
|
||||||
Transaction Metadata
|
Transaction Metadata
|
||||||
--------------------
|
====================
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -580,7 +583,8 @@ Transaction Metadata
|
|||||||
|
|
||||||
|
|
||||||
Validators
|
Validators
|
||||||
--------------------
|
==========
|
||||||
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/validators
|
.. http:get:: /api/v1/validators
|
||||||
|
|
||||||
@ -624,7 +628,8 @@ Validators
|
|||||||
|
|
||||||
|
|
||||||
Blocks
|
Blocks
|
||||||
------
|
======
|
||||||
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/blocks/{block_height}
|
.. http:get:: /api/v1/blocks/{block_height}
|
||||||
|
|
||||||
@ -701,7 +706,8 @@ Blocks
|
|||||||
.. _determining-the-api-root-url:
|
.. _determining-the-api-root-url:
|
||||||
|
|
||||||
Determining the API Root URL
|
Determining the API Root URL
|
||||||
----------------------------
|
============================
|
||||||
|
|
||||||
|
|
||||||
When you start Planetmint Server using ``planetmint start``,
|
When you start Planetmint Server using ``planetmint start``,
|
||||||
an HTTP API is exposed at some address. The default is:
|
an HTTP API is exposed at some address. The default is:
|
||||||
@ -713,7 +719,7 @@ so you can access it from the same machine,
|
|||||||
but it won't be directly accessible from the outside world.
|
but it won't be directly accessible from the outside world.
|
||||||
(The outside world could connect via a SOCKS proxy or whatnot.)
|
(The outside world could connect via a SOCKS proxy or whatnot.)
|
||||||
|
|
||||||
The documentation about Planetmint Server :doc:`Configuration Settings <../../installation/node-setup/configuration>`
|
The documentation about Planetmint Server :doc:`Configuration Settings <../../node-setup/configuration>`
|
||||||
has a section about how to set ``server.bind`` so as to make
|
has a section about how to set ``server.bind`` so as to make
|
||||||
the HTTP API publicly accessible.
|
the HTTP API publicly accessible.
|
||||||
|
|
||||||
@ -4,7 +4,7 @@ Content-Type: application/json
|
|||||||
{
|
{
|
||||||
"assets": "/assets/",
|
"assets": "/assets/",
|
||||||
"blocks": "/blocks/",
|
"blocks": "/blocks/",
|
||||||
"docs": "https://docs.planetmint.com/projects/server/en/v0.9.3/http-client-server-api.html",
|
"docs": "https://docs.planetmint.com/projects/server/en/v0.9.9/http-client-server-api.html",
|
||||||
"metadata": "/metadata/",
|
"metadata": "/metadata/",
|
||||||
"outputs": "/outputs/",
|
"outputs": "/outputs/",
|
||||||
"streamedblocks": "ws://localhost:9985/api/v1/streams/valid_blocks",
|
"streamedblocks": "ws://localhost:9985/api/v1/streams/valid_blocks",
|
||||||
@ -6,7 +6,7 @@ Content-Type: application/json
|
|||||||
"v1": {
|
"v1": {
|
||||||
"assets": "/api/v1/assets/",
|
"assets": "/api/v1/assets/",
|
||||||
"blocks": "/api/v1/blocks/",
|
"blocks": "/api/v1/blocks/",
|
||||||
"docs": "https://docs.planetmint.com/projects/server/en/v0.9.3/http-client-server-api.html",
|
"docs": "https://docs.planetmint.com/projects/server/en/v0.9.9/http-client-server-api.html",
|
||||||
"metadata": "/api/v1/metadata/",
|
"metadata": "/api/v1/metadata/",
|
||||||
"outputs": "/api/v1/outputs/",
|
"outputs": "/api/v1/outputs/",
|
||||||
"streamedblocks": "ws://localhost:9985/api/v1/streams/valid_blocks",
|
"streamedblocks": "ws://localhost:9985/api/v1/streams/valid_blocks",
|
||||||
@ -15,7 +15,7 @@ Content-Type: application/json
|
|||||||
"validators": "/api/v1/validators"
|
"validators": "/api/v1/validators"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"docs": "https://docs.planetmint.com/projects/server/en/v0.9.3/",
|
"docs": "https://docs.planetmint.com/projects/server/en/v0.9.9/",
|
||||||
"software": "Planetmint",
|
"software": "Planetmint",
|
||||||
"version": "0.9.3"
|
"version": "0.9.9"
|
||||||
}
|
}
|
||||||
23
docs/root/source/connecting/index.rst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
.. Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
Planetmint and IPDB software contributors.
|
||||||
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
Connecting to Planetmint
|
||||||
|
########################
|
||||||
|
|
||||||
|
Planetmint enables you to connect to it via variaous ways:
|
||||||
|
|
||||||
|
* Bindings or drivers for varioues languages exist
|
||||||
|
* RESTful APIs and direct database queries
|
||||||
|
|
||||||
|
Details are listed below.
|
||||||
|
|
||||||
|
.. include:: drivers.rst
|
||||||
|
.. include:: http-client-server-api.rst
|
||||||
|
.. include:: websocket-event-stream-api.rst
|
||||||
|
.. include:: query.rst
|
||||||
|
.. .. include:: api/index.rst
|
||||||
|
.. .. include:: commands-and-backend/index.rst
|
||||||
|
|
||||||
@ -4,14 +4,15 @@
|
|||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
Queries in Planetmint
|
Database Queries
|
||||||
=====================
|
******************
|
||||||
|
|
||||||
A node operator can use the full power of MongoDB's query engine to search and query all stored data, including all transactions, assets and metadata.
|
A node operator can use the full power of MongoDB's query engine to search and query all stored data, including all transactions, assets and metadata.
|
||||||
The node operator can decide for themselves how much of that query power they expose to external users.
|
The node operator can decide for themselves how much of that query power they expose to external users.
|
||||||
|
|
||||||
Blog Post with Example Queries
|
Querying MongoDB
|
||||||
------------------------------
|
==============================
|
||||||
|
|
||||||
|
|
||||||
We wrote a blog post in The Planetmint Blog to show
|
We wrote a blog post in The Planetmint Blog to show
|
||||||
how to use some MongoDB tools to query a Planetmint node's MongoDB database.
|
how to use some MongoDB tools to query a Planetmint node's MongoDB database.
|
||||||
@ -22,6 +23,7 @@ about custom cars and their ownership histories.
|
|||||||
How to Connect to MongoDB
|
How to Connect to MongoDB
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|
||||||
Before you can query a MongoDB database, you must connect to it, and to do that, you need to know its hostname and port.
|
Before you can query a MongoDB database, you must connect to it, and to do that, you need to know its hostname and port.
|
||||||
|
|
||||||
If you're running a Planetmint node on your local machine (e.g. for dev and test), then the hostname should be ``localhost`` and the port should be ``27017``, unless you did something to change those values. If you're running a Planetmint node on a remote machine and you can SSH to that machine, then the same is true.
|
If you're running a Planetmint node on your local machine (e.g. for dev and test), then the hostname should be ``localhost`` and the port should be ``27017``, unless you did something to change those values. If you're running a Planetmint node on a remote machine and you can SSH to that machine, then the same is true.
|
||||||
@ -31,6 +33,7 @@ If you're running a Planetmint node on a remote machine and you configured its M
|
|||||||
How to Query
|
How to Query
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
||||||
A Planetmint node operator has full access to their local MongoDB instance, so they can use any of MongoDB's APIs for running queries, including:
|
A Planetmint node operator has full access to their local MongoDB instance, so they can use any of MongoDB's APIs for running queries, including:
|
||||||
|
|
||||||
- `the Mongo Shell <https://docs.mongodb.com/manual/mongo/>`_,
|
- `the Mongo Shell <https://docs.mongodb.com/manual/mongo/>`_,
|
||||||
@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
.. _the-websocket-event-stream-api:
|
.. _the-websocket-event-stream-api:
|
||||||
|
|
||||||
The WebSocket Event Stream API
|
WebSocket Event Stream API
|
||||||
==============================
|
******************************
|
||||||
|
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
The WebSocket Event Stream runs on a different port than the Web API. The
|
The WebSocket Event Stream runs on a different port than the Web API. The
|
||||||
@ -21,18 +22,20 @@ to notify you as events occur, such as new `valid transactions <#valid-transacti
|
|||||||
|
|
||||||
|
|
||||||
Demoing the API
|
Demoing the API
|
||||||
---------------
|
===============
|
||||||
|
|
||||||
|
|
||||||
You may be interested in demoing the Event Stream API with the `WebSocket echo test <http://websocket.org/echo.html>`_
|
You may be interested in demoing the Event Stream API with the `WebSocket echo test <http://websocket.org/echo.html>`_
|
||||||
to familiarize yourself before attempting an integration.
|
to familiarize yourself before attempting an integration.
|
||||||
|
|
||||||
|
|
||||||
Determining Support for the Event Stream API
|
Determining Support for the Event Stream API
|
||||||
--------------------------------------------
|
============================================
|
||||||
|
|
||||||
|
|
||||||
It's a good idea to make sure that the node you're connecting with
|
It's a good idea to make sure that the node you're connecting with
|
||||||
has advertised support for the Event Stream API. To do so, send a HTTP GET
|
has advertised support for the Event Stream API. To do so, send a HTTP GET
|
||||||
request to the node's :ref:`api-root-endpoint`
|
request to the node's `API root endpoint`_
|
||||||
(e.g. ``http://localhost:9984/api/v1/``) and check that the
|
(e.g. ``http://localhost:9984/api/v1/``) and check that the
|
||||||
response contains a ``streams`` property:
|
response contains a ``streams`` property:
|
||||||
|
|
||||||
@ -46,7 +49,8 @@ response contains a ``streams`` property:
|
|||||||
|
|
||||||
|
|
||||||
Connection Keep-Alive
|
Connection Keep-Alive
|
||||||
---------------------
|
=====================
|
||||||
|
|
||||||
|
|
||||||
The Event Stream API supports Ping/Pong frames as descibed in
|
The Event Stream API supports Ping/Pong frames as descibed in
|
||||||
`RFC 6455 <https://tools.ietf.org/html/rfc6455#section-5.5.2>`_.
|
`RFC 6455 <https://tools.ietf.org/html/rfc6455#section-5.5.2>`_.
|
||||||
@ -58,7 +62,8 @@ The Event Stream API supports Ping/Pong frames as descibed in
|
|||||||
same.
|
same.
|
||||||
|
|
||||||
Streams
|
Streams
|
||||||
-------
|
=======
|
||||||
|
|
||||||
|
|
||||||
Each stream is meant as a unidirectional communication channel, where the
|
Each stream is meant as a unidirectional communication channel, where the
|
||||||
Planetmint node is the only party sending messages. Any messages sent to the
|
Planetmint node is the only party sending messages. Any messages sent to the
|
||||||
@ -85,7 +90,8 @@ All messages sent in a stream are in the JSON format.
|
|||||||
API, consider creating a new `BEP <https://github.com/planetmint/BEPs>`_.
|
API, consider creating a new `BEP <https://github.com/planetmint/BEPs>`_.
|
||||||
|
|
||||||
Valid Transactions
|
Valid Transactions
|
||||||
~~~~~~~~~~~~~~~~~~
|
==================
|
||||||
|
|
||||||
|
|
||||||
``/valid_transactions``
|
``/valid_transactions``
|
||||||
|
|
||||||
@ -4,8 +4,8 @@
|
|||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
Planetmint Documentation
|
Planetmint
|
||||||
========================
|
==========
|
||||||
|
|
||||||
Meet Planetmint. The blockchain database.
|
Meet Planetmint. The blockchain database.
|
||||||
|
|
||||||
@ -14,20 +14,23 @@ including decentralization, immutability and native support for assets.
|
|||||||
|
|
||||||
At a high level, one can communicate with a Planetmint network (set of nodes) using the Planetmint HTTP API, or a wrapper for that API, such as the Planetmint Python Driver. Each Planetmint node runs Planetmint Server and various other software. The `terminology page <terminology.html>`_ explains some of those terms in more detail.
|
At a high level, one can communicate with a Planetmint network (set of nodes) using the Planetmint HTTP API, or a wrapper for that API, such as the Planetmint Python Driver. Each Planetmint node runs Planetmint Server and various other software. The `terminology page <terminology.html>`_ explains some of those terms in more detail.
|
||||||
|
|
||||||
More About Planetmint
|
.. toctree::
|
||||||
---------------------
|
:maxdepth: 3
|
||||||
|
|
||||||
|
Introdcution <introduction/index>
|
||||||
|
Using Planetmint <basic-usage>
|
||||||
|
Node Setup <node-setup/index>
|
||||||
|
Networks & Federations <network-setup/index>
|
||||||
|
Connecting to Planetmint <connecting/index>
|
||||||
|
tools/index
|
||||||
|
contributing/index
|
||||||
|
terminology
|
||||||
|
troubleshooting
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
:caption: Cryptoconditions & Smart Contracts
|
||||||
|
|
||||||
Planetmint Docs Home <self>
|
Crypto Conditions & Smart Contracts <https://docs.planetmint.io/projects/cryptoconditions/en/latest/>
|
||||||
about-planetmint
|
cryptoconditions
|
||||||
terminology
|
|
||||||
properties
|
|
||||||
basic-usage
|
|
||||||
installation/index
|
|
||||||
drivers/index
|
|
||||||
query
|
|
||||||
contributing/index
|
|
||||||
korean/index
|
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
.. Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
API
|
|
||||||
===
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
http-client-server-api
|
|
||||||
websocket-event-stream-api
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
|
|
||||||
.. Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
|
|
||||||
Installation
|
|
||||||
============
|
|
||||||
|
|
||||||
You can install a single node to test out Planetmint, connect it to a network or setup a network of nodes.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
quickstart
|
|
||||||
node-setup/index
|
|
||||||
network-setup/index
|
|
||||||
api/index
|
|
||||||
commands-and-backend/index
|
|
||||||
appendices/index
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
.. Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
|
|
||||||
Node setup
|
|
||||||
==========
|
|
||||||
|
|
||||||
You can use the all-in-one docker solution, or install Tendermint, MongoDB, and Planetmint step by step. For more advanced users and for development, the second option is recommended.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
deploy-a-machine
|
|
||||||
aws-setup
|
|
||||||
all-in-one-planetmint
|
|
||||||
planetmint-node-ansible
|
|
||||||
set-up-node-software
|
|
||||||
set-up-nginx
|
|
||||||
configuration
|
|
||||||
planetmint-cli
|
|
||||||
troubleshooting
|
|
||||||
production-node/index
|
|
||||||
release-notes
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
.. Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
|
|
||||||
Production Nodes
|
|
||||||
================
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
node-requirements
|
|
||||||
node-assumptions
|
|
||||||
node-components
|
|
||||||
node-security-and-privacy
|
|
||||||
reverse-proxy-notes
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# Release Notes
|
|
||||||
|
|
||||||
You can find a list of all Planetmint Server releases and release notes on GitHub at:
|
|
||||||
|
|
||||||
[https://github.com/planetmint/planetmint/releases](https://github.com/planetmint/planetmint/releases)
|
|
||||||
|
|
||||||
The [CHANGELOG.md file](https://github.com/planetmint/planetmint/blob/master/CHANGELOG.md) contains much the same information, but it also has notes about what to expect in the _next_ release.
|
|
||||||
|
|
||||||
We also have [a roadmap document in ROADMAP.md](https://github.com/planetmint/org/blob/master/ROADMAP.md).
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
|
|
||||||
# Introduction
|
|
||||||
|
|
||||||
This is the documentation for Planetmint Server, or in other words, node -
|
|
||||||
the Planetmint software that is on servers (but not on clients).
|
|
||||||
|
|
||||||
## Setup Instructions for Various Cases
|
|
||||||
|
|
||||||
- Quickstart link below
|
|
||||||
- [Set up a local Planetmint node for development, experimenting and testing](node-setup/index)
|
|
||||||
- [Set up and run a Planetmint network](network-setup/index)
|
|
||||||
|
|
||||||
## Develop an App Test
|
|
||||||
|
|
||||||
To develop an app that talks to a Planetmint network, you'll want a test network to test it against. You have a few options:
|
|
||||||
|
|
||||||
1. The IPDB Test Network (or "Testnet") is a free-to-use, publicly-available test network that you can test against. It is available at [IPDB testnet](https://test.ipdb.io/).
|
|
||||||
1. You could also run a Planetmint node on you local machine. One way is to use this node setup guide with a one-node "network" by using the all-in-one docker solution, or manual installation and configuration of the components. Another way is to use one of the deployment methods listed in the [network setup guide](network-setup/index) or in the [the docs about contributing to Planetmint](../contributing/index).
|
|
||||||
|
|
||||||
|
|
||||||
## (WIP) Quickstart
|
|
||||||
|
|
||||||
<style media="screen" type="text/css">
|
|
||||||
.button {
|
|
||||||
border-top: 1px solid #96d1f8;
|
|
||||||
background: #65a9d7;
|
|
||||||
background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
|
|
||||||
background: -webkit-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
background: -moz-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
background: -ms-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
background: -o-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
padding: 8.5px 17px;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
|
|
||||||
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
|
|
||||||
box-shadow: rgba(0,0,0,1) 0 1px 0;
|
|
||||||
text-shadow: rgba(0,0,0,.4) 0 1px 0;
|
|
||||||
color: white;
|
|
||||||
font-size: 16px;
|
|
||||||
font-family: Arial, Sans-Serif;
|
|
||||||
text-decoration: none;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.button:hover {
|
|
||||||
border-top-color: #28597a;
|
|
||||||
background: #28597a;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
.button:active {
|
|
||||||
border-top-color: #1b435e;
|
|
||||||
background: #1b435e;
|
|
||||||
}
|
|
||||||
a.button:visited {
|
|
||||||
color: white
|
|
||||||
}
|
|
||||||
.buttondiv {
|
|
||||||
margin-bottom: 1.5em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
## Try Planetmint
|
|
||||||
|
|
||||||
Create a transaction and post it to the test network:
|
|
||||||
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="https://www.planetmint.io/developers/getstarted/">Try Planetmint Now</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
@ -4,24 +4,24 @@
|
|||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
About Planetmint
|
What is Planetmint
|
||||||
----------------
|
==================
|
||||||
|
|
||||||
Basic Facts
|
Basic Facts
|
||||||
===========
|
-----------
|
||||||
|
|
||||||
#. One can store arbitrary data (including encrypted data) in a Planetmint network, within limits: there’s a maximum transaction size. Every transaction has a ``metadata`` section which can store almost any Unicode string (up to some maximum length). Similarly, every CREATE transaction has an ``asset.data`` section which can store almost any Unicode string.
|
1. One can store arbitrary data (including encrypted data) in a Planetmint network, within limits: there’s a maximum transaction size. Every transaction has a ``metadata`` section which can store almost any Unicode string (up to some maximum length). Similarly, every CREATE transaction has an ``asset.data`` section which can store almost any Unicode string.
|
||||||
#. The data stored in certain Planetmint transaction fields must not be encrypted, e.g. public keys and amounts. Planetmint doesn’t offer private transactions akin to Zcoin.
|
2. . The data stored in certain Planetmint transaction fields must not be encrypted, e.g. public keys and amounts. Planetmint doesn’t offer private transactions akin to Zcoin.
|
||||||
#. Once data has been stored in a Planetmint network, it’s best to assume it can’t be change or deleted.
|
3. Once data has been stored in a Planetmint network, it’s best to assume it can’t be change or deleted.
|
||||||
#. Every node in a Planetmint network has a full copy of all the stored data.
|
4. Every node in a Planetmint network has a full copy of all the stored data.
|
||||||
#. Every node in a Planetmint network can read all the stored data.
|
5. Every node in a Planetmint network can read all the stored data.
|
||||||
#. Everyone with full access to a Planetmint node (e.g. the sysadmin of a node) can read all the data stored on that node.
|
6. Everyone with full access to a Planetmint node (e.g. the sysadmin of a node) can read all the data stored on that node.
|
||||||
#. Everyone given access to a node via the Planetmint HTTP API can find and read all the data stored by Planetmint. The list of people with access might be quite short.
|
7. Everyone given access to a node via the Planetmint HTTP API can find and read all the data stored by Planetmint. The list of people with access might be quite short.
|
||||||
#. If the connection between an external user and a Planetmint node isn’t encrypted (using HTTPS, for example), then a wiretapper can read all HTTP requests and responses in transit.
|
8. If the connection between an external user and a Planetmint node isn’t encrypted (using HTTPS, for example), then a wiretapper can read all HTTP requests and responses in transit.
|
||||||
#. If someone gets access to plaintext (regardless of where they got it), then they can (in principle) share it with the whole world. One can make it difficult for them to do that, e.g. if it is a lot of data and they only get access inside a secure room where they are searched as they leave the room.
|
9. If someone gets access to plaintext (regardless of where they got it), then they can (in principle) share it with the whole world. One can make it difficult for them to do that, e.g. if it is a lot of data and they only get access inside a secure room where they are searched as they leave the room.
|
||||||
|
|
||||||
Planetmint for Asset Registrations & Transfers
|
Planetmint for Asset Registrations & Transfers
|
||||||
==============================================
|
----------------------------------------------
|
||||||
|
|
||||||
Planetmint can store data of any kind, but it's designed to be particularly good for storing asset registrations and transfers:
|
Planetmint can store data of any kind, but it's designed to be particularly good for storing asset registrations and transfers:
|
||||||
|
|
||||||
@ -37,7 +37,8 @@ Planetmint can store data of any kind, but it's designed to be particularly good
|
|||||||
|
|
||||||
We used the word "owners" somewhat loosely above. A more accurate word might be fulfillers, signers, controllers, or transfer-enablers. See the section titled **A Note about Owners** in the relevant `Planetmint Transactions Spec <https://github.com/planetmint/BEPs/tree/master/tx-specs/>`_.
|
We used the word "owners" somewhat loosely above. A more accurate word might be fulfillers, signers, controllers, or transfer-enablers. See the section titled **A Note about Owners** in the relevant `Planetmint Transactions Spec <https://github.com/planetmint/BEPs/tree/master/tx-specs/>`_.
|
||||||
|
|
||||||
# Production-Ready?
|
Production-Ready?
|
||||||
|
-----------------
|
||||||
|
|
||||||
Depending on your use case, Planetmint may or may not be production-ready. You should ask your service provider.
|
Depending on your use case, Planetmint may or may not be production-ready. You should ask your service provider.
|
||||||
If you want to go live (into production) with Planetmint, please consult with your service provider.
|
If you want to go live (into production) with Planetmint, please consult with your service provider.
|
||||||
@ -45,7 +46,7 @@ If you want to go live (into production) with Planetmint, please consult with yo
|
|||||||
Note: Planetmint has an open source license with a "no warranty" section that is typical of open source licenses. This is standard in the software industry. For example, the Linux kernel is used in production by billions of machines even though its license includes a "no warranty" section. Warranties are usually provided above the level of the software license, by service providers.
|
Note: Planetmint has an open source license with a "no warranty" section that is typical of open source licenses. This is standard in the software industry. For example, the Linux kernel is used in production by billions of machines even though its license includes a "no warranty" section. Warranties are usually provided above the level of the software license, by service providers.
|
||||||
|
|
||||||
Storing Private Data Off-Chain
|
Storing Private Data Off-Chain
|
||||||
==============================
|
------------------------------
|
||||||
|
|
||||||
A system could store data off-chain, e.g. in a third-party database, document store, or content management system (CMS) and it could use Planetmint to:
|
A system could store data off-chain, e.g. in a third-party database, document store, or content management system (CMS) and it could use Planetmint to:
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ There are other ways to accomplish the same thing. The above is just one example
|
|||||||
You might have noticed that the above example didn’t treat the “read permission” as an asset owned (controlled) by a user because if the permission asset is given to (transferred to or created by) the user then it cannot be controlled any further (by DocPile) until the user transfers it back to DocPile. Moreover, the user could transfer the asset to someone else, which might be problematic.
|
You might have noticed that the above example didn’t treat the “read permission” as an asset owned (controlled) by a user because if the permission asset is given to (transferred to or created by) the user then it cannot be controlled any further (by DocPile) until the user transfers it back to DocPile. Moreover, the user could transfer the asset to someone else, which might be problematic.
|
||||||
|
|
||||||
Storing Private Data On-Chain, Encrypted
|
Storing Private Data On-Chain, Encrypted
|
||||||
========================================
|
-----------------------------------------
|
||||||
|
|
||||||
There are many ways to store private data on-chain, encrypted. Every use case has its own objectives and constraints, and the best solution depends on the use case. `The IPDB consulting team <contact@ipdb.global>`_ can help you design the best solution for your use case.
|
There are many ways to store private data on-chain, encrypted. Every use case has its own objectives and constraints, and the best solution depends on the use case. `The IPDB consulting team <contact@ipdb.global>`_ can help you design the best solution for your use case.
|
||||||
|
|
||||||
10
docs/root/source/introduction/index.rst
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Introduction
|
||||||
|
############
|
||||||
|
|
||||||
|
.. include:: quickstart.md
|
||||||
|
:parser: myst_parser.sphinx_
|
||||||
|
.. include:: about-planetmint.rst
|
||||||
|
:parser: myst_parser.sphinx_
|
||||||
|
.. include:: properties.md
|
||||||
|
:parser: myst_parser.sphinx_
|
||||||
|
|
||||||
80
docs/root/source/introduction/quickstart.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<!---
|
||||||
|
Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
Planetmint and IPDB software contributors.
|
||||||
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
--->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Quickstart
|
||||||
|
Planetmint is a metadata blockchain. This introduction gives an overview about how to attest data to Planetmint. First, simple transaction creation and sending is shown. Thereafter, an introdcution about how to set up a single node or a cluster is given.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## The IPDB Testnet - sending transactions
|
||||||
|
The IPDB foundation hosta a testnet server that is reset every night at 4am UTC.
|
||||||
|
|
||||||
|
The following sequence shows a simple asset notarization / attestion on that testnet:
|
||||||
|
Create a file named notarize.py
|
||||||
|
|
||||||
|
```
|
||||||
|
from planetmint_driver import Planetmint
|
||||||
|
from planetmint_driver.crypto import generate_keypair
|
||||||
|
|
||||||
|
plntmnt = Planetmint('https://test.ipdb.io')
|
||||||
|
alice = generate_keypair()
|
||||||
|
tx = plntmnt.transactions.prepare(
|
||||||
|
operation='CREATE',
|
||||||
|
signers=alice.public_key,
|
||||||
|
asset={'data': {'message': 'Blockchain all the things!'}})
|
||||||
|
signed_tx = plntmnt.transactions.fulfill(
|
||||||
|
tx,
|
||||||
|
private_keys=alice.private_key)
|
||||||
|
plntmnt.transactions.send_commit(signed_tx)
|
||||||
|
```
|
||||||
|
|
||||||
|
install dependencies and execute it
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pip install planetmint-driver
|
||||||
|
$ python notarize.py
|
||||||
|
```
|
||||||
|
# Install Planetmint
|
||||||
|
## Local Node
|
||||||
|
Planemtint is a Tendermint applicatoin with an attached database.
|
||||||
|
A basic installation installs the database, Tenermint and therafter Planetmint.
|
||||||
|
|
||||||
|
The instalation of the database is as follows:
|
||||||
|
```
|
||||||
|
$ sudo apt install mongodb
|
||||||
|
```
|
||||||
|
Tendermint can be installed and started as follows
|
||||||
|
```
|
||||||
|
$ wget https://github.com/tendermint/tendermint/releases/download/v0.34.15/tendermint_0.34.15_linux_amd64.tar.gz
|
||||||
|
$ tar zxf tendermint_0.34.15_linux_amd64.tar.gz
|
||||||
|
$ ./tendermint init
|
||||||
|
$ ./tendermint node --proxy_app=tcp://localhost:26658
|
||||||
|
```
|
||||||
|
Planetmint installs and starts as described below
|
||||||
|
```
|
||||||
|
$ pip install planetmint
|
||||||
|
$ planetmint configure
|
||||||
|
$ planetmint start
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cluster of nodes
|
||||||
|
Setting up a cluster of nodes comes down to set up a cluster of tendermint nodes as documented at [Tendermint](https://docs.tendermint.com/v0.35/introduction/quick-start.html#cluster-of-nodes). In addition to that, the database and Planetmint need to be installed on the servers as described above.
|
||||||
|
|
||||||
|
## Setup Instructions for Various Cases
|
||||||
|
|
||||||
|
- Quickstart link below
|
||||||
|
- [Set up a local Planetmint node for development, experimenting and testing](../node-setup/index)
|
||||||
|
- [Set up and run a Planetmint network](../network-setup/index)
|
||||||
|
|
||||||
|
## Develop an App Test
|
||||||
|
|
||||||
|
To develop an app that talks to a Planetmint network, you'll want a test network to test it against. You have a few options:
|
||||||
|
|
||||||
|
1. The IPDB Test Network (or "Testnet") is a free-to-use, publicly-available test network that you can test against. It is available at [IPDB testnet](https://test.ipdb.io/).
|
||||||
|
1. You could also run a Planetmint node on you local machine. One way is to use this node setup guide with a one-node "network" by using the all-in-one docker solution, or manual installation and configuration of the components. Another way is to use one of the deployment methods listed in the [network setup guide](../network-setup/index) or in the [the docs about contributing to Planetmint](../contributing/index).
|
||||||
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 166 KiB |
@ -1,21 +0,0 @@
|
|||||||
|
|
||||||
<!-- Copyright Planetmint GmbH and Planetmint contributors
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0 -->
|
|
||||||
|
|
||||||
Planetmint가 자산 등록 및 전송에 적합한 방법
|
|
||||||
==========================================================
|
|
||||||
|
|
||||||
Planetmint는 모든 종류의 데이터를 저장할 수 있지만 자산 등록 및 전송을 저장하는 데 특히 유용합니다.:
|
|
||||||
|
|
||||||
* Planetmint 네트워크에 전송되어 체크되고 저장되는 (있는 경우) 트랜잭션은 기본적으로 CREATE 트랜잭션과 TRANSFER 트랜잭션의 두 가지가 있습니다.
|
|
||||||
* CREATE 트랜잭션은 임의의 메타 데이터와 함께 모든 종류의 자산 (나눌 수 없거나 분할 할 수없는)을 등록하는 데 사용할 수 있습니다.
|
|
||||||
* 저작물에는 0 명, 1 명 또는 여러 명의 소유자가있을 수 있습니다.
|
|
||||||
* 자산 소유자는 자산을 신규 소유자에게 양도하려는 사람이 만족해야하는 조건을 지정할 수 있습니다. 예를 들어 5 명의 현재 소유자 중 최소 3 명이 TRANSFER 트랜잭션에 암호를 사용해야합니다.
|
|
||||||
* Planetmint는 TRANSFER 트랜잭션의 유효성을 검사하는 과정에서 조건이 충족되었는지 확인합니다. (또한 누구나 만족하는지 확인할 수 있습니다.)
|
|
||||||
* Planetmint는 자산의 이중 지출을 방지합니다.
|
|
||||||
* 유효성이 검증 된 트랜잭션은 [변경불가능](https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/immutable-ko.md) 입니다.
|
|
||||||
|
|
||||||
Note
|
|
||||||
|
|
||||||
우리는 "소유자"라는 단어를 다소 느슨하게 사용했습니다. **보다 정확한 단어**는 이행자, 서명자, 조정자 또는 이전 가능 요소 일 수 있습니다. 관련 [Planetmint Transaction Spec](https://github.com/planetmint/BEPs/tree/master/tx-specs/)의 Owners에 대한 참고 사항 절을 참조하십시오.
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# Planetmint와 Byzantine Fault Tolerance
|
|
||||||
|
|
||||||
[Planetmint Server](https://docs.planetmint.io/projects/server/en/latest/index.html)
|
|
||||||
는 블록체인 합의와 트랜잭션 복제에 [Tendermint](https://tendermint.io/)를 사용합니다.
|
|
||||||
|
|
||||||
그리고 Tendermint 는 [Byzantine Fault Tolerant (BFT)](https://en.wikipedia.org/wiki/Byzantine_fault_tolerance).
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# Planetmint 분산 방식
|
|
||||||
|
|
||||||
분산이란 모든 것을 소유하거나 통제하는 사람이 없고, 단 하나의 실패 지점이 없다는 것을 의미합니다.
|
|
||||||
|
|
||||||
이상적으로, Planetmint 네트워크에서 각각의 노드는 다른 개인 또는 조직에 의해 소유되고 관리됩니다. 네트워크가 한 조직 내에 상주하고 있더라도, 각 노드를 다른 사용자나 부서로 제어하는 것이 좋습니다.
|
|
||||||
|
|
||||||
우리는 "Planetmint 컨소시엄" (또는 단지 "컨소시엄")은 Planetmint 네트워크의 노드를 구동하는 사람들 혹은 조직을 의미합니다. 컨소시엄은 회원제나 정책과 같은 결정을 내리기 위한 어떠한 형태의 거버넌스 요구합니다. 거버넌스 프로세스의 정확한 세부사항은 각 컨소시엄에 의해 결정되지만, 상당히 분산될 수 있습니다.
|
|
||||||
|
|
||||||
컨소시엄은 관할의 다양성과 지리적 다양성 및 기타 종류의 다양성을 증가시킴으로써 분산화(및 탄력성)를 증가시킬 수 있습니다. 이 아이디어는 [노드 다양성 부문](diversity-ko)에서 확장됩니다.
|
|
||||||
|
|
||||||
Planetmint 네트워크에는 오래된 특정한 위치를 가지는 노드가 없습니다. 모든 노드들은 동일한 소프트웨어를 실행하고 동일한 작업을 수행합니다.
|
|
||||||
|
|
||||||
만약 노드에 대한 관리자 접근 권한이 있는 경우, 해당 노드를 제거할 수 있지만(예: 해당 노드에 저장된 데이터 변경 또는 삭제), 이러한 변경 사항은 해당 노드에 분리된 상태로 유지되어야 합니다. Planetmint 네트워크는 노드의 3분의 1 이상이 손상된 경우에만 손상될 수 있습니다. 자세한 내용은 [Tendermint 문서](https://tendermint.io/docs/introduction/introduction.html)을 참조하십시오.
|
|
||||||
|
|
||||||
노드의 관리자나 슈퍼 유저도 자산을 전송할 수 없다는 점에 유의하십시오. 유효한 전송 트랜잭션을 생성하는 유일한 방법은 자산에 대한 현재 암호화 조건을 충족하는 것이며 관리자/슈퍼사용자는 필요한 정보를 가지고 있지 않기 때문에 이 작업을 수행할 수 없습니다(예: 개인 키).
|
|
||||||
|
|
||||||
노드의 관리자나 슈퍼 사용자도 자산을 전송할 수는 없다는 점을 유의하십시오. 타당한 전송 트랜잭션을 만드는 유일한 방법은 자산에 대한 현재 암호화 조건을 충족시키는 것이며, 관리자 또는 슈퍼 사용자는 필요한 정보를 가지고 있지 않기 때문에 이 작업을 수행할 수 없습니다. (예: 개인 키)
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# 노드 다양성의 종류
|
|
||||||
|
|
||||||
|
|
||||||
한 명의 유저나 이벤트가 노드의 "상당수" 부분을 제어하거나 손상시키는 것을 어렵게 만드는 절차가 수행되어야 합니다.(Planetmint 서버는 Tendermint를 사용하기 때문에 여기서 "상당수"는 노드의 1/3을 말합니다.) 아래에 쓰여진 여러 가지의 다양성을 고려해야 합니다. 모든 종류에 있어서 높은 다양성을 갖는 것은 꽤 어려운 일입니다.
|
|
||||||
|
|
||||||
1. **관할권 다양성.** 노드는 여러 합법적 관할권 내의 참여자들이 제어합니다. 이는 어떤 일을 수행하기에 이 수단들을 사용하기 어렵게 할 수 있습니다.
|
|
||||||
1. **지리적 다양성.** 서버는 지리적으로 여러 곳에 물리적으로 위치합니다. 이는 자연 재해(홍수 또는 지진 등)가 문제를 야기할 만큼 손상되기 어렵게 합니다.
|
|
||||||
1. **호스팅 다양성.** 서버는 여러 호스팅 공급자(ex. Amazon Web Services, Microsoft Azure, Digital Oceure, Rackspace)가 호스팅해야 합니다. 이는 하나의 호스팅 공급자가 '상당 수'의 노드에 영향을 미치기가 어려워집니다.
|
|
||||||
1. **일반적인 의미의 다양성.** 일반적으로 멤버십 다양성은 컨소시엄에 많은 이점을 줍니다. 예를 들어, 그것은 문제 해결에 필요한 다양한 아이디어 소스를 컨소시엄에 제공합니다.
|
|
||||||
|
|
||||||
참고: 모든 노드가 동일한 코드(ex. Planetmint의 동일한 구현)를 실행하고 있는 경우, 해당 코드의 버그를 사용하여 모든 노드를 손상시킬 수 있습니다. 이상적으로는 Planetmint 서버(예: Python, Go 등)에서 운영되고 있는 다양한 구현이 있어, 컨소시엄은 다양한 서버 구현을 할 수 있을 것입니다. 운영 체제에 대해서도 이는 유사하게 적용됩니다.
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# 어떻게 Planetmint는 불변성을 갖는가
|
|
||||||
|
|
||||||
*Imunable*이라는 단어는 "시간 경과에 따른 불변성"을 의미합니다. 예를 들어, π의 10진수 값은 변경할 수 없습니다(3.14159...).
|
|
||||||
|
|
||||||
블록체인 커뮤니티는 종종 블록체인을 "불변하다"고 설명합니다. 우리가 그 단어를 문자 그대로 해석한다면, 그것은 블록체인 데이터가 변경할 수 없거나 영구적이라는 것을 의미하는데, 이것은 말이 안됩니다. 데이터는 *변경 될 수 있습니다.* 예를 들어, 전염병이 인류를 멸종 시킬 수도 있는 것처럼 데이터는 수분에 의한 손상, 온도에 의한 손상, 엔트로피의 일반적인 증가로 인해 시간이 지남에 따라 손상될 수 있습니다.
|
|
||||||
|
|
||||||
블록체인 데이터가 일반적인 경우보다 변경(혹은 삭제)하기가 더 어려운 것은 사실입니다. 블록체인 데이터는 단순히 (의도적인) "변형 방지"에 그치지 않고 하드 드라이브의 데이터 손상과 같은 비의도적으로 발생할 수 있는 무작위 변경에도 대응합니다. 따라서 블록체인에서 "불변한다"라는 단어를 우리는 어떤 모든 의도와 목적이 *실제적으로* 불변한 것으로 해석합니다. (언어학자들은 "불변한다"라는 단어가 블록체인 커뮤니티에서 쓰이는 *기술적 용어*라고 말할 것입니다.)
|
|
||||||
|
|
||||||
블록체인 데이터는 여러 가지 방법을 통해 불변성을 가질 수 있습니다:
|
|
||||||
|
|
||||||
1. **데이터 변경 또는 삭제를 위한 API 없음.** Blockchain 소프트웨어는 일반적으로 블록체인에 저장된 데이터를 변경하거나 삭제하기 위한 API를 제공하지 않습니다. Planetmint 역시 관련한 API를 제공하지 않습니다 . 이것은 변경이나 삭제가 *다른 방식*으로 일어나는 것을 막지 못합니다. 이것은 단지 하나의 방어선일 뿐입니다.
|
|
||||||
1. **복제.** 모든 데이터는 여러 곳에 복제(복사)됩니다. 복제 팩터가 높을수록, 모든 복제본을 변경하거나 삭제하기가 더 어려워집니다.
|
|
||||||
1. **내부 감시 장치.** 모든 노드가 모든 변경 사항을 모니터링하고 허용되지 않은 변경 사항이 발생하면 적절한 조치를 취할 수 있습니다.
|
|
||||||
1. **외부 감시 장치.** 컨소시엄은 부정행위를 찾아 데이터를 모니터링하고 감사할 수 있는 검증된 제 3자를 선택할 수 있습니다. 공개적으로 읽을 수 있는 데이터를 가진 컨소시엄의 경우, 대중은 감사자 역할을 할 수 있습니다.
|
|
||||||
1. **경제적 인센티브.** 일부 블록체인 시스템은 기존의 저장된 데이터를 변경하는 데 많은 비용이 들게 합니다. 그 예로 작업 증명 및 지분 증명 시스템이 있습니다. Planetmint의 경우에는 이런 인센티브를 사용하지 않습니다.
|
|
||||||
1. 변화에 대한 손쉬운 실행 취소를 위해 오류 수정 코드와 같은 고급 기술을 사용해 데이터를 저장할 수 있습니다
|
|
||||||
1. **암호화폐의 표식**은 종종 메시지(예: 트랜잭션)가 도중에 손상되었는지 확인하고 메시지에 서명한 사용자를 확인하는 방법으로 사용됩니다. Planetmint에서는 각 트랜잭션에 한 명 이상의 당사자가 서명해야 합니다
|
|
||||||
1. **전체 또는 부분적 백업**은 때때로 자기 테이프 저장소, 기타 블록체인, 인쇄물 등에 기록될 수 있습니다.
|
|
||||||
1. **강력한 보안** 노드 소유자는 강력한 보안 정책을 채택하고 적용할 수 있습니다.
|
|
||||||
1. **노드 다양성.** 다양성으로 인해서 한 가지 요소(예: 자연 재해 또는 운영 체제 버그)가 상당 수의 노드를 손상시킬 수 없도록 합니다. [노드 다양성의 종류에 대한 섹션](https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/diversity-ko.md)을 참조하세요.
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
|
|
||||||
.. Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
|
|
||||||
Planetmint 문서
|
|
||||||
========================
|
|
||||||
|
|
||||||
블록체인 데이터베이스인 Planetmint를 만나보세요.
|
|
||||||
|
|
||||||
`분산형 <https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/decentralized_kor.md>`_, `불변성 <https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/immutable-ko.md>`_ 및 `자산에 대한 네이티브 지원 <https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/assets_ko.md>`_ 을 포함한 일부 데이터베이스 특성들과 블록체인 특성을 가지고 있습니다.
|
|
||||||
|
|
||||||
높은 수준에서, 사용자는 Planetmint HTTP API를 사용하는 Planetmint 네트워크(노드 집합) 또는 Planetmint 파이썬 드라이버와 같은 API용 래퍼로 통신할 수 있습니다. 각 Planetmint 노드는 Planetmint Server 및 다양한 다른 소프트웨어를 실행합니다. 더 자세한 사항은 용어 페이지에서 이러한 용어 중 일부를 설명합니다.
|
|
||||||
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
<style media="screen" type="text/css">
|
|
||||||
.button {
|
|
||||||
border-top: 1px solid #96d1f8;
|
|
||||||
background: #65a9d7;
|
|
||||||
background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
|
|
||||||
background: -webkit-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
background: -moz-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
background: -ms-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
background: -o-linear-gradient(top, #3e779d, #65a9d7);
|
|
||||||
padding: 8.5px 17px;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
|
|
||||||
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
|
|
||||||
box-shadow: rgba(0,0,0,1) 0 1px 0;
|
|
||||||
text-shadow: rgba(0,0,0,.4) 0 1px 0;
|
|
||||||
color: white;
|
|
||||||
font-size: 16px;
|
|
||||||
font-family: Arial, Sans-Serif;
|
|
||||||
text-decoration: none;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.button:hover {
|
|
||||||
border-top-color: #28597a;
|
|
||||||
background: #28597a;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
.button:active {
|
|
||||||
border-top-color: #1b435e;
|
|
||||||
background: #1b435e;
|
|
||||||
}
|
|
||||||
a.button:visited {
|
|
||||||
color: white
|
|
||||||
}
|
|
||||||
.buttondiv {
|
|
||||||
margin-bottom: 1.5em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="http://planetmint.io/http-api">HTTP API 문서</a>
|
|
||||||
</div>
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="http://docs.planetmint.io/projects/contributing/en/latest/index.html">Planetmint에 기여하는 법</a>
|
|
||||||
</div>
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="http://docs.planetmint.io/projects/py-driver/en/latest/index.html">파이썬 드라이버 문서</a>
|
|
||||||
</div>
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="https://docs.planetmint.io/projects/js-driver/en/latest/index.html">자바스크립트 드라이버 문서</a>
|
|
||||||
</div>
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="http://docs.planetmint.io/projects/server/en/latest/index.html">서버 문서</a>
|
|
||||||
</div>
|
|
||||||
<div class="buttondiv">
|
|
||||||
<a class="button" href="http://docs.planetmint.io/projects/server/en/latest/quickstart.html">서버 빠른 시작</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
Planetmint에 대한 추가 정보
|
|
||||||
-------------------------------------------------------
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
Planetmint Docs Home <self>
|
|
||||||
production-ready_kor
|
|
||||||
terminology_kor
|
|
||||||
decentralized_kor
|
|
||||||
diversity-ko
|
|
||||||
immutable-ko
|
|
||||||
bft-ko
|
|
||||||
query-ko
|
|
||||||
assets_ko
|
|
||||||
smart-contracts_ko
|
|
||||||
transaction-concepts_ko
|
|
||||||
store-files_ko
|
|
||||||
permissions-ko
|
|
||||||
private-data-ko
|
|
||||||
Data Models <https://docs.planetmint.io/projects/server/en/latest/data-models/index.html>
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# Planetmint 사용 권한
|
|
||||||
|
|
||||||
Planetmint를 사용하면 다른 사용자가 할 수 있는 것을 어느 정도 제어할 수 있습니다.
|
|
||||||
이 능력은 \*nix환경에서의 "권한", SQL에서의 "특권", 보안 환경에서의 "액세스 제어"와 유사합니다.
|
|
||||||
|
|
||||||
## 출력 지출/이전 권한
|
|
||||||
|
|
||||||
Planetmint에서, 모든 출력에는 연관된 조건(crypto-condition)이 있습니다.
|
|
||||||
|
|
||||||
사용되지 않은 출력을 쓰거나 전송하려면, 사용자(또는 사용자 그룹)이 조건을 충족시켜야 합니다.
|
|
||||||
특정 사용자만이 출력을 보낼 권한이 있다는 뜻입니다. 가장 단순한 조건은, "공용 키에 해당하는 개인 키를 가진 사람만이 출력을 보낼 수 있습니다." 훨씬 더 정교한 조건들도 가능합니다, 예를 들어 “이 출력을 사용하려면,…"
|
|
||||||
|
|
||||||
- "…회계 그룹의 모든 사람이 서명 할 수 있습니다."
|
|
||||||
- "…네 명 중 세 명이 서명해야 합니다."
|
|
||||||
- "…Bob이 반드시 서명해야 하거나 Tom과 Sylvia 둘 모두가 서명해야 합니다."
|
|
||||||
|
|
||||||
자세한 내용은, [Planetmint Transactions Spec](https://github.com/planetmint/BEPs/tree/master/tx-specs/)관련 **트랜잭션 구성요소:조건** 섹션을 참조하세요.
|
|
||||||
|
|
||||||
출력이 한번 소비되면 다시 사용할 수 없습니다: *아무도* 그렇게 할 권한이 없습니다. 즉, Planetmint는 누구나 출력을 "이중 소비" 하도록 허용 하지 않습니다.
|
|
||||||
|
|
||||||
## 쓰기 권한
|
|
||||||
|
|
||||||
누군가 TRANSFER 트랜잭션을 만들면, `metadata` 필드에 임의의 JSON 객체를 넣을 수 있다. (적정 범위 내에서; 실제 Planetmint 네트워크는 트랜잭션의 크기에 제한을 둔다.) 즉, TRANSFER 트랜잭션에서 원하는 모든 것을 쓸 수 있다.
|
|
||||||
|
|
||||||
Planetmint에서 "쓰기 권한"이 없다는 의미인가요? 아닙니다!!
|
|
||||||
|
|
||||||
TRANSFER 트랜잭션은 입력이 이전 출력을 충족시키는 경우에만 유효(허용)합니다. 이 출력들에 대한 조건은 누가 유효한 TRANSFER 트랜잭션을 할 수 있는지 조절 할 것입니다. 즉, 출력에 대한 조건은 특정 사용자에게 관련 자산 내역에 무엇인가 쓸 수 있는 "쓰기 권한"을 부여하는 것과 같습니다.
|
|
||||||
|
|
||||||
예를 들어, 당신은 Planetmint를 사용하여 오직 당신만이 쓰기권한이 있는 공용 저널을 작성 할 수 있습니다. 방법은 다음과 같습니다: 먼저 하나의 출력으로 `asset.data` 을 통해 `{"title": "The Journal of John Doe"}` 와 같이 되도록 CREATE 트랜잭션을 생성합니다. 이 출력에는 금액 1과 사용자(개인 키를 가진)만이 출력을 보낼 수 있는 조건이 있습니다. 저널에 무엇인가를 추가하고 싶을 때마다, `metadata` 같은 필드에 최신 항목을 넣은 TRANSFER 트랜잭션을 새로 만들어야 합니다.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{"timestamp": "1508319582",
|
|
||||||
"entry": "I visited Marmot Lake with Jane."}
|
|
||||||
```
|
|
||||||
|
|
||||||
TRANSFER 트랜잭션에는 하나의 출력이 있습니다. 이 출력에는 금액1과 사용자(개인키를 가진)만이 출력을 보낼 수 있는 조건이 있습니다. 기타 등등. 당신만이 자산 내역(당신의 저널)에 덧붙일 수 있습니다.
|
|
||||||
|
|
||||||
이와 같은 기술은 공학 노트북,공급망 기록,정부 회의록 등에도 사용 될 수 있습니다.
|
|
||||||
|
|
||||||
또한 더 정교한 것들도 할 수 있습니다. 예를 들어, 누군가가 TRANSFER 트랜잭션을 작성할 때마다, *다른 누군가*에게 사용 권한을 부여하여 일종의 작성자-전달 혹은 연쇄 편지를 설정한다.
|
|
||||||
|
|
||||||
Note
|
|
||||||
|
|
||||||
누구나 CREATE 트랜잭션의 `asset.data` 필드에 있는 JSON(조건하에)을 쓸 수 있습니다. 허가가 필요하지 않습니다.
|
|
||||||
|
|
||||||
## 읽기 권한
|
|
||||||
|
|
||||||
다음 페이지를 참고하세요, [:doc:Planetmint, Privacy and Private Data](https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/private-data-ko.md).
|
|
||||||
|
|
||||||
## 역할 기반 액세스 제어(RBAC)
|
|
||||||
|
|
||||||
2017년 9월에, 우리는 [Planetmint RBAC 하부 시스템을 정의 할 수 있는 방법에 대한 블로그 게시물](https://blog.bigchaindb.com/role-based-access-control-for-planetmint-assets-b7cada491997)을 게재 했습니다. 글을 쓴 시점(2018년 1월)에는 플러그인을 사용해야 해서, 표준 Planetmint다음에서 사용가능한 [Planetmint Testnet](https://testnet.planetmint.io/) 를 사용 할 수 없었습니다. 이는 미래에 바뀔 수 있습니다. 만약 관심이 있다면, [Planetmint로 연락하십시요.](https://www.planetmint.io/contact/)
|
|
||||||
@ -1,102 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# Planetmint, 개인정보 및 개인 데이터
|
|
||||||
|
|
||||||
## 기본 정보
|
|
||||||
|
|
||||||
1. 한도 내에서 Planetmint 네트워크에 임의의 데이터(암호화 된 데이터 포함)를 저장 할 수 있습니다. 모든 트랜잭션에는 거의 모든 유니코드 문자열(최대 길이까지)을 저장 할 수 있는 `metadata` 섹션이 있습니다. 마찬가지로, 모든 CREATE 트랜잭션에는 거의 모든 유니코드 문자열을 저장 할 수 있는 `asset.data` 섹션이 있습니다.
|
|
||||||
2. 특정 Planetmint 거래 필드에 저장된 데이터는 암호화 해서는 안됩니다, 예를 들어 공용키 및 자산과 같이. Planetmint는 Zcoin과 비슷한 개인 거래를 제공하지 않습니다.
|
|
||||||
3. 데이터가 BigchinDB 네트워크에 저장되면 변경 또는 삭제 될 수 없다고 가정하는 것이 좋습니다.
|
|
||||||
4. Planetmint 네트워크의 모든 노드에는 저장된 모든 데이터의 전체 복사본이 있습니다.
|
|
||||||
5. Planetmint 네트워크의 모든 노드는 저장된 모든 데이터를 읽을 수 있습니다.
|
|
||||||
6. Planetmint 노드(예를 들어 노드이 sysadmin)에 대한 전체 액세스 권한을 가진 모든 사용자는해당 노드에 저장된 모든 데이터를 읽을 수 있습니다.
|
|
||||||
7. Planetmint HTTP API를 통해 노드에 접근하는 모든 사용자는 Planetmint에 저장된 모든 데이터를 찾고 읽을 수 있습니다. 액세스 권한이 있는 사람들의 목록은 매우 짧을 수 있습니다.
|
|
||||||
8. 외부 사용자와 Planetmint 노드 사이의 연결이(예를 들어 HTTPS를 사용하여) 암호화되 않으면도청자는 전송중인 모든 HTTP 요청 및 응답을 읽을 수 있습니다.
|
|
||||||
9. 만약 누군가가 평문에 접근 할 수 있다면(어디에서 가져왔는지 관계없이), 원칙적으로 이것을 전 세계와 공유 할 수 있습니다. 그렇게 하는 것을 어렵게 만들 수 있습니다, 예를 들어 데이터가 많고 방을 나갈 떄 검색되는 안전한 방 안에만 들어 갈 수 있는 것과 같습니다.
|
|
||||||
|
|
||||||
## 오프 체인에서 개인 데이터 저장
|
|
||||||
|
|
||||||
시스템은 제3자 데이터베이스, 문서 저장소 또는 CMS(컨텐츠 관리 시스템)와 같은 오프 체인 데이터를 저장할 수 있으며, BigchinDB를 사용하여 다음 작업을 수행할 수 있습니다:
|
|
||||||
|
|
||||||
- 제3자 시스템에 읽기 권한 또는 기타 권한이 있는 사용자를 추적합니다. 이 작업을 수행하는 방법의 예는 아래에 있습니다.
|
|
||||||
- 제3자 시스템에 대한 모든 요청을 영구적으로 기록합니다.
|
|
||||||
- 모든 문서의 변경 사항을 감지 할 수 있도록, 다른 곳에 저장된 문서의 해시를 저장합니다.
|
|
||||||
- 암호화 된 터널을 설정했다는 것을 증명할 수 있도록 두 개의 오프 체인 파티(예:Diffie-Hellman 키 교환) 간의 모든 핸드셰이크 설정 요청 및 응답을 기록합니다(독자가 해당 터널에 액세스하지 않고). 이 아이디어에 대한 자세한 내용은 [the Planetmint Privacy Protocols 저장소](https://github.com/planetmint/privacy-protocols)에 있습니다.
|
|
||||||
|
|
||||||
특정 문서에 대한 읽기 권한을 가진 사람을 기록하는 간단한 방법은 제 3자 시스템(“Docpile“)이 모든 문서+사용자 쌍에 대해 BigchinDB 네트워크에 CREATE 트랜잭션을 저장하여 해당 사용자가 그 문서에 대한 읽기 권한을 가지고 있음을 나타낼 수 있습니다. 트랜잭션은 Docpile에 의해 서명 될 수 있습니다(또는 문서 소유자에 의해). 자산 데이터 필드는 1)사용자의 고유 ID 및 2)문서의 고유 ID를 포함합니다. CREATE 트랜잭션의 한 출력은 DocPile(또는 문서 소유자)에 의해서만 전송/소비 될 수 있습니다.
|
|
||||||
|
|
||||||
|
|
||||||
읽기 권한을 취소하기 위해, DocPile은 원래 사용자가 더 이상 해당 문서에 대한 읽기 권한을 가지고 있지 않다고 하는 메타 데이터 필드를 사용하여, 원래의 CREATE 트랜잭션에서 하나의 출력을 보내기 위한 TRANSFER 트랜잭션을 생성 할 수 있습니다.
|
|
||||||
|
|
||||||
이는 무한정으로 수행될 수 있습니다,즉.사용자가 다시 읽기 권한을 가지고 있음을 나타내기 위해 다른 TRANSFER 트랜잭션을 DocPile에서 작성할 수 있습니다.
|
|
||||||
|
|
||||||
DocPile은 CREATE → TRANSFER → TRANSFER → 사용자+문서 쌍에 대한 etc.chain 과정에서 사용자의 마지막 트랜잭션을 읽음으로써 주어진 문서에 대한 읽기 권한을 가지고 있는지 파악할 수 있습니다.
|
|
||||||
|
|
||||||
여기에 같은 일을 하는 다른 방법들이 있다. 위는 단지 하나의 예시이다.
|
|
||||||
|
|
||||||
위의 예시에서는 사용자가 소유한(통제 된)자산으로 “읽기 권한“을 취급하지 않았다는 것을 알 수 있습니다, 왜냐하면 사용 권한 자산이 사용자에게 주어 지면(사용자에 의해 양도되거나 사용자에 의해 생성된 경우) 사용자가 다시 Docpile로 전송 할 때까지 어떠한 것도 제어 할 수 없기 때문입니다(Docpile에 의해).
|
|
||||||
|
|
||||||
## 체인에서 암호화 된 개인 데이터 저장
|
|
||||||
|
|
||||||
체인상에서 개인 데이터를 암호화하여 저장하는 방법에는 여러 가지가 있습니다. 모든 유스 케이스에는 고유한 목표와 제약이 있으며, 최상의 해결책은 유스 케이스에 달려있다.
|
|
||||||
[Planetmint 컨설팅 팀](https://www.planetmint.io/services/), 우리의 파트너와 함께, 당신의유스 케이스에 가장 적합한 솔루션을 설계하는 데 도움을 줄 수 있습니다.
|
|
||||||
|
|
||||||
아래에서는 다양한 암호화 기본 설정을 사용하여 가능한 시스템을 설정하는 예제를 설명합니다.
|
|
||||||
|
|
||||||
참고 사항:
|
|
||||||
|
|
||||||
- Ed25519 키 쌍은 [메시지 암호화 및 암호 해독이 아닌](https://crypto.stackexchange.com/questions/27866/why-curve25519-for-encryption-but-ed25519-for-signatures) 암호화 서명 및 확인을 위해 설계되었습니다. 암호화의 경우, X25519와 같은 암호화를 위해 설계된 키 쌍을 사용해야 합니다.
|
|
||||||
- 누군가(또는 어떤 그룹)이 체인상의 암호화 된 데이터를 해독하는 방법을 발표하면 암호화 된 데이터에 액세스 할 수 있는 모든 사람이 평문을 가져올 수 있습니다. 데이터는 삭제할 수 없습니다.
|
|
||||||
- 암호화 된 데이터는 MongoDM에서 색인을 생성하거나 검색 할 수 없습니다.(암호문을 색인화하고 검색 할 수 있지만 유용하지는 않습니다.) 암호화 된 데이터를 색인화하고 검색하기 위해 준 유사 암호를 사용할 수 있지만, MongoDB는 이를 지원할 계획이 없습니다. 색인화 또는 키워드 검색이 필요한 경우 `asset.data`의 몇가지 필드 또는 `metadata`객체를 일반 텍스트로 남겨두고 민감한 정보를 암호화 된 하위 객체에 저장할 수 있습니다.
|
|
||||||
|
|
||||||
### 시스템 예시 1
|
|
||||||
|
|
||||||
대칭 키로 데이터를 암호화하고 체인에(`metadata` 또는 `asset.data` 에서) 암호문을 저장하십시오. 키를 제 3자에게 알리려면, 공용 키를 사용하여 대칭 키를 암호화하고 암호화 키를 보냅니다. 개인 키로 대칭 키의 암호를 해독한 다음 대칭 키를 사용하여 on-chain 암호문의 암호를 해독할 수 있습니다.
|
|
||||||
|
|
||||||
공용 키/ 개인 키 쌍과 함께 대칭 키를 사용하는 이유는 암호문을 한 번만 저장하면 되기 때문입니다.
|
|
||||||
|
|
||||||
### 시스템 예시 2
|
|
||||||
|
|
||||||
이 예시에서는 [프록시 재-암호화](https://en.wikipedia.org/wiki/Proxy_re-encryption) 를 사용합니다:
|
|
||||||
|
|
||||||
1. MegaCorp는 자체 공용 키를 사용하여 일부 데이터를 암호화 한 후 암호화 된 데이터(암호문1)을 Planetmint 네트워크에 저장합니다.
|
|
||||||
|
|
||||||
2. MegaCorp는 다른 사람들이 암호화 된 데이터를 읽을 수 있게 하고 싶지만, 공용 키를 공유하지 않고 모든 새로운 수신자에 대해 스스로를 다시 암호화 할 필요가 없습니다. 대신 프록시 재 암호화 서비스를 제공하기 위해 Moxie라는 “프록시“를 찾습니다.
|
|
||||||
3. Zorban은 MegaCorp에 연결하여 데이터 읽기 권한을 요청합니다.
|
|
||||||
4. MegaCorp는 Zorban에게 공용 키를 요청합니다.
|
|
||||||
5. MegaCorp “재 암호화 키“를 생성하여 프록시 Moxie로 전송합니다.
|
|
||||||
6. Moxie (프록시)는 재 암호화 키를 사용하여 암호문 1을 암호화하고 암호문 2를 만듭니다.
|
|
||||||
7. Moxie는 Zorban(또는 Zorban에게 전달하는 MegaCorp)에게 암호문 2를 보냅니다.
|
|
||||||
8. Zorban은 개인 키를 사용하여 암호문 2를 해독해서 원본 암호화되지 않은 데이터를 가져옵니다.
|
|
||||||
|
|
||||||
참고:
|
|
||||||
|
|
||||||
- 프록시는 암호문만 볼 수 있습니다. 암호화 되지 않은 데이터는 볼 수 없습니다.
|
|
||||||
- Zorban은 암호문 1, 즉 체인 상의 데이터를 해독 할 수 있는 능력이 없습니다.
|
|
||||||
- 위의 흐름에는 다양한 변형이 있습니다.
|
|
||||||
|
|
||||||
## 시스템 예시 3
|
|
||||||
|
|
||||||
이 예시는 [삭제 코딩](https://en.wikipedia.org/wiki/Erasure_code)을 사용합니다:
|
|
||||||
|
|
||||||
1. 데이터를 n개의 조각으로 삭제하십시오.
|
|
||||||
2. 서로 다른 암호화 키로 n개의 조각을 암호화 하십시오.
|
|
||||||
3. n 개의 암호화 된 부분을 체인에 저장합니다 (예: n개의 별도 트랜잭션).
|
|
||||||
4. n 개의 암호 해독 키 각각을 다른 당사자와 공유하십시오.
|
|
||||||
|
|
||||||
만약 k< N 인 키홀더가 k개의 조각들을 가져와서 해독한다면, 그것들은 원본 텍스트를 다시 만들 수 있습니다. k미만이면 충분하지 않습니다.
|
|
||||||
|
|
||||||
### 시스템 예시 4
|
|
||||||
|
|
||||||
이 설정은 특수 노드가 데이터의 일부를 볼 수 있어야 하지만, 다른 노드는 볼 수 없어야 하는 기업용 블록 체인 시나리오에서 사용할 수 있습니다.
|
|
||||||
|
|
||||||
- 특수 노드는 X25519 키 쌍 (또는 유사한 비대칭 *암호화*키 쌍)을 생성합니다 .
|
|
||||||
- Planetmint 최종 사용자는 특수 노드의 X25519 공용 키(암호화 키)를 찾습니다.
|
|
||||||
-최종 사용자는 위에서 언급 한 공용 키를 사용하여, asset.data 또는 메타 데이터(또는 모두)를 사용하여 유효한 Planetmint 트랜잭션을 생성합니다.
|
|
||||||
- 이는 asset.data 또는 메타 데이터의 내용이 유효성 검증에 중요하지 않은 트랜잭션에 대해서만 수행되므로, 모든 노드 운영자가 트랜잭션을 검증 할 수 있습니다.
|
|
||||||
- 특수 노드는 암호화 된 데이터를 해독 할 수 있지만, 다른 노드 운영자와 다른 최종 사용자는 할 수 없습니다.
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# 배포 - 준비
|
|
||||||
|
|
||||||
경우에 따라, Planetmint는 배포-준비가 될 수도 있고 되지 않을 수도 있습니다. 서비스 공급자에게 문의해야 합니다. 만약 Planetmint를 (배포로) 전환하고자 한다면, 서비스 공급자에게 문의하십시오.
|
|
||||||
|
|
||||||
참고 : Planetmint는 "보증 없음" 섹션을 가지는 오픈소스 라이센스이며, 이는 전형적인 오픈소스 라이센스입니다. 이는 소프트웨어 산업의 표준입니다. 예를 들어, 리눅스 커널은 라이센스에 "보증 없음" 섹션을 가지고 있지만, 수십억 대의 시스템에 의해 배포되어 사용됩니다. 보증은 대개 서비스 공급자가 소프트웨어 라이센스 수준 이상으로 제공합니다.
|
|
||||||
@ -1,202 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
-->
|
|
||||||
|
|
||||||
Planetmint 쿼리
|
|
||||||
===================
|
|
||||||
|
|
||||||
노드 operator는 MongoDB의 쿼리 엔진의 최대 성능을 사용하여 모든 트랜잭션, 자산 및 메타데이터를 포함하여 저장된 모든 데이터를 검색하고 쿼리할 수 있습니다. 노드 operator는 외부 사용자에게 얼마나 많은 쿼리 파워를 송출할지 스스로 결정할 수 있습니다.
|
|
||||||
|
|
||||||
|
|
||||||
예제 쿼리가 포함된 블로그 게시물
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
Planetmint 블로그에 MongoDB 도구를 사용하여 Planetmint 노드의 MongoDB 데이터베이스를 쿼리하는 방법에 대한 게시물을 올렸습니다. 데이터에 대한 일부 특정 예제 쿼리가 주요 내용입니다. [여기서 확인하세요](https://blog.bigchaindb.com/using-mongodb-to-query-bigchaindb-data-3fc651e0861b)
|
|
||||||
|
|
||||||
MongoDB에 연결하기
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
|
|
||||||
MongoDB 데이터베이스를 쿼리하려면 먼저 데이터베이스에 연결해야 합니다. 그러기 위해선 호스트 이름과 포트를 알아야 합니다.
|
|
||||||
|
|
||||||
개발 및 테스트를 위해 지역 컴퓨터에서 Planetmint 노드를 실행 중인 경우 호스트 이름은 "로컬 호스트"여야 하며 이러한 값을 변경하지 않는 한 포트는 "27017"이어야 합니다. 원격 시스템에서 Planetmint 노드를 실행 중이며 해당 시스템에 SSH할 수 있는 경우에도 마찬가지입니다.
|
|
||||||
|
|
||||||
원격 시스템에서 Planetmint 노드를 실행하고 MongoDB를 auth를 사용하고 공개적으로 액세스할 수 있도록 구성한 경우(권한이 있는 사용자에게) 호스트 이름과 포트를 확인할 수 있습니다.
|
|
||||||
|
|
||||||
쿼리하기
|
|
||||||
------------
|
|
||||||
|
|
||||||
Planetmint 노드 운영자는 로컬 MongoDB 인스턴스에 대한 전체 액세스 권한을 가지므로 실행하는데 MongoDB의 다음의 API를 사용할 수 있습니다:
|
|
||||||
|
|
||||||
- [the Mongo Shell](https://docs.mongodb.com/manual/mongo/)
|
|
||||||
- [MongoDB Compass](https://www.mongodb.com/products/compass)
|
|
||||||
- one of [the MongoDB drivers](https://docs.mongodb.com/ecosystem/drivers/), such as [PyMongo](https://api.mongodb.com/python/current/), or
|
|
||||||
- MongoDB 쿼리에 대한 서드파티툴, RazorSQL, Studio 3T, Mongo Management Studio, NoSQLBooster for MongoDB, or Dr. Mongo.
|
|
||||||
|
|
||||||
Note
|
|
||||||
|
|
||||||
SQL을 이용해 mongoDB 데이터베이스를 쿼리할 수 있습니다. 예를 들어:
|
|
||||||
|
|
||||||
* Studio 3T: "[How to Query MongoDB with SQL](https://studio3t.com/whats-new/how-to-query-mongodb-with-sql/)"
|
|
||||||
* NoSQLBooster for MongoDB: "[How to Query MongoDB with SQL SELECT](https://mongobooster.com/blog/query-mongodb-with-sql/)"
|
|
||||||
|
|
||||||
예를 들어, 기본 Planetmint 노드를 실행하는 시스템에 있는 경우 Mongo Shell (``mongo``)을 사용하여 연결하고 다음과 같이 볼 수 있습니다.
|
|
||||||
|
|
||||||
$ mongo
|
|
||||||
MongoDB shell version v3.6.5
|
|
||||||
connecting to: mongodb://127.0.0.1:27017
|
|
||||||
MongoDB server version: 3.6.4
|
|
||||||
...
|
|
||||||
> show dbs
|
|
||||||
admin 0.000GB
|
|
||||||
planetmint 0.000GB
|
|
||||||
config 0.000GB
|
|
||||||
local 0.000GB
|
|
||||||
> use planetmint
|
|
||||||
switched to db planetmint
|
|
||||||
> show collections
|
|
||||||
abci_chains
|
|
||||||
assets
|
|
||||||
blocks
|
|
||||||
elections
|
|
||||||
metadata
|
|
||||||
pre_commit
|
|
||||||
transactions
|
|
||||||
utxos
|
|
||||||
validators
|
|
||||||
|
|
||||||
위 예제는 몇 가지 상황을 보여줍니다:
|
|
||||||
|
|
||||||
- 호스트 이름이나 포트를 지정하지 않으면 Mongo Shell은 각각 `localhost`와 `27017`으로 가정합니다. (`localhost`는 우분투에 IP주소를 127.0.0.1로 설정했습니다.)
|
|
||||||
|
|
||||||
|
|
||||||
* Planetmint는 데이터를 `planetmint`이라는 데이터베이스에 저장합니다.
|
|
||||||
* `planetmint` 데이터베이스에는 여러 [collections](https://docs.mongodb.com/manual/core/databases-and-collections/)가 포함되어 있습니다.
|
|
||||||
* 어떤 컬렉션에도 투표가 저장되지 않습니다. 이런 데이터는 모두 자체(LevelDB) 데이터베이스에 의해 처리되고 저장됩니다.
|
|
||||||
|
|
||||||
컬렉션에 대한 예시 문서
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
``planetmint`` 데이터베이스의 가장 흥미로운 부분은 아래와 같습니다:
|
|
||||||
|
|
||||||
- transactions
|
|
||||||
- assets
|
|
||||||
- metadata
|
|
||||||
- blocks
|
|
||||||
|
|
||||||
`db.assets.findOne()` 은 MongoDB 쿼리를 사용하여 이러한 컬렉션들을 탐색할 수 있습니다.
|
|
||||||
|
|
||||||
### 트랜잭션에 대한 예시 문서
|
|
||||||
|
|
||||||
transaction 컬렉션에서 CREATE 트랜잭션에는 추가 `"_id"` 필드(MongoDB에 추가됨)가 포함되며 `"asset"`과 `"metadata"` 필드에는 데이터가 저장되어 있지 않습니다.
|
|
||||||
|
|
||||||
{
|
|
||||||
"_id":ObjectId("5b17b9fa6ce88300067b6804"),
|
|
||||||
"inputs":[…],
|
|
||||||
"outputs":[…],
|
|
||||||
"operation":"CREATE",
|
|
||||||
"version":"2.0",
|
|
||||||
"id":"816c4dd7…851af1629"
|
|
||||||
}
|
|
||||||
|
|
||||||
A TRANSFER transaction from the transactions collection is similar, but it keeps its `"asset"` field.
|
|
||||||
|
|
||||||
{
|
|
||||||
"_id":ObjectId("5b17b9fa6ce88300067b6807"),
|
|
||||||
"inputs":[…],
|
|
||||||
"outputs":[…],
|
|
||||||
"operation":"TRANSFER",
|
|
||||||
"asset":{
|
|
||||||
"id":"816c4dd7ae…51af1629"
|
|
||||||
},
|
|
||||||
"version":"2.0",
|
|
||||||
"id":"985ee697d…a3296b9"
|
|
||||||
}
|
|
||||||
|
|
||||||
### assets에 대한 예시 문서
|
|
||||||
|
|
||||||
assets에 대한 기술에는 MongoDB가 추가한 `"_id"` 분야와 CREATE 거래에서 나온 `asset.data` 그리고 `"id"` 세 가지 최상위 분야로 구성되어 있습니다.
|
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
{
|
|
||||||
"_id":ObjectId("5b17b9fe6ce88300067b6823"),
|
|
||||||
"data":{
|
|
||||||
"type":"cow",
|
|
||||||
"name":"Mildred"
|
|
||||||
},
|
|
||||||
"id":"96002ef8740…45869959d8"
|
|
||||||
}
|
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
### metadata에 대한 예시 문서
|
|
||||||
|
|
||||||
|
|
||||||
metadata 컬렉션의 문서는 MongoDB가 추가한 `"_id"`필드와 거래에서 나온 `asset.data`그리고 거래에서 나온 ``"id"`` 세 가지 최상위 분야로 구성되어 있습니다.
|
|
||||||
|
|
||||||
{
|
|
||||||
"_id":ObjectId("5b17ba006ce88300067b683d"),
|
|
||||||
"metadata":{
|
|
||||||
"transfer_time":1058568256
|
|
||||||
},
|
|
||||||
"id":"53cba620e…ae9fdee0"
|
|
||||||
}
|
|
||||||
|
|
||||||
### blocks에 대한 예시 문서
|
|
||||||
|
|
||||||
{
|
|
||||||
"_id":ObjectId("5b212c1ceaaa420006f41c57"),
|
|
||||||
"app_hash":"2b0b75c2c2…7fb2652ce26c6",
|
|
||||||
"height":17,
|
|
||||||
"transactions":[
|
|
||||||
"5f1f2d6b…ed98c1e"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
## 노드 operator가 외부 유저에게 보낼 수 있는 것
|
|
||||||
|
|
||||||
각 노드 operator는 외부 사용자가 자신의 로컬 MongoDB 데이터베이스에서 정보를 얻는 방법을 결정할 수 있습니다. 그들은 다음과 같은 것들을 보낼 수 있습니다:
|
|
||||||
|
|
||||||
- 외부유저를 쿼리 처리하는 로컬 MongoDB 데이터베이스 한된 제한된 권한을 가진 역할을 가진 MongoDB 사용자 예) read-only
|
|
||||||
- 제한된 미리 정의된 쿼리 집합을 허용하는 제한된 HTTP API, [Planetmint 서버에서 제공하는 HTTP API](http://planetmint.io/http-api), 혹은Django, Express, Ruby on Rails, or ASP.NET.를 이용해 구현된 커스텀 HTTP API
|
|
||||||
- 다른 API(예: GraphQL API) 제3자의 사용자 정의 코드 또는 코드를 사용하여 수행할 수 있습니다..
|
|
||||||
|
|
||||||
각 노드 operator는 로컬 MongoDB 데이터베이스에 대한 다른 레벨 또는 유형의 액세스를 노출할 수 있습니다.
|
|
||||||
예를 들어, 한 노드 operator가 최적화된 [공간 쿼리](https://docs.mongodb.com/manual/reference/operator/query-geospatial/)를 전문으로 제공하기로 정할 수 있습니다.
|
|
||||||
|
|
||||||
보안 고려사항
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Planetmint 버전 1.3.0 이전 버전에서는 하나의 MongoDB 논리 데이터베이스가 있었기 때문에 외부 사용자에게 데이터베이스를 노출하는 것은 매우 위험했으며 권장되지 않습니다. "Drop database"는 공유된 MongoDB 데이터베이스를 삭제합니다.
|
|
||||||
|
|
||||||
Planetmint 버전 2.0.0 이상에선 각 노드에 고유한 독립 로컬 MongoDB 데이터베이스가 존재합니다. 노드 간 통신은 아래 그림 1에서와 같이 MongoDB 프로토콜이 아닌 Tendermint 프로토콜을 사용하여 수행됩니다. 노드의 로컬 MongoDB 데이터베이스가 손상되어도 다른 노드는 영향을 받지 않습니다.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Figure 1: A Four-Node Planetmint 2.0 Network
|
|
||||||
|
|
||||||
퍼포먼스 및 요금 고려사항
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
쿼리 프로세싱은 상당히 많은 리소스를 소모할 수 있으므로, Planetmint 서버 및 Tendermint Core와 별도의 컴퓨터에서 MongoDB를 실행하는 것이 좋습니다.
|
|
||||||
|
|
||||||
노드 operator 는 조회에 사용되는 리소스를 측정하여 조회를 요청한 사람은 누구든지 요금을 청구할 수 있습니다.
|
|
||||||
|
|
||||||
일부 쿼리는 너무 오래 걸리거나 리소스를 너무 많이 사용할 수 있습니다. 노드 operator는 사용할 수 있는 리소스에 상한을 두고, 초과된다면 중지(또는 차단)해야 합니다.
|
|
||||||
|
|
||||||
MongoDB 쿼리를 더욱 효율적으로 만들기 위해 [인덱스](https://docs.mongodb.com/manual/indexes/)를 만들 수 있습니다. 이러한 인덱스는 노드 operator 또는 일부 외부 사용자가 생성할 수 있습니다(노드 운영자가 허용하는 경우). 인덱스는 비어 있지 않습니다. 새 데이터를 컬렉션에 추가할 때마다 해당 인덱스를 업데이트해야 합니다. 노드 운영자는 이러한 요금을 인덱스를 생성한 사람에게 전달하고자 할 수 있습니다. mongoDB에서는 [단일 컬렉션은 64개 이하의 인덱스를 가질 수 있습니다](https://docs.mongodb.com/manual/reference/limits/#Number-of-Indexes-per-Collection).
|
|
||||||
|
|
||||||
Tendermint voting 파워가 0인 노드인 추종자 노드를 생성할 수 있다. 여전히 모든 데이터의 복사본이 있으므로 읽기 전용 노드로 사용할 수 있습니다. Follower 노드는 투표 검증자의 작업 부하에 영향을 미치지 않고 서비스로 전문화된 쿼리를 제공할 수 있습니다(쓰기도 가능). 팔로워의 팔로워들도 있을 수 있습니다.
|
|
||||||
|
|
||||||
자바스크립트 쿼리 코드 예시
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
[MongoDB node.js 드라이버](https://mongodb.github.io/node-mongodb-native/?jmp=docs)와 같은 MongoDB 드라이버를 사용하여 다음 중 하나를 사용하여 노드의 MongoDB 데이터베이스에 연결할 수 있습니다. 여기 자바스크립트 쿼리 코드에 대한 링크가 있습니다.
|
|
||||||
|
|
||||||
- [The Planetmint JavaScript/Node.js driver source code](https://github.com/bigchaindb/js-bidchaindb-driver)
|
|
||||||
- [Example code by @manolodewiner](https://github.com/manolodewiner/query-mongodb-bigchaindb/blob/master/queryMongo.js)
|
|
||||||
- [More example code by @manolodewiner](https://github.com/bigchaindb/bigchaindb/issues/2315#issuecomment-392724279)
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
-->
|
|
||||||
|
|
||||||
Planetmint 및 스마트계약
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Planetmint에는 스마트 계약 (즉, 컴퓨터 프로그램)의 소스 코드를 저장할 수 있지만 Planetmint는 임의의 스마트 계약을 실행하지 않습니다.
|
|
||||||
|
|
||||||
Planetmint는 대체 가능한 자산과 대체 할 수없는 자산 모두를 전송할 수있는 권한을 가진 사람을 시행하는 데 사용할 수 있습니다. 이중 지출을 막을 것입니다. 즉, ERC-20 (대체 가능한 토큰) 또는 ERC-721 (대체 할 수없는 토큰) 스마트 계약 대신 Planetmint 네트워크를 사용할 수 있습니다.
|
|
||||||
|
|
||||||
자산 이전 권한은 쓰기 권한으로 해석 될 수 있으므로 로그, 저널 또는 감사 내역에 기록 할 수있는 사람을 제어하는데 사용할 수 있습니다. [Planetmint의 사용 권한](https://github.com/planetmint/planetmint/blob/master/docs/root/source/korean/permissions-ko.md)에 대한 자세한 내용은 페이지에서 확인하십시오.
|
|
||||||
|
|
||||||
Planetmint 네트워크는 oracles 또는 체인 간 통신 프로토콜을 통해 다른 블록 체인 네트워크에 연결할 수 있습니다. 이는 Planetmint를 다른 블록 체인을 사용하여 임의의 스마트 계약을 실행하는 솔루션의 일부로 사용할 수 있음을 의미합니다.
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# Planetmint에 파일을 저장하는 방법
|
|
||||||
|
|
||||||
Planetmint 네트워크에 파일을 저장할 수는 있지만 그렇게하지 않는 것이 좋습니다. 파일이 아닌 구조화 된 데이터를 저장, 인덱싱 및 쿼리하는 데 가장 적합합니다.
|
|
||||||
|
|
||||||
분산 된 파일 저장소를 원하면 Storj, Sia, Swarm 또는 IPFS / Filecoin을 확인하십시오. 파일 URL, 해시 또는 기타 메타 데이터를 Planetmint 네트워크에 저장할 수 있습니다.
|
|
||||||
|
|
||||||
Planetmint 네트워크에 파일을 저장해야하는 경우,이를 수행하는 한 가지 방법은 긴 Base64 문자열로 변환 한 다음 해당 문자열을 하나 이상의 Planetmint 트랜잭션 (CREATE 트랜잭션의 `asset.data`)에 저장하는 것입니다 , 또는 어떤 거래의 `메타데이터` 일 수도있다.
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# 용어
|
|
||||||
|
|
||||||
Planetmint와 관련돈 몇 가지 전문화된 용어가 있습니다. 시작하기에 앞서, 최소한 다음과 같은 사항을 알아야합니다.
|
|
||||||
|
|
||||||
## Planetmint 노드
|
|
||||||
|
|
||||||
**Planetmint 노드**는 [Planetmint 서버](https://docs.planetmint.io/projects/server/en/latest/introduction.html) 및 관련된 소프트웨어를 실행하는 시스템(또는 논리적인 시스템)입니다. 각각의 노드는 한 개인이나 조직에 의해 제어될 수 있습니다.
|
|
||||||
|
|
||||||
## Planetmint 네트워크
|
|
||||||
|
|
||||||
Planetmint 노드들의 집합은 서로 연결하여 **Planetmint 네트워크**를 형성할 수 있습니다. 해당 네트워크에서 각각의 노드는 동일한 소프트웨어를 실행합니다. Planetmint 네트워크는 모니터링 같은 것들을 하기 위한 추가적인 시스템이 있을 수 있습니다.
|
|
||||||
|
|
||||||
## Planetmint 컨소시엄
|
|
||||||
|
|
||||||
Planetmint 네트워크에 노드들을 실행하는 사람과 조직은 **Planetmint 컨소시엄**(즉, 다른 조직)에 속합니다. 컨소시엄은 결정을 하기 위해 일종의 거버넌스 구조를 가져야합니다. 만약 Planetmint 네트워크가 단 하나의 회사에 의해서 운영된다면, "컨소시엄"은 단지 그 회사일 뿐입니다.
|
|
||||||
|
|
||||||
**Planetmint 네트워크와 컨소시엄의 차이는 무엇일까요?**
|
|
||||||
|
|
||||||
Planetmint 네트워크는 단지 연결된 노드들의 집합입니다. 컨소시엄은 하나의 Planetmint 네트워크를 가지는 조직이며, 해당 네트워크에서 각각의 노드는 다른 운영자를 가집니다.
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
<!---
|
|
||||||
Copyright © 2020 Interplanetary Database Association e.V.,
|
|
||||||
Planetmint and IPDB software contributors.
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
|
||||||
--->
|
|
||||||
|
|
||||||
# 트랜잭션 개념
|
|
||||||
|
|
||||||
*트랜잭션*은 물건 (예 : 자산)을 등록, 발행, 생성 또는 전송하는 데 사용됩니다.
|
|
||||||
|
|
||||||
트랜잭션은 Planetmint가 저장하는 가장 기본적인 종류의 레코드입니다. CREATE 트랜잭션과 TRANSFER 트랜잭션의 두 종류가 있습니다.
|
|
||||||
|
|
||||||
|
|
||||||
## 트랜잭션 생성
|
|
||||||
|
|
||||||
CREATE 트랜잭션은 Planetmint에서 한 가지 (또는 자산)의 이력을 등록, 발행, 생성 또는 다른 방법으로 시작하는 데 사용될 수 있습니다. 예를 들어, 신원이나 창작물을 등록 할 수 있습니다. 이러한 것들을 종종 "자산"이라고 부르지만 literal 자산이 아닐 수도 있습니다.
|
|
||||||
|
|
||||||
Planetmint는 Planetmint Server v0.8.0부터 나눌 수있는 자산을 지원합니다. 이는 "공유"의 초기 숫자로 자산을 생성 / 등록 할 수 있음을 의미합니다. 예를 들어, CREATE 트랜잭션은 50 개의 오크 나무로 된 트럭로드를 등록 할 수 있습니다. 분할 가능한 자산의 각 주식은 서로 공유 할 수 있어야합니다. 주식은 대체 가능해야합니다.
|
|
||||||
|
|
||||||
CREATE 트랜잭션은 하나 이상의 출력을 가질 수 있습니다. 각 출력에는 관련 금액이 있습니다. 출력에 연결된 공유 수입니다. 예를 들어 자산이 50 개의 오크 나무로 구성되어있는 경우 한 출력에는 한 소유자 세트에 35 개의 오크 나무가 있고 다른 출력에는 다른 소유자 세트에는 15 개의 오크 나무가있을 수 있습니다.
|
|
||||||
|
|
||||||
또한 각 출력에는 연관된 조건이 있습니다. 출력을 전송 / 소비하기 위해 충족되어야하는 조건 (TRANSFER 트랜잭션에 의해). Planetmint는 다양한 조건을 지원합니다. 자세한 내용은 관련 [Planetmint 트랜잭션 Spec](https://github.com/planetmint/BEPs/tree/master/tx-specs/)과 관련된 **트랜잭션 구성 요소 : 조건 섹션**을 참조하십시오.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
위의 예제에서는 Planetmint CREATE 트랜잭션 다이어그램을 보여줍니다. Pam은 자산 3 주를 소유 / 통제하고 다른 주식은 없습니다 (다른 산출물이 없으므로).
|
|
||||||
|
|
||||||
각 출력에는 해당 출력의 조건과 연관된 모든 공개 키 목록이 있습니다. 다시 말하면, 그 목록은 "소유자"의 목록으로 해석 될 수 있습니다.보다 정확한 단어는 이행자, 서명자, 컨트롤러 또는 이전 가능 요소 일 수 있습니다. 관련 [Planetmint Transactions Spec](https://github.com/planetmint/BEPs/tree/master/tx-specs/) **소유자에 관한 참고 사항** 섹션을 참조하십시오.
|
|
||||||
|
|
||||||
CREATE 트랜잭션은 모든 소유자가 서명해야합니다. (만약 당신이 그 서명을 원한다면, 그것은 인코딩되었지만 하나의 입력의 "이행"에있다.)
|
|
||||||
|
|
||||||
## 트랜잭션 이전
|
|
||||||
|
|
||||||
트랜잭션 이전은 다른 트랜잭션 (CREATE 트랜잭션 또는 다른 TRANSFER 트랜잭션)에서 하나 이상의 출력을 전송 / 소비 할 수 있습니다. 이러한 출력물은 모두 동일한 자산과 연결되어야합니다. TRANSFER 트랜잭션은 한 번에 하나의 자산의 공유 만 전송할 수 있습니다.
|
|
||||||
|
|
||||||
트랜잭션 이전의 각 입력은 다른 트랜잭션의 한 출력에 연결됩니다. 각 입력은 전송 / 소비하려는 출력의 조건을 충족해야합니다.
|
|
||||||
|
|
||||||
트랜잭션 이전은 위에서 설명한 CREATE 트랜잭션과 마찬가지로 하나 이상의 출력을 가질 수 있습니다. 투입물에 들어오는 총 주식 수는 산출물에서 나가는 총 주식 수와 같아야합니다.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
위 그림은 두 개의 Planetmint 트랜잭션, CREATE 트랜잭션 및 TRANSFER 트랜잭션의 다이어그램을 보여줍니다. CREATE 트랜잭션은 이전 다이어그램과 동일합니다. TRANSFER 트랜잭션은 Pam의 출력을 소비하므로 TRANSFER 트랜잭션의 입력에는 Pam의 유효한 서명 (즉, 유효한 이행)이 포함되어야합니다. TRANSFER 트랜잭션에는 두 개의 출력이 있습니다. Jim은 하나의 공유를 가져오고 Pam은 나머지 두 개의 공유를 가져옵니다.
|
|
||||||
|
|
||||||
용어 : "Pam, 3"출력을 "소비 된 트랜잭션 출력"이라고하며 "Jim, 1"및 "Pam, 2"출력을 "사용되지 않은 트랜잭션 출력"(UTXO)이라고합니다.
|
|
||||||
|
|
||||||
**예제 1:** 빨간 차가 Joe가 소유하고 관리한다고 가정합니다. 자동차의 현재 전송 조건에서 Joe가 유효한 전송을 서명해야한다고 가정합니다. Joe는 Joe의 서명 (현재 출력 조건을 충족시키기 위해)과 Rae가 유효한 전송을 서명해야한다는 새로운 출력 조건을 포함하는 입력을 포함하는 TRANSFER 트랜잭션을 작성할 수 있습니다.
|
|
||||||
|
|
||||||
**예제 2:** 예를 들어 동일한 자산 유형의 이전에 전송되지 않은 4 개의 자산에 대한 출력 조건을 충족하는 TRANSFER 트랜잭션을 생성 할 수 있습니다. 종이 클립. 총 금액은 20, 10, 45 및 25 일 수 있으며, 말하자면 총 100 개의 클립입니다. 또한 TRANSFER 트랜잭션은 새로운 전송 조건을 설정합니다. 예를 들어, Gertrude가 서명하는 경우에만 60 개의 클립 클립이 전송 될 수 있으며 Jack과 Kelly가 서명하는 경우에만 40 개의 클립 클립이 전송 될 수 있습니다. 들어오는 클립 클립의 합계가 나가는 클립 클립의 합계와 같아야합니다 (100).
|
|
||||||
|
|
||||||
## 트랜잭션 유효성
|
|
||||||
|
|
||||||
언제 트랜잭션이 유효한지 유효성을 검사하는 것에 관해 해당 블로그에 게시되어있습니다. *The Planetmint Blog*:
|
|
||||||
["What is a Valid Transaction in Planetmint?"](https://blog.bigchaindb.io/what-is-a-valid-transaction-in-bigchaindb-9a1a075a9598) (Note: That post was about Planetmint Server v1.0.0.)
|
|
||||||
|
|
||||||
Each [Planetmint Transactions Spec](https://github.com/planetmint/BEPs/tree/master/tx-specs/) documents the conditions for a transaction (of that version) to be valid.
|
|
||||||
|
|
||||||
## 트랜잭션 예시
|
|
||||||
|
|
||||||
아래의 [HTTP API 문서](https://docs.planetmint.io/projects/server/en/latest/http-client-server-api.html)와 [the Python 드라이버 문서](https://docs.planetmint.io/projects/py-driver/en/latest/usage.html)에는 예제 Planetmint 트랜잭션이 있습니다.
|
|
||||||
.
|
|
||||||
@ -4,16 +4,15 @@
|
|||||||
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
Code is Apache-2.0 and docs are CC-BY-4.0
|
Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
Network setup
|
Networks & Federations
|
||||||
=============
|
######################
|
||||||
|
|
||||||
|
|
||||||
There are several ways to setup a network. You can use the Kubernetes deployment template in this section, or use the Ansible solution in the Contributing section. Also, you can setup a single node on your machine and connect to an existing network.
|
There are several ways to setup a network. You can use the Kubernetes deployment template in this section, or use the Ansible solution in the Contributing section. Also, you can setup a single node on your machine and connect to an existing network.
|
||||||
|
|
||||||
.. toctree::
|
.. include:: networks.md
|
||||||
:maxdepth: 1
|
:parser: myst_parser.sphinx_
|
||||||
|
.. include:: network-setup.md
|
||||||
networks
|
:parser: myst_parser.sphinx_
|
||||||
network-setup
|
.. include:: k8s-deployment-template/index.rst
|
||||||
k8s-deployment-template/index
|
|
||||||
planetmint-node-ansible.md
|
|
||||||
|
|
||||||