mirror of https://github.com/certusone/dc4bc.git
Merge branch 'master' into feat/logging-starting-stage
This commit is contained in:
commit
62bc7032e3
17
HowTo.md
17
HowTo.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
Clone the project repository:
|
||||
```
|
||||
git clone git@github.com:depools/dc4bc.git
|
||||
git clone git@github.com:lidofinance/dc4bc.git
|
||||
```
|
||||
|
||||
#### Installation (Linux)
|
||||
|
@ -92,7 +92,7 @@ Print your communication public key and encryption public key and save it somewh
|
|||
$ ./dc4bc_cli get_pubkey --listen_addr localhost:8080
|
||||
EcVs+nTi4iFERVeBHUPePDmvknBx95co7csKj0sZNuo=
|
||||
# Inside the airgapped shell:
|
||||
>>> show_dkg_pub_key
|
||||
>>> show_dkg_pubkey
|
||||
sN7XbnvZCRtg650dVCCpPK/hQ/rMTSlxrdnvzJ75zV4W/Uzk9suvjNPtyRt7PDXLDTGNimn+4X/FcJj2K6vDdgqOrr9BHwMqJXnQykcv3IV0ggIUjpMMgdbQ+0iSseyq
|
||||
```
|
||||
|
||||
|
@ -106,12 +106,12 @@ Example of start_dkg_propose.json file structure:
|
|||
"SigningThreshold": 2,
|
||||
"Participants": [
|
||||
{
|
||||
"Addr": "e0d8083f8a2d18f310bfbdc9649a83664470f46053ab53c105a054b08f9eff85",
|
||||
"Username": "john_doe",
|
||||
"PubKey": "EcVs+nTi4iFERVeBHUPePDmvknBx95co7csKj0sZNuo=",
|
||||
"DkgPubKey": "sN7XbnvZCRtg650dVCCpPK/hQ/rMTSlxrdnvzJ75zV4W/Uzk9suvjNPtyRt7PDXLDTGNimn+4X/FcJj2K6vDdgqOrr9BHwMqJXnQykcv3IV0ggIUjpMMgdbQ+0iSseyq"
|
||||
},
|
||||
{
|
||||
"Addr": "addr2",
|
||||
"Username": "jane_doe",
|
||||
"PubKey": "cHVia2V5Mg==",
|
||||
"DkgPubKey": "ZGtnX3B1YmtleV8y"
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ The message will be consumed by your node:
|
|||
[john_doe] starting to poll messages from append-only log...
|
||||
[john_doe] Starting HTTP server on address: localhost:8080
|
||||
[john_doe] Handling message with offset 0, type event_sig_proposal_init
|
||||
[john_doe] message event_sig_proposal_init done successfully from e0d8083f8a2d18f310bfbdc9649a83664470f46053ab53c105a054b08f9eff85
|
||||
[john_doe] message event_sig_proposal_init done successfully from john_doe
|
||||
[john_doe] Successfully processed message with offset 0, type event_sig_proposal_init
|
||||
```
|
||||
|
||||
|
@ -181,7 +181,7 @@ Operation successfully scanned
|
|||
|
||||
After scanning the response, a message is send to the message board. When all participants perform the necessary operations, the node will proceed to the next step:
|
||||
```
|
||||
[john_doe] message event_sig_proposal_confirm_by_participant done successfully from b8c083cd717b9958e141be5956bab1e463a7a0d85e4fe8924833601d43d671c4
|
||||
[john_doe] message event_sig_proposal_confirm_by_participant done successfully from john_doe
|
||||
```
|
||||
Further actions are repetitive. Check for new pending operations:
|
||||
```
|
||||
|
@ -202,9 +202,8 @@ Now we have to collectively sign a message. Some participant will run the comman
|
|||
# Inside dc4bc_airgapped prompt:
|
||||
$ >>> show_finished_dkg
|
||||
AABB10CABB10
|
||||
$ echo "the message to sign" | base64
|
||||
dGhlIG1lc3NhZ2UgdG8gc2lnbgo=
|
||||
$ ./dc4bc_cli sign_data AABB10CABB10 dGhlIG1lc3NhZ2UgdG8gc2lnbgo= --listen_addr localhost:8080
|
||||
$ echo "the message to sign" > data.txt
|
||||
$ ./dc4bc_cli sign_data AABB10CABB10 data.txt --listen_addr localhost:8080
|
||||
```
|
||||
Further actions are repetitive and are similar to the DKG procedure. Check for new pending operations, feed them to `dc4bc_airgapped`, pass the responses to the client, then wait for new operations, etc. After some back and forth you'll see the node tell you that the signature is ready:
|
||||
```
|
||||
|
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
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.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is 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. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
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.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
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. Use with the GNU Affero General Public License.
|
||||
|
||||
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 Affero 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 special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 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 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 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
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU 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 the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
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 GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
@ -11,14 +11,14 @@ import (
|
|||
|
||||
"github.com/corestario/kyber"
|
||||
"github.com/corestario/kyber/encrypt/ecies"
|
||||
client "github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/dkg"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/qr"
|
||||
client "github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/dkg"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/qr"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
|
@ -78,6 +78,10 @@ func (am *Machine) SetQRProcessorFramesDelay(delay int) {
|
|||
am.qrProcessor.SetDelay(delay)
|
||||
}
|
||||
|
||||
func (am *Machine) CloseCameraReader() {
|
||||
am.qrProcessor.CloseCameraReader()
|
||||
}
|
||||
|
||||
func (am *Machine) SetQRProcessorChunkSize(chunkSize int) {
|
||||
am.qrProcessor.SetChunkSize(chunkSize)
|
||||
}
|
||||
|
@ -260,8 +264,7 @@ func (am *Machine) HandleQR() (string, error) {
|
|||
return "", fmt.Errorf("failed to marshal operation: %w", err)
|
||||
}
|
||||
|
||||
qrPath := filepath.Join(am.resultQRFolder, fmt.Sprintf("%s_%s_%s.gif", resultOperation.Type, resultOperation.ID,
|
||||
resultOperation.To))
|
||||
qrPath := filepath.Join(am.resultQRFolder, fmt.Sprintf("dc4bc_qr_%s-response.gif", resultOperation.ID))
|
||||
if err = am.qrProcessor.WriteQR(qrPath, operationBz); err != nil {
|
||||
return "", fmt.Errorf("failed to write QR: %w", err)
|
||||
}
|
||||
|
|
|
@ -12,15 +12,15 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
client "github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/google/uuid"
|
||||
client "github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -147,7 +147,7 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
}
|
||||
entry := &responses.SignatureProposalParticipantInvitationEntry{
|
||||
ParticipantId: n.ParticipantID,
|
||||
Addr: n.Participant,
|
||||
Username: n.Participant,
|
||||
Threshold: threshold,
|
||||
DkgPubKey: pubKey,
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
}
|
||||
entry := &responses.DKGProposalPubKeysParticipantEntry{
|
||||
ParticipantId: n.ParticipantID,
|
||||
Addr: n.Participant,
|
||||
Username: n.Participant,
|
||||
DkgPubKey: pubKey,
|
||||
}
|
||||
getCommitsRequest = append(getCommitsRequest, entry)
|
||||
|
@ -198,7 +198,7 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
for _, req := range n.commits {
|
||||
p := responses.DKGProposalCommitParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgCommit: req.Commit,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
|
@ -222,7 +222,7 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
for _, req := range n.deals {
|
||||
p := responses.DKGProposalDealParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgDeal: req.Deal,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
|
@ -246,7 +246,7 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
for _, req := range n.responses {
|
||||
p := responses.DKGProposalResponseParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgResponse: req.Response,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
|
@ -300,7 +300,7 @@ func TestAirgappedAllSteps(t *testing.T) {
|
|||
for _, req := range n.partialSigns {
|
||||
p := responses.SigningProcessParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
PartialSign: req.PartialSign,
|
||||
}
|
||||
payload.Participants = append(payload.Participants, &p)
|
||||
|
@ -371,7 +371,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
|
|||
}
|
||||
entry := &responses.SignatureProposalParticipantInvitationEntry{
|
||||
ParticipantId: n.ParticipantID,
|
||||
Addr: n.Participant,
|
||||
Username: n.Participant,
|
||||
Threshold: threshold,
|
||||
DkgPubKey: pubKey,
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
|
|||
}
|
||||
entry := &responses.DKGProposalPubKeysParticipantEntry{
|
||||
ParticipantId: n.ParticipantID,
|
||||
Addr: n.Participant,
|
||||
Username: n.Participant,
|
||||
DkgPubKey: pubKey,
|
||||
}
|
||||
getCommitsRequest = append(getCommitsRequest, entry)
|
||||
|
@ -422,7 +422,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
|
|||
for _, req := range n.commits {
|
||||
p := responses.DKGProposalCommitParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgCommit: req.Commit,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
|
@ -484,7 +484,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
|
|||
for _, req := range n.deals {
|
||||
p := responses.DKGProposalDealParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgDeal: req.Deal,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
|
@ -508,7 +508,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
|
|||
for _, req := range n.responses {
|
||||
p := responses.DKGProposalResponseParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
DkgResponse: req.Response,
|
||||
}
|
||||
payload = append(payload, &p)
|
||||
|
@ -562,7 +562,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
|
|||
for _, req := range n.partialSigns {
|
||||
p := responses.SigningProcessParticipantEntry{
|
||||
ParticipantId: req.ParticipantId,
|
||||
Addr: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
Username: fmt.Sprintf("Participant#%d", req.ParticipantId),
|
||||
PartialSign: req.PartialSign,
|
||||
}
|
||||
payload.Participants = append(payload.Participants, &p)
|
||||
|
|
|
@ -3,15 +3,14 @@ package airgapped
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/corestario/kyber/pairing"
|
||||
|
||||
"github.com/corestario/kyber/sign/bls"
|
||||
"github.com/corestario/kyber/sign/tbls"
|
||||
client "github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
client "github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
)
|
||||
|
||||
// handleStateSigningAwaitConfirmations returns a confirmation of participation to create a threshold signature for a data
|
||||
|
@ -108,7 +107,8 @@ func (am *Machine) reconstructThresholdSignature(o *client.Operation) error {
|
|||
}
|
||||
|
||||
response := client.ReconstructedSignature{
|
||||
Data: payload.SrcPayload,
|
||||
SigningID: payload.SigningId,
|
||||
SrcPayload: payload.SrcPayload,
|
||||
Signature: reconstructedSignature,
|
||||
DKGRoundID: o.DKGIdentifier,
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ import (
|
|||
|
||||
"github.com/corestario/kyber"
|
||||
dkgPedersen "github.com/corestario/kyber/share/dkg/pedersen"
|
||||
client "github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/dkg"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
client "github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/dkg"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
)
|
||||
|
||||
func createMessage(o client.Operation, data []byte) storage.Message {
|
||||
|
@ -113,7 +113,7 @@ func (am *Machine) handleStateDkgCommitsAwaitConfirmations(o *client.Operation)
|
|||
if err = pubKey.UnmarshalBinary(entry.DkgPubKey); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal pubkey: %w", err)
|
||||
}
|
||||
dkgInstance.StorePubKey(entry.Addr, entry.ParticipantId, pubKey)
|
||||
dkgInstance.StorePubKey(entry.Username, entry.ParticipantId, pubKey)
|
||||
}
|
||||
|
||||
if err = dkgInstance.InitDKGInstance(am.baseSeed); err != nil {
|
||||
|
@ -182,7 +182,7 @@ func (am *Machine) handleStateDkgDealsAwaitConfirmations(o *client.Operation) er
|
|||
}
|
||||
dkgCommits = append(dkgCommits, commit)
|
||||
}
|
||||
dkgInstance.StoreCommits(entry.Addr, dkgCommits)
|
||||
dkgInstance.StoreCommits(entry.Username, dkgCommits)
|
||||
}
|
||||
|
||||
deals, err := dkgInstance.GetDeals()
|
||||
|
@ -245,7 +245,7 @@ func (am *Machine) handleStateDkgResponsesAwaitConfirmations(o *client.Operation
|
|||
if err = json.Unmarshal(decryptedDealBz, &deal); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal deal")
|
||||
}
|
||||
dkgInstance.StoreDeal(entry.Addr, &deal)
|
||||
dkgInstance.StoreDeal(entry.Username, &deal)
|
||||
}
|
||||
|
||||
processedResponses, err := dkgInstance.ProcessDeals()
|
||||
|
@ -298,7 +298,7 @@ func (am *Machine) handleStateDkgMasterKeyAwaitConfirmations(o *client.Operation
|
|||
if err = json.Unmarshal(entry.DkgResponse, &entryResponses); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal responses: %w", err)
|
||||
}
|
||||
dkgInstance.StoreResponses(entry.Addr, entryResponses)
|
||||
dkgInstance.StoreResponses(entry.Username, entryResponses)
|
||||
}
|
||||
|
||||
if err = dkgInstance.ProcessResponses(); err != nil {
|
||||
|
|
|
@ -5,12 +5,16 @@ import (
|
|||
"crypto/cipher"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"golang.org/x/crypto/scrypt"
|
||||
"io"
|
||||
"math"
|
||||
|
||||
"golang.org/x/crypto/scrypt"
|
||||
)
|
||||
|
||||
var N = int(math.Pow(2, 16))
|
||||
|
||||
func encrypt(key, salt, data []byte) ([]byte, error) {
|
||||
derivedKey, err := scrypt.Key(key, salt, 32768, 8, 1, 32)
|
||||
derivedKey, err := scrypt.Key(key, salt, N, 8, 1, 32)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -34,7 +38,7 @@ func encrypt(key, salt, data []byte) ([]byte, error) {
|
|||
}
|
||||
|
||||
func decrypt(key, salt, data []byte) ([]byte, error) {
|
||||
derivedKey, err := scrypt.Key(key, salt, 32768, 8, 1, 32)
|
||||
derivedKey, err := scrypt.Key(key, salt, N, 8, 1, 32)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
bls12381 "github.com/corestario/kyber/pairing/bls12381"
|
||||
|
||||
client "github.com/depools/dc4bc/client/types"
|
||||
client "github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/depools/dc4bc/dkg"
|
||||
"github.com/lidofinance/dc4bc/dkg"
|
||||
"github.com/syndtr/goleveldb/leveldb/util"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,22 +11,22 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
|
||||
sipf "github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
sipf "github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
|
||||
spf "github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
spf "github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/state_machines"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
dpf "github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/qr"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
dpf "github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/qr"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -146,11 +146,13 @@ func (c *BaseClient) processSignature(message storage.Message) error {
|
|||
if err = json.Unmarshal(message.Data, &signature); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal reconstructed signature: %w", err)
|
||||
}
|
||||
signature.Participant = message.SenderAddr
|
||||
signature.Username = message.SenderAddr
|
||||
signature.DKGRoundID = message.DkgRoundID
|
||||
return c.state.SaveSignature(signature)
|
||||
}
|
||||
|
||||
func (c *BaseClient) ProcessMessage(message storage.Message) error {
|
||||
// save broadcasted reconstructed signature
|
||||
if fsm.Event(message.Event) == types.SignatureReconstructed {
|
||||
if err := c.processSignature(message); err != nil {
|
||||
return fmt.Errorf("failed to process signature: %w", err)
|
||||
|
@ -160,6 +162,14 @@ func (c *BaseClient) ProcessMessage(message storage.Message) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// save signing data to the same storage as we save signatures
|
||||
// This allows easy to view signing data by CLI-command
|
||||
if fsm.Event(message.Event) == sipf.EventSigningStart {
|
||||
if err := c.processSignature(message); err != nil {
|
||||
return fmt.Errorf("failed to process signature: %w", err)
|
||||
}
|
||||
}
|
||||
fsmInstance, err := c.getFSMInstance(message.DkgRoundID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to getFSMInstance: %w", err)
|
||||
|
@ -230,7 +240,7 @@ func (c *BaseClient) ProcessMessage(message storage.Message) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to get SigningQuorumParticipant: %w", err)
|
||||
}
|
||||
if initiator.Addr == c.GetUsername() {
|
||||
if initiator.Username == c.GetUsername() {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -294,8 +304,8 @@ func (c *BaseClient) GetSignatures(dkgID string) (map[string][]types.Reconstruct
|
|||
}
|
||||
|
||||
//GetSignatureByDataHash returns a list of reconstructed signatures of the signed data broadcasted by users
|
||||
func (c *BaseClient) GetSignatureByDataHash(dkgID, sigID string) ([]types.ReconstructedSignature, error) {
|
||||
return c.state.GetSignatureByDataHash(dkgID, sigID)
|
||||
func (c *BaseClient) GetSignatureByID(dkgID, sigID string) ([]types.ReconstructedSignature, error) {
|
||||
return c.state.GetSignatureByID(dkgID, sigID)
|
||||
}
|
||||
|
||||
// getOperationJSON returns a specific JSON-encoded operation
|
||||
|
@ -400,9 +410,9 @@ func (c *BaseClient) signMessage(message []byte) ([]byte, error) {
|
|||
}
|
||||
|
||||
func (c *BaseClient) verifyMessage(fsmInstance *state_machines.FSMInstance, message storage.Message) error {
|
||||
senderPubKey, err := fsmInstance.GetPubKeyByAddr(message.SenderAddr)
|
||||
senderPubKey, err := fsmInstance.GetPubKeyByUsername(message.SenderAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to GetPubKeyByAddr: %w", err)
|
||||
return fmt.Errorf("failed to GetPubKeyByUsername: %w", err)
|
||||
}
|
||||
|
||||
if !ed25519.Verify(senderPubKey, message.Bytes(), message.Signature) {
|
||||
|
|
|
@ -11,17 +11,17 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/client"
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/state_machines"
|
||||
spf "github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/mocks/clientMocks"
|
||||
"github.com/depools/dc4bc/mocks/qrMocks"
|
||||
"github.com/depools/dc4bc/mocks/storageMocks"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lidofinance/dc4bc/client"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines"
|
||||
spf "github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/mocks/clientMocks"
|
||||
"github.com/lidofinance/dc4bc/mocks/qrMocks"
|
||||
"github.com/lidofinance/dc4bc/mocks/storageMocks"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@ -63,22 +63,22 @@ func TestClient_ProcessMessage(t *testing.T) {
|
|||
messageData := requests.SignatureProposalParticipantsListRequest{
|
||||
Participants: []*requests.SignatureProposalParticipantsEntry{
|
||||
{
|
||||
Addr: senderAddr,
|
||||
Username: senderAddr,
|
||||
PubKey: senderKeyPair.Pub,
|
||||
DkgPubKey: make([]byte, 128),
|
||||
},
|
||||
{
|
||||
Addr: "111",
|
||||
Username: "111",
|
||||
PubKey: client.NewKeyPair().Pub,
|
||||
DkgPubKey: make([]byte, 128),
|
||||
},
|
||||
{
|
||||
Addr: "222",
|
||||
Username: "222",
|
||||
PubKey: client.NewKeyPair().Pub,
|
||||
DkgPubKey: make([]byte, 128),
|
||||
},
|
||||
{
|
||||
Addr: "333",
|
||||
Username: "333",
|
||||
PubKey: client.NewKeyPair().Pub,
|
||||
DkgPubKey: make([]byte, 128),
|
||||
},
|
||||
|
|
|
@ -15,12 +15,12 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/airgapped"
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/qr"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/lidofinance/dc4bc/airgapped"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/qr"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
)
|
||||
|
||||
type node struct {
|
||||
|
@ -230,7 +230,7 @@ func TestFullFlow(t *testing.T) {
|
|||
log.Fatalln("failed to get DKG pubKey:", err.Error())
|
||||
}
|
||||
participants = append(participants, &requests.SignatureProposalParticipantsEntry{
|
||||
Addr: node.client.GetUsername(),
|
||||
Username: node.client.GetUsername(),
|
||||
PubKey: node.client.GetPubKey(),
|
||||
DkgPubKey: dkgPubKey,
|
||||
})
|
||||
|
|
|
@ -8,18 +8,17 @@ import (
|
|||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
spf "github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
sif "github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
spf "github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
sif "github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
|
||||
"github.com/depools/dc4bc/qr"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/lidofinance/dc4bc/qr"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
)
|
||||
|
||||
type Response struct {
|
||||
|
@ -71,7 +70,7 @@ func (c *BaseClient) StartHTTPServer(listenAddr string) error {
|
|||
mux.HandleFunc("/getOperationQRPath", c.getOperationQRPathHandler)
|
||||
|
||||
mux.HandleFunc("/getSignatures", c.getSignaturesHandler)
|
||||
mux.HandleFunc("/getSignatureByDataHash", c.getSignatureByDataHashHandler)
|
||||
mux.HandleFunc("/getSignatureByID", c.getSignatureByIDHandler)
|
||||
|
||||
mux.HandleFunc("/getOperationQR", c.getOperationQRToBodyHandler)
|
||||
mux.HandleFunc("/handleProcessedOperationJSON", c.handleJSONOperationHandler)
|
||||
|
@ -80,6 +79,9 @@ func (c *BaseClient) StartHTTPServer(listenAddr string) error {
|
|||
mux.HandleFunc("/startDKG", c.startDKGHandler)
|
||||
mux.HandleFunc("/proposeSignMessage", c.proposeSignDataHandler)
|
||||
|
||||
mux.HandleFunc("/saveOffset", c.saveOffsetHandler)
|
||||
mux.HandleFunc("/getOffset", c.getOffsetHandler)
|
||||
|
||||
mux.HandleFunc("/getFSMDump", c.getFSMDumpHandler)
|
||||
mux.HandleFunc("/getFSMList", c.getFSMList)
|
||||
|
||||
|
@ -138,6 +140,47 @@ func (c *BaseClient) getPubkeyHandler(w http.ResponseWriter, r *http.Request) {
|
|||
successResponse(w, c.GetPubKey())
|
||||
}
|
||||
|
||||
func (c *BaseClient) getOffsetHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodGet {
|
||||
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
|
||||
return
|
||||
}
|
||||
offset, err := c.state.LoadOffset()
|
||||
if err != nil {
|
||||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("failed to load offset: %v", err))
|
||||
return
|
||||
}
|
||||
successResponse(w, offset)
|
||||
}
|
||||
|
||||
func (c *BaseClient) saveOffsetHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
|
||||
return
|
||||
}
|
||||
reqBytes, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
errorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to read request body: %v", err))
|
||||
return
|
||||
}
|
||||
defer r.Body.Close()
|
||||
|
||||
var req map[string]uint64
|
||||
if err = json.Unmarshal(reqBytes, &req); err != nil {
|
||||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("failed to unmarshal request: %v", err))
|
||||
return
|
||||
}
|
||||
if _, ok := req["offset"]; !ok {
|
||||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("offset cannot be null: %v", err))
|
||||
return
|
||||
}
|
||||
if err = c.state.SaveOffset(req["offset"]); err != nil {
|
||||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("failed to save offset: %v", err))
|
||||
return
|
||||
}
|
||||
successResponse(w, "ok")
|
||||
}
|
||||
|
||||
func (c *BaseClient) sendMessageHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
|
||||
|
@ -194,13 +237,13 @@ func (c *BaseClient) getSignaturesHandler(w http.ResponseWriter, r *http.Request
|
|||
successResponse(w, signatures)
|
||||
}
|
||||
|
||||
func (c *BaseClient) getSignatureByDataHashHandler(w http.ResponseWriter, r *http.Request) {
|
||||
func (c *BaseClient) getSignatureByIDHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodGet {
|
||||
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
|
||||
return
|
||||
}
|
||||
|
||||
signature, err := c.GetSignatureByDataHash(r.URL.Query().Get("dkgID"), r.URL.Query().Get("hash"))
|
||||
signature, err := c.GetSignatureByID(r.URL.Query().Get("dkgID"), r.URL.Query().Get("id"))
|
||||
if err != nil {
|
||||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("failed to get signature: %v", err))
|
||||
return
|
||||
|
@ -260,7 +303,7 @@ func (c *BaseClient) getOperationQRToBodyHandler(w http.ResponseWriter, r *http.
|
|||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "image/jpeg")
|
||||
w.Header().Set("Content-Type", "image/png")
|
||||
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(encodedData)))
|
||||
rawResponse(w, encodedData)
|
||||
}
|
||||
|
@ -313,13 +356,14 @@ func (c *BaseClient) proposeSignDataHandler(w http.ResponseWriter, r *http.Reque
|
|||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("failed to get FSM instance: %v", err))
|
||||
return
|
||||
}
|
||||
participantID, err := fsmInstance.GetIDByAddr(c.GetUsername())
|
||||
participantID, err := fsmInstance.GetIDByUsername(c.GetUsername())
|
||||
if err != nil {
|
||||
errorResponse(w, http.StatusInternalServerError, fmt.Sprintf("failed to get participantID: %v", err))
|
||||
return
|
||||
}
|
||||
|
||||
messageDataSign := requests.SigningProposalStartRequest{
|
||||
SigningID: uuid.New().String(),
|
||||
ParticipantId: participantID,
|
||||
SrcPayload: req["data"],
|
||||
CreatedAt: time.Now(),
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/state_machines"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines"
|
||||
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
@ -39,7 +37,7 @@ type State interface {
|
|||
GetOperationByID(operationID string) (*types.Operation, error)
|
||||
|
||||
SaveSignature(signature types.ReconstructedSignature) error
|
||||
GetSignatureByDataHash(dkgID, signatureID string) ([]types.ReconstructedSignature, error)
|
||||
GetSignatureByID(dkgID, signatureID string) ([]types.ReconstructedSignature, error)
|
||||
GetSignatures(dkgID string) (map[string][]types.ReconstructedSignature, error)
|
||||
}
|
||||
|
||||
|
@ -311,7 +309,7 @@ func (s *LevelDBState) GetSignatures(dkgID string) (map[string][]types.Reconstru
|
|||
return s.getSignatures(dkgID)
|
||||
}
|
||||
|
||||
func (s *LevelDBState) GetSignatureByDataHash(dkgID, signatureID string) ([]types.ReconstructedSignature, error) {
|
||||
func (s *LevelDBState) GetSignatureByID(dkgID, signatureID string) ([]types.ReconstructedSignature, error) {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
|
||||
|
@ -340,12 +338,9 @@ func (s *LevelDBState) SaveSignature(signature types.ReconstructedSignature) err
|
|||
signatures = make(map[string][]types.ReconstructedSignature)
|
||||
}
|
||||
|
||||
dataHash := md5.Sum(signature.Data)
|
||||
dataHashString := hex.EncodeToString(dataHash[:])
|
||||
|
||||
sig := signatures[dataHashString]
|
||||
sig := signatures[signature.SigningID]
|
||||
sig = append(sig, signature)
|
||||
signatures[dataHashString] = sig
|
||||
signatures[signature.SigningID] = sig
|
||||
|
||||
signaturesJSON, err := json.Marshal(signatures)
|
||||
if err != nil {
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
|
||||
"github.com/depools/dc4bc/client"
|
||||
"github.com/lidofinance/dc4bc/client"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
)
|
||||
|
||||
type OperationType string
|
||||
|
@ -23,10 +23,11 @@ const (
|
|||
)
|
||||
|
||||
type ReconstructedSignature struct {
|
||||
Data []byte
|
||||
Signature []byte
|
||||
Participant string
|
||||
DKGRoundID string
|
||||
SigningID string
|
||||
SrcPayload []byte
|
||||
Signature []byte
|
||||
Username string
|
||||
DKGRoundID string
|
||||
}
|
||||
|
||||
// Operation is the type for any Operation that might be required for
|
||||
|
|
|
@ -9,13 +9,14 @@ import (
|
|||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
passwordTerminal "golang.org/x/crypto/ssh/terminal"
|
||||
|
||||
"github.com/depools/dc4bc/airgapped"
|
||||
"github.com/lidofinance/dc4bc/airgapped"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -33,10 +34,19 @@ type terminal struct {
|
|||
reader *bufio.Reader
|
||||
airgapped *airgapped.Machine
|
||||
commands map[string]*terminalCommand
|
||||
|
||||
currentCommand string
|
||||
stopDroppingSensitiveData chan bool
|
||||
}
|
||||
|
||||
func NewTerminal(machine *airgapped.Machine) *terminal {
|
||||
t := terminal{bufio.NewReader(os.Stdin), machine, make(map[string]*terminalCommand)}
|
||||
t := terminal{
|
||||
bufio.NewReader(os.Stdin),
|
||||
machine,
|
||||
make(map[string]*terminalCommand),
|
||||
"",
|
||||
make(chan bool),
|
||||
}
|
||||
t.addCommand("read_qr", &terminalCommand{
|
||||
commandHandler: t.readQRCommand,
|
||||
description: "Reads QR chunks from camera, handle a decoded operation and returns paths to qr chunks of operation's result",
|
||||
|
@ -45,7 +55,7 @@ func NewTerminal(machine *airgapped.Machine) *terminal {
|
|||
commandHandler: t.helpCommand,
|
||||
description: "shows available commands",
|
||||
})
|
||||
t.addCommand("show_dkg_pub_key", &terminalCommand{
|
||||
t.addCommand("show_dkg_pubkey", &terminalCommand{
|
||||
commandHandler: t.showDKGPubKeyCommand,
|
||||
description: "shows a dkg pub key",
|
||||
})
|
||||
|
@ -72,6 +82,10 @@ func NewTerminal(machine *airgapped.Machine) *terminal {
|
|||
commandHandler: t.verifySignCommand,
|
||||
description: "verifies a BLS signature of a message",
|
||||
})
|
||||
t.addCommand("change_configuration", &terminalCommand{
|
||||
commandHandler: t.changeConfigurationCommand,
|
||||
description: "changes a configuration variables (frames delay, chunk size, etc...)",
|
||||
})
|
||||
return &t
|
||||
}
|
||||
|
||||
|
@ -134,12 +148,68 @@ func (t *terminal) replayOperationLogCommand() error {
|
|||
return fmt.Errorf("failed to read dkgRoundIdentifier: %w", err)
|
||||
}
|
||||
|
||||
if err := t.airgapped.ReplayOperationsLog(dkgRoundIdentifier); err != nil {
|
||||
if err := t.airgapped.ReplayOperationsLog(strings.Trim(dkgRoundIdentifier, "\n")); err != nil {
|
||||
return fmt.Errorf("failed to ReplayOperationsLog: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *terminal) changeConfigurationCommand() error {
|
||||
fmt.Print("> Enter a new path to save QR codes (leave empty to avoid changes): ")
|
||||
newQRCodesfolder, _, err := t.reader.ReadLine()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read input: %w", err)
|
||||
}
|
||||
if len(newQRCodesfolder) > 0 {
|
||||
t.airgapped.SetResultQRFolder(string(newQRCodesfolder))
|
||||
fmt.Printf("Folder to save QR codes was changed to: %s\n", string(newQRCodesfolder))
|
||||
}
|
||||
|
||||
fmt.Print("> Enter a new frames delay in 100ths of second (leave empty to avoid changes): ")
|
||||
framesDelayInput, _, err := t.reader.ReadLine()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read input: %w", err)
|
||||
}
|
||||
if len(framesDelayInput) > 0 {
|
||||
framesDelay, err := strconv.Atoi(string(framesDelayInput))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse new frames delay: %w", err)
|
||||
}
|
||||
t.airgapped.SetQRProcessorFramesDelay(framesDelay)
|
||||
fmt.Printf("Frames delay was changed to: %d\n", framesDelay)
|
||||
}
|
||||
|
||||
fmt.Print("> Enter a new QR chunk size (leave empty to avoid changes): ")
|
||||
chunkSizeInput, _, err := t.reader.ReadLine()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read input: %w", err)
|
||||
}
|
||||
if len(chunkSizeInput) > 0 {
|
||||
chunkSize, err := strconv.Atoi(string(chunkSizeInput))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse new chunk size: %w", err)
|
||||
}
|
||||
t.airgapped.SetQRProcessorChunkSize(chunkSize)
|
||||
fmt.Printf("Chunk size was changed to: %d\n", chunkSize)
|
||||
}
|
||||
|
||||
fmt.Print("> Enter a password expiration duration (leave empty to avoid changes): ")
|
||||
durationInput, _, err := t.reader.ReadLine()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read input: %w", err)
|
||||
}
|
||||
if len(durationInput) > 0 {
|
||||
duration, err := time.ParseDuration(string(durationInput))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse new duration: %w", err)
|
||||
}
|
||||
t.stopDroppingSensitiveData <- true
|
||||
go t.dropSensitiveDataByTicker(duration)
|
||||
fmt.Printf("Password expiration was changed to: %s\n", duration.String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *terminal) dropOperationLogCommand() error {
|
||||
fmt.Print("> Enter the DKGRoundIdentifier: ")
|
||||
dkgRoundIdentifier, err := t.reader.ReadString('\n')
|
||||
|
@ -229,7 +299,9 @@ func (t *terminal) run() error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to read command: %w", err)
|
||||
}
|
||||
handler, ok := t.commands[strings.Trim(command, "\n")]
|
||||
|
||||
clearCommand := strings.Trim(command, "\n")
|
||||
handler, ok := t.commands[clearCommand]
|
||||
if !ok {
|
||||
fmt.Printf("unknown command: %s\n", command)
|
||||
continue
|
||||
|
@ -238,19 +310,26 @@ func (t *terminal) run() error {
|
|||
return err
|
||||
}
|
||||
t.airgapped.Lock()
|
||||
|
||||
t.currentCommand = clearCommand
|
||||
if err := handler.commandHandler(); err != nil {
|
||||
fmt.Printf("failled to execute command %s: %v \n", command, err)
|
||||
t.airgapped.Unlock()
|
||||
continue
|
||||
}
|
||||
t.currentCommand = ""
|
||||
t.airgapped.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
func (t *terminal) dropSensitiveData(passExpiration time.Duration) {
|
||||
func (t *terminal) dropSensitiveDataByTicker(passExpiration time.Duration) {
|
||||
ticker := time.NewTicker(passExpiration)
|
||||
for range ticker.C {
|
||||
t.airgapped.DropSensitiveData()
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
t.airgapped.DropSensitiveData()
|
||||
case <-t.stopDroppingSensitiveData:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -288,14 +367,18 @@ func main() {
|
|||
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, os.Interrupt)
|
||||
|
||||
t := NewTerminal(air)
|
||||
go func() {
|
||||
for range c {
|
||||
if t.currentCommand == "read_qr" {
|
||||
t.airgapped.CloseCameraReader()
|
||||
continue
|
||||
}
|
||||
fmt.Printf("Intercepting SIGINT, please type `exit` to stop the machine\n>>> ")
|
||||
}
|
||||
}()
|
||||
|
||||
t := NewTerminal(air)
|
||||
go t.dropSensitiveData(passwordLifeDuration)
|
||||
go t.dropSensitiveDataByTicker(passwordLifeDuration)
|
||||
if err = t.run(); err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
|
|
|
@ -7,23 +7,24 @@ import (
|
|||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/depools/dc4bc/fsm/state_machines"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
|
||||
"github.com/depools/dc4bc/client"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/qr"
|
||||
"github.com/lidofinance/dc4bc/client"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/qr"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -58,8 +59,11 @@ func main() {
|
|||
getHashOfStartDKGCommand(),
|
||||
getSignaturesCommand(),
|
||||
getSignatureCommand(),
|
||||
saveOffsetCommand(),
|
||||
getOffsetCommand(),
|
||||
getFSMStatusCommand(),
|
||||
getFSMListCommand(),
|
||||
getSignatureDataCommand(),
|
||||
)
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
log.Fatalf("Failed to execute root command: %v", err)
|
||||
|
@ -117,7 +121,8 @@ func getOperationsCommand() *cobra.Command {
|
|||
return fmt.Errorf("failed to unmarshal operation payload")
|
||||
}
|
||||
msgHash := md5.Sum(payload.SrcPayload)
|
||||
fmt.Printf("Hash of the message to sign - %s\n", hex.EncodeToString(msgHash[:]))
|
||||
fmt.Printf("Hash of the data to sign - %s\n", hex.EncodeToString(msgHash[:]))
|
||||
fmt.Printf("Signing ID: %s\n", payload.SigningId)
|
||||
}
|
||||
fmt.Println("-----------------------------------------------------")
|
||||
}
|
||||
|
@ -161,11 +166,11 @@ func getSignaturesCommand() *cobra.Command {
|
|||
if signatures.ErrorMessage != "" {
|
||||
return fmt.Errorf("failed to get signatures: %s", signatures.ErrorMessage)
|
||||
}
|
||||
for dataHash, signature := range signatures.Result {
|
||||
fmt.Printf("Hash of the signing data: %s\n", dataHash)
|
||||
for sigID, signature := range signatures.Result {
|
||||
fmt.Printf("Signing ID: %s\n", sigID)
|
||||
for _, participantSig := range signature {
|
||||
fmt.Printf("\tDKG round ID: %s\n", participantSig.DKGRoundID)
|
||||
fmt.Printf("\tParticipant: %s\n", participantSig.Participant)
|
||||
fmt.Printf("\tParticipant: %s\n", participantSig.Username)
|
||||
fmt.Printf("\tReconstructed signature for the data: %s\n", base64.StdEncoding.EncodeToString(participantSig.Signature))
|
||||
fmt.Println()
|
||||
}
|
||||
|
@ -176,7 +181,7 @@ func getSignaturesCommand() *cobra.Command {
|
|||
}
|
||||
|
||||
func getSignatureRequest(host string, dkgID, dataHash string) (*SignatureResponse, error) {
|
||||
resp, err := http.Get(fmt.Sprintf("http://%s/getSignatureByDataHash?dkgID=%s&hash=%s", host, dkgID, dataHash))
|
||||
resp, err := http.Get(fmt.Sprintf("http://%s/getSignatureByID?dkgID=%s&id=%s", host, dkgID, dataHash))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get signatures: %w", err)
|
||||
}
|
||||
|
@ -195,7 +200,7 @@ func getSignatureRequest(host string, dkgID, dataHash string) (*SignatureRespons
|
|||
|
||||
func getSignatureCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "get_signature [dkgID] [hash_of_the_signed_data]",
|
||||
Use: "get_signature [dkgID] [signing_id]",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Short: "returns a list of reconstructed signatures of the signed data broadcasted by users",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
@ -211,7 +216,7 @@ func getSignatureCommand() *cobra.Command {
|
|||
return fmt.Errorf("failed to get signatures: %s", signatures.ErrorMessage)
|
||||
}
|
||||
for _, participantSig := range signatures.Result {
|
||||
fmt.Printf("\tParticipant: %s\n", participantSig.Participant)
|
||||
fmt.Printf("\tParticipant: %s\n", participantSig.Username)
|
||||
fmt.Printf("\tReconstructed signature for the data: %s\n", base64.StdEncoding.EncodeToString(participantSig.Signature))
|
||||
fmt.Println()
|
||||
}
|
||||
|
@ -220,6 +225,31 @@ func getSignatureCommand() *cobra.Command {
|
|||
}
|
||||
}
|
||||
|
||||
func getSignatureDataCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "get_signature_data [dkgID] [signing_id]",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Short: "returns a data which was signed",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
listenAddr, err := cmd.Flags().GetString(flagListenAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read configuration: %v", err)
|
||||
}
|
||||
signatures, err := getSignatureRequest(listenAddr, args[0], args[1])
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get signatures: %w", err)
|
||||
}
|
||||
if signatures.ErrorMessage != "" {
|
||||
return fmt.Errorf("failed to get signatures: %s", signatures.ErrorMessage)
|
||||
}
|
||||
if len(signatures.Result) > 0 {
|
||||
fmt.Println(string(signatures.Result[0].SrcPayload))
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func getOperationRequest(host string, operationID string) (*OperationResponse, error) {
|
||||
resp, err := http.Get(fmt.Sprintf("http://%s/getOperation?operationID=%s", host, operationID))
|
||||
if err != nil {
|
||||
|
@ -270,7 +300,7 @@ func getOperationQRPathCommand() *cobra.Command {
|
|||
return fmt.Errorf("failed to get operations: %s", operation.ErrorMessage)
|
||||
}
|
||||
|
||||
operationQRPath := filepath.Join(qrCodeFolder, fmt.Sprintf("dc4bc_qr_%s", operationID))
|
||||
operationQRPath := filepath.Join(qrCodeFolder, fmt.Sprintf("dc4bc_qr_%s-request", operationID))
|
||||
|
||||
qrPath := fmt.Sprintf("%s.gif", operationQRPath)
|
||||
|
||||
|
@ -329,6 +359,62 @@ func getPubKeyCommand() *cobra.Command {
|
|||
}
|
||||
}
|
||||
|
||||
func saveOffsetCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "save_offset [offset]",
|
||||
Short: "saves a new offset for a storage",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
listenAddr, err := cmd.Flags().GetString(flagListenAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read configuration: %v", err)
|
||||
}
|
||||
|
||||
offset, err := strconv.ParseUint(args[0], 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse uint: %w", err)
|
||||
}
|
||||
req := map[string]uint64{"offset": offset}
|
||||
data, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create request: %w", err)
|
||||
}
|
||||
resp, err := rawPostRequest(fmt.Sprintf("http://%s/saveOffset", listenAddr), "application/json", data)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to save offset: %w", err)
|
||||
}
|
||||
if resp.ErrorMessage != "" {
|
||||
return fmt.Errorf("failed to save offset: %v", resp.ErrorMessage)
|
||||
}
|
||||
fmt.Println(resp.Result.(string))
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func getOffsetCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "get_offset",
|
||||
Short: "returns a current offset for the storage",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
listenAddr, err := cmd.Flags().GetString(flagListenAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read configuration: %v", err)
|
||||
}
|
||||
|
||||
resp, err := rawGetRequest(fmt.Sprintf("http://%s//getOffset", listenAddr))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get offset: %w", err)
|
||||
}
|
||||
if resp.ErrorMessage != "" {
|
||||
return fmt.Errorf("failed to get offset: %v", resp.ErrorMessage)
|
||||
}
|
||||
fmt.Println(uint64(resp.Result.(float64)))
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func getUsernameCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "get_username",
|
||||
|
@ -373,7 +459,7 @@ func rawPostRequest(url string, contentType string, data []byte) (*client.Respon
|
|||
|
||||
func readOperationFromCameraCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "read_from_camera",
|
||||
Use: "read_qr",
|
||||
Short: "opens the camera and reads QR codes which should contain a processed operation",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
listenAddr, err := cmd.Flags().GetString(flagListenAddr)
|
||||
|
@ -472,7 +558,7 @@ func getHashOfStartDKGCommand() *cobra.Command {
|
|||
if _, err := hashPayload.Write(p.DkgPubKey); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := hashPayload.Write([]byte(p.Addr)); err != nil {
|
||||
if _, err := hashPayload.Write([]byte(p.Username)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
@ -574,7 +660,7 @@ func getFSMStatusCommand() *cobra.Command {
|
|||
quorum[k] = v
|
||||
}
|
||||
}
|
||||
if strings.HasPrefix(string(dump.State), "state_sig") {
|
||||
if strings.HasPrefix(string(dump.State), "state_sig_") {
|
||||
for k, v := range dump.Payload.SignatureProposalPayload.Quorum {
|
||||
quorum[k] = v
|
||||
}
|
||||
|
@ -586,13 +672,13 @@ func getFSMStatusCommand() *cobra.Command {
|
|||
|
||||
for _, p := range quorum {
|
||||
if strings.Contains(p.GetStatus().String(), "Await") {
|
||||
waiting = append(waiting, p.GetAddr())
|
||||
waiting = append(waiting, p.GetUsername())
|
||||
}
|
||||
if strings.Contains(p.GetStatus().String(), "Error") {
|
||||
failed = append(failed, p.GetAddr())
|
||||
failed = append(failed, p.GetUsername())
|
||||
}
|
||||
if strings.Contains(p.GetStatus().String(), "Confirmed") {
|
||||
confirmed = append(confirmed, p.GetAddr())
|
||||
confirmed = append(confirmed, p.GetUsername())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
"SigningThreshold": 3,
|
||||
"Participants": [
|
||||
{
|
||||
"Addr": "addr1",
|
||||
"Username": "addr1",
|
||||
"PubKey": "Otwt+xeI7Po3aNIcLWugnMIHxWcoTPnI3kylUkIFq80=",
|
||||
"DkgPubKey": "icmEgjz+F/W6qC347pIvu317GOZA7vj4cthe/+6+GtTvh4hng0C6yx40f7RTKcNuCe+xUATI2dNEciyx7ntUaAzBOuuzRuYmOIYjBTFmt8Zms/9K1EVMhXm0zGFb5rfP"
|
||||
},
|
||||
{
|
||||
"Addr": "addr2",
|
||||
"Username": "addr2",
|
||||
"PubKey": "PTX6ck8mBg+n8fRJC2MdTJGq7i9PrvfxWALgZ/B7YJo=",
|
||||
"DkgPubKey": "r7GSpa+roaukv8B+ulGWKNNjquY/B5rLPvyrjD5u36nrT69p8yQtSHHM7yp59gDuA8CIrb1ph0JsaTXYCsyjVuSzChCJVMxTNPqr/vB911DTkhkO1M2HcKYkyj2fzHHL"
|
||||
},
|
||||
{
|
||||
"Addr": "addr3",
|
||||
"Username": "addr3",
|
||||
"PubKey": "PTX6ck8mBg+n8fRJC2MdTJGq7i9PrvfxWALgZ/B7YJo=",
|
||||
"DkgPubKey": "r7GSpa+roaukv8B+ulGWKNNjquY/B5rLPvyrjD5u36nrT69p8yQtSHHM7yp59gDuA8CIrb1ph0JsaTXYCsyjVuSzChCJVMxTNPqr/vB911DTkhkO1M2HcKYkyj2fzHHL"
|
||||
},
|
||||
{
|
||||
"Addr": "addr4",
|
||||
"Username": "addr4",
|
||||
"PubKey": "PTX6ck8mBg+n8fRJC2MdTJGq7i9PrvfxWALgZ/B7YJo=",
|
||||
"DkgPubKey": "r7GSpa+roaukv8B+ulGWKNNjquY/B5rLPvyrjD5u36nrT69p8yQtSHHM7yp59gDuA8CIrb1ph0JsaTXYCsyjVuSzChCJVMxTNPqr/vB911DTkhkO1M2HcKYkyj2fzHHL"
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@ import (
|
|||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/depools/dc4bc/client/types"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/client/types"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
"sort"
|
||||
)
|
||||
|
||||
|
@ -20,13 +20,13 @@ type DKGInvitationResponse responses.SignatureProposalParticipantInvitationsResp
|
|||
|
||||
func (d DKGInvitationResponse) Len() int { return len(d) }
|
||||
func (d DKGInvitationResponse) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
|
||||
func (d DKGInvitationResponse) Less(i, j int) bool { return d[i].Addr < d[j].Addr }
|
||||
func (d DKGInvitationResponse) Less(i, j int) bool { return d[i].Username < d[j].Username }
|
||||
|
||||
type DKGParticipants []*requests.SignatureProposalParticipantsEntry
|
||||
|
||||
func (d DKGParticipants) Len() int { return len(d) }
|
||||
func (d DKGParticipants) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
|
||||
func (d DKGParticipants) Less(i, j int) bool { return d[i].Addr < d[j].Addr }
|
||||
func (d DKGParticipants) Less(i, j int) bool { return d[i].Username < d[j].Username }
|
||||
|
||||
type OperationsResponse struct {
|
||||
ErrorMessage string `json:"error_message,omitempty"`
|
||||
|
@ -74,7 +74,7 @@ func calcStartDKGMessageHash(payload []byte) ([]byte, error) {
|
|||
if _, err := hashPayload.Write(p.DkgPubKey); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if _, err := hashPayload.Write([]byte(p.Addr)); err != nil {
|
||||
if _, err := hashPayload.Write([]byte(p.Username)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ import (
|
|||
"reflect"
|
||||
"syscall"
|
||||
|
||||
"github.com/depools/dc4bc/client"
|
||||
"github.com/depools/dc4bc/qr"
|
||||
"github.com/depools/dc4bc/storage"
|
||||
"github.com/lidofinance/dc4bc/client"
|
||||
"github.com/lidofinance/dc4bc/qr"
|
||||
"github.com/lidofinance/dc4bc/storage"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
|
|
@ -2,10 +2,10 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"log"
|
||||
)
|
||||
|
||||
|
|
|
@ -294,16 +294,6 @@ func (f *FSM) MustCopyWithState(state State) *FSM {
|
|||
return f
|
||||
}
|
||||
|
||||
func (f *FSM) DoInternal(event Event, args ...interface{}) (resp *Response, err error) {
|
||||
trEvent, ok := f.transitions[trKey{f.currentState, event}]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("cannot execute internal event \"%s\" for state \"%s\"",
|
||||
event, f.currentState)
|
||||
}
|
||||
|
||||
return f.do(trEvent, args...)
|
||||
}
|
||||
|
||||
func (f *FSM) Do(event Event, args ...interface{}) (resp *Response, err error) {
|
||||
trEvent, ok := f.transitions[trKey{f.currentState, event}]
|
||||
if !ok {
|
||||
|
@ -343,8 +333,6 @@ func (f *FSM) processAutoEvent(mode EventRunMode, args ...interface{}) (exists b
|
|||
|
||||
func (f *FSM) do(trEvent *trEvent, args ...interface{}) (resp *Response, err error) {
|
||||
var outEvent Event
|
||||
// f.eventMu.Lock()
|
||||
// defer f.eventMu.Unlock()
|
||||
|
||||
resp = &Response{}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package fsm_pool
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
)
|
||||
|
||||
type MachineProvider interface {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
)
|
||||
|
||||
type testMachineFSM1 struct {
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/config"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/fsm/config"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
)
|
||||
|
||||
// Init
|
||||
|
@ -42,7 +42,7 @@ func (m *DKGProposalFSM) actionInitDKGProposal(inEvent fsm.Event, args ...interf
|
|||
|
||||
for participantId, participant := range m.payload.SignatureProposalPayload.Quorum {
|
||||
m.payload.DKGProposalPayload.Quorum[participantId] = &internal.DKGProposalParticipant{
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
DkgPubKey: make([]byte, len(participant.DkgPubKey)),
|
||||
Status: internal.CommitAwaitConfirmation,
|
||||
UpdatedAt: participant.UpdatedAt,
|
||||
|
@ -59,7 +59,7 @@ func (m *DKGProposalFSM) actionInitDKGProposal(inEvent fsm.Event, args ...interf
|
|||
for participantId, participant := range m.payload.DKGProposalPayload.Quorum {
|
||||
responseEntry := &responses.DKGProposalPubKeysParticipantEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
DkgPubKey: participant.DkgPubKey,
|
||||
}
|
||||
responseData = append(responseData, responseEntry)
|
||||
|
@ -158,7 +158,7 @@ func (m *DKGProposalFSM) actionValidateDkgProposalAwaitCommits(inEvent fsm.Event
|
|||
for participantId, participant := range m.payload.DKGProposalPayload.Quorum {
|
||||
responseEntry := &responses.DKGProposalCommitParticipantEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
DkgCommit: participant.DkgCommit,
|
||||
}
|
||||
responseData = append(responseData, responseEntry)
|
||||
|
@ -263,7 +263,7 @@ func (m *DKGProposalFSM) actionValidateDkgProposalAwaitDeals(inEvent fsm.Event,
|
|||
}
|
||||
responseEntry := &responses.DKGProposalDealParticipantEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
DkgDeal: participant.DkgDeal,
|
||||
}
|
||||
responseData = append(responseData, responseEntry)
|
||||
|
@ -365,7 +365,7 @@ func (m *DKGProposalFSM) actionValidateDkgProposalAwaitResponses(inEvent fsm.Eve
|
|||
for participantId, participant := range m.payload.DKGProposalPayload.Quorum {
|
||||
responseEntry := &responses.DKGProposalResponseParticipantEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
DkgResponse: participant.DkgResponse,
|
||||
}
|
||||
responseData = append(responseData, responseEntry)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package dkg_proposal_fsm
|
||||
|
||||
import (
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
spf "github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
spf "github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"crypto/ed25519"
|
||||
"errors"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/fsm_pool"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm_pool"
|
||||
)
|
||||
|
||||
type DumpedMachineProvider interface {
|
||||
|
@ -117,45 +117,45 @@ func (p *DumpedMachineStatePayload) SigningQuorumUpdate(id int, participant *Sig
|
|||
}
|
||||
}
|
||||
|
||||
func (p *DumpedMachineStatePayload) SetPubKeyAddr(addr string, pubKey ed25519.PublicKey) {
|
||||
func (p *DumpedMachineStatePayload) SetPubKeyUsername(username string, pubKey ed25519.PublicKey) {
|
||||
if p.PubKeys == nil {
|
||||
p.PubKeys = make(map[string]ed25519.PublicKey)
|
||||
}
|
||||
p.PubKeys[addr] = pubKey
|
||||
p.PubKeys[username] = pubKey
|
||||
}
|
||||
|
||||
func (p *DumpedMachineStatePayload) SetIDAddr(addr string, id int) {
|
||||
func (p *DumpedMachineStatePayload) SetIDUsername(username string, id int) {
|
||||
if p.IDs == nil {
|
||||
p.IDs = make(map[string]int)
|
||||
}
|
||||
p.IDs[addr] = id
|
||||
p.IDs[username] = id
|
||||
}
|
||||
|
||||
func (p *DumpedMachineStatePayload) GetPubKeyByAddr(addr string) (ed25519.PublicKey, error) {
|
||||
func (p *DumpedMachineStatePayload) GetPubKeyByUsername(username string) (ed25519.PublicKey, error) {
|
||||
if p.PubKeys == nil {
|
||||
return nil, errors.New("{PubKeys} not initialized")
|
||||
}
|
||||
if addr == "" {
|
||||
return nil, errors.New("{addr} cannot be empty")
|
||||
if username == "" {
|
||||
return nil, errors.New("{username} cannot be empty")
|
||||
}
|
||||
pubKey, ok := p.PubKeys[addr]
|
||||
pubKey, ok := p.PubKeys[username]
|
||||
if !ok {
|
||||
return nil, errors.New("cannot find public key by {addr}")
|
||||
return nil, errors.New("cannot find public key by {username}")
|
||||
}
|
||||
|
||||
return pubKey, nil
|
||||
}
|
||||
|
||||
func (p *DumpedMachineStatePayload) GetIDByAddr(addr string) (int, error) {
|
||||
func (p *DumpedMachineStatePayload) GetIDByUsername(username string) (int, error) {
|
||||
if p.IDs == nil {
|
||||
return -1, errors.New("{IDs} not initialized")
|
||||
}
|
||||
if addr == "" {
|
||||
return -1, errors.New("{addr} cannot be empty")
|
||||
if username == "" {
|
||||
return -1, errors.New("{username} cannot be empty")
|
||||
}
|
||||
id, ok := p.IDs[addr]
|
||||
id, ok := p.IDs[username]
|
||||
if !ok {
|
||||
return -1, errors.New("cannot find id by {addr}")
|
||||
return -1, errors.New("cannot find id by {username}")
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ type SignatureConfirmation struct {
|
|||
}
|
||||
|
||||
type SignatureProposalParticipant struct {
|
||||
Addr string
|
||||
Username string
|
||||
PubKey ed25519.PublicKey
|
||||
DkgPubKey []byte
|
||||
// For validation user confirmation: sign(InvitationSecret, PubKey) => user
|
||||
|
@ -55,8 +55,8 @@ func (sigP SignatureProposalParticipant) GetStatus() ParticipantStatus {
|
|||
return sigP.Status
|
||||
}
|
||||
|
||||
func (sigP SignatureProposalParticipant) GetAddr() string {
|
||||
return sigP.Addr
|
||||
func (sigP SignatureProposalParticipant) GetUsername() string {
|
||||
return sigP.Username
|
||||
}
|
||||
|
||||
func (c *SignatureConfirmation) IsExpired() bool {
|
||||
|
@ -87,7 +87,7 @@ const (
|
|||
)
|
||||
|
||||
type DKGProposalParticipant struct {
|
||||
Addr string
|
||||
Username string
|
||||
DkgPubKey []byte
|
||||
DkgCommit []byte
|
||||
DkgDeal []byte
|
||||
|
@ -102,8 +102,8 @@ func (dkgP DKGProposalParticipant) GetStatus() ParticipantStatus {
|
|||
return dkgP.Status
|
||||
}
|
||||
|
||||
func (dkgP DKGProposalParticipant) GetAddr() string {
|
||||
return dkgP.Addr
|
||||
func (dkgP DKGProposalParticipant) GetUsername() string {
|
||||
return dkgP.Username
|
||||
}
|
||||
|
||||
type DKGProposalQuorum map[int]*DKGProposalParticipant
|
||||
|
@ -204,7 +204,7 @@ func (s SigningParticipantStatus) String() string {
|
|||
}
|
||||
|
||||
type SigningProposalParticipant struct {
|
||||
Addr string
|
||||
Username string
|
||||
Status SigningParticipantStatus
|
||||
PartialSign []byte
|
||||
Error error
|
||||
|
@ -215,6 +215,6 @@ func (signingP SigningProposalParticipant) GetStatus() ParticipantStatus {
|
|||
return signingP.Status
|
||||
}
|
||||
|
||||
func (signingP SigningProposalParticipant) GetAddr() string {
|
||||
return signingP.Addr
|
||||
func (signingP SigningProposalParticipant) GetUsername() string {
|
||||
return signingP.Username
|
||||
}
|
||||
|
|
|
@ -4,15 +4,15 @@ import (
|
|||
"crypto/ed25519"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
"strings"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/fsm_pool"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm_pool"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
)
|
||||
|
||||
// Is machine state scope dump will be locked?
|
||||
|
@ -29,7 +29,7 @@ type FSMInstance struct {
|
|||
|
||||
type Participant interface {
|
||||
GetStatus() internal.ParticipantStatus
|
||||
GetAddr() string
|
||||
GetUsername() string
|
||||
}
|
||||
|
||||
// Create new fsm with unique id
|
||||
|
@ -91,12 +91,12 @@ func FromDump(data []byte) (*FSMInstance, error) {
|
|||
return i, err
|
||||
}
|
||||
|
||||
func (i *FSMInstance) GetPubKeyByAddr(addr string) (ed25519.PublicKey, error) {
|
||||
func (i *FSMInstance) GetPubKeyByUsername(username string) (ed25519.PublicKey, error) {
|
||||
if i.dump == nil {
|
||||
return nil, errors.New("dump not initialized")
|
||||
}
|
||||
|
||||
return i.dump.Payload.GetPubKeyByAddr(addr)
|
||||
return i.dump.Payload.GetPubKeyByUsername(username)
|
||||
}
|
||||
|
||||
func (i *FSMInstance) SigningQuorumGetParticipant(id int) (*internal.SigningProposalParticipant, error) {
|
||||
|
@ -107,12 +107,12 @@ func (i *FSMInstance) SigningQuorumGetParticipant(id int) (*internal.SigningProp
|
|||
return i.dump.Payload.SigningQuorumGet(id), nil
|
||||
}
|
||||
|
||||
func (i *FSMInstance) GetIDByAddr(addr string) (int, error) {
|
||||
func (i *FSMInstance) GetIDByUsername(username string) (int, error) {
|
||||
if i.dump == nil {
|
||||
return -1, errors.New("dump not initialized")
|
||||
}
|
||||
|
||||
return i.dump.Payload.GetIDByAddr(addr)
|
||||
return i.dump.Payload.GetIDByUsername(username)
|
||||
}
|
||||
|
||||
func (i *FSMInstance) Do(event fsm.Event, args ...interface{}) (result *fsm.Response, dump []byte, err error) {
|
||||
|
|
|
@ -11,22 +11,22 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
sif "github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
sif "github.com/lidofinance/dc4bc/fsm/state_machines/signing_proposal_fsm"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
dpf "github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
spf "github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
dpf "github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
spf "github.com/lidofinance/dc4bc/fsm/state_machines/signature_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
)
|
||||
|
||||
const (
|
||||
addrMockLen = 32
|
||||
keysMockLen = 128
|
||||
usernameMockLen = 32
|
||||
keysMockLen = 128
|
||||
)
|
||||
|
||||
type testParticipantsPayload struct {
|
||||
Addr string
|
||||
Username string
|
||||
HotPrivKey ed25519.PrivateKey
|
||||
HotPubKey ed25519.PublicKey
|
||||
DkgPubKey []byte
|
||||
|
@ -41,8 +41,8 @@ var (
|
|||
|
||||
dkgId = "1b7a6382afe0fbe2ff127a5779f5e9b042e685cabefeadcf4ef27c6089a56bfb"
|
||||
|
||||
// map {addr} -> {participant}
|
||||
testAddrMapParticipants = map[string]*testParticipantsPayload{}
|
||||
// map {username} -> {participant}
|
||||
testUsernameMapParticipants = map[string]*testParticipantsPayload{}
|
||||
// map {dkg_queue_id} -> {participant}
|
||||
testIdMapParticipants = map[int]*testParticipantsPayload{}
|
||||
|
||||
|
@ -62,7 +62,7 @@ func init() {
|
|||
for i := 0; i < 3; i++ {
|
||||
|
||||
participant := &testParticipantsPayload{
|
||||
Addr: base64.StdEncoding.EncodeToString(genDataMock(addrMockLen)),
|
||||
Username: base64.StdEncoding.EncodeToString(genDataMock(usernameMockLen)),
|
||||
HotPrivKey: genDataMock(keysMockLen),
|
||||
HotPubKey: genDataMock(keysMockLen),
|
||||
DkgPubKey: genDataMock(keysMockLen),
|
||||
|
@ -71,7 +71,7 @@ func init() {
|
|||
DkgResponse: genDataMock(keysMockLen),
|
||||
DkgPartialKey: genDataMock(keysMockLen),
|
||||
}
|
||||
testAddrMapParticipants[participant.Addr] = participant
|
||||
testUsernameMapParticipants[participant.Username] = participant
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,10 +162,10 @@ func Test_SignatureProposal_EventInitProposal_Positive(t *testing.T) {
|
|||
// Make request
|
||||
request := make([]*requests.SignatureProposalParticipantsEntry, 0)
|
||||
|
||||
for _, participant := range testAddrMapParticipants {
|
||||
for _, participant := range testUsernameMapParticipants {
|
||||
|
||||
request = append(request, &requests.SignatureProposalParticipantsEntry{
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
PubKey: participant.HotPubKey,
|
||||
DkgPubKey: participant.DkgPubKey,
|
||||
})
|
||||
|
@ -196,14 +196,14 @@ func Test_SignatureProposal_EventInitProposal_Positive(t *testing.T) {
|
|||
t.Fatalf("expected unique {ParticipantId}")
|
||||
}
|
||||
|
||||
if participant.Addr == "" {
|
||||
t.Fatalf("expected not empty {Addr}")
|
||||
if participant.Username == "" {
|
||||
t.Fatalf("expected not empty {Username}")
|
||||
}
|
||||
|
||||
participantEntry, ok := testAddrMapParticipants[participant.Addr]
|
||||
participantEntry, ok := testUsernameMapParticipants[participant.Username]
|
||||
|
||||
if !ok {
|
||||
t.Fatalf("expected exist {Addr}")
|
||||
t.Fatalf("expected exist {Username}")
|
||||
}
|
||||
|
||||
testIdMapParticipants[participant.ParticipantId] = participantEntry
|
||||
|
@ -409,8 +409,8 @@ func Test_DkgProposal_EventDKGCommitConfirmationReceived(t *testing.T) {
|
|||
t.Fatalf("expected exist {ParticipantId}")
|
||||
}
|
||||
|
||||
if responseEntry.Addr == "" {
|
||||
t.Fatalf("expected {Addr} non zero length")
|
||||
if responseEntry.Username == "" {
|
||||
t.Fatalf("expected {Username} non zero length")
|
||||
}
|
||||
|
||||
if len(responseEntry.DkgCommit) == 0 {
|
||||
|
@ -534,8 +534,8 @@ func Test_DkgProposal_EventDKGDealConfirmationReceived(t *testing.T) {
|
|||
t.Fatalf("expected exist {ParticipantId}")
|
||||
}
|
||||
|
||||
if responseEntry.Addr == "" {
|
||||
t.Fatalf("expected {Addr} non zero length")
|
||||
if responseEntry.Username == "" {
|
||||
t.Fatalf("expected {Username} non zero length")
|
||||
}
|
||||
|
||||
if len(responseEntry.DkgDeal) == 0 {
|
||||
|
@ -653,8 +653,8 @@ func Test_DkgProposal_EventDKGResponseConfirmationReceived_Positive(t *testing.T
|
|||
t.Fatalf("expected exist {ParticipantId}")
|
||||
}
|
||||
|
||||
if responseEntry.Addr == "" {
|
||||
t.Fatalf("expected {Addr} non zero length")
|
||||
if responseEntry.Username == "" {
|
||||
t.Fatalf("expected {Username} non zero length")
|
||||
}
|
||||
|
||||
if len(responseEntry.DkgResponse) == 0 {
|
||||
|
@ -897,6 +897,7 @@ func Test_SigningProposal_EventSigningStart(t *testing.T) {
|
|||
compareState(t, sif.StateSigningIdle, inState)
|
||||
|
||||
fsmResponse, testFSMDump[sif.StateSigningAwaitConfirmations], err = testFSMInstance.Do(sif.EventSigningStart, requests.SigningProposalStartRequest{
|
||||
SigningID: "test-signing-id",
|
||||
ParticipantId: 1,
|
||||
SrcPayload: []byte("message to sign"),
|
||||
CreatedAt: time.Now(),
|
||||
|
|
|
@ -4,11 +4,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/config"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/fsm/config"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
)
|
||||
|
||||
// init -> awaitingConfirmations
|
||||
|
@ -40,9 +40,8 @@ func (m *SignatureProposalFSM) actionInitSignatureProposal(inEvent fsm.Event, ar
|
|||
}
|
||||
|
||||
for index, participant := range request.Participants {
|
||||
//participantId := createFingerprint(&participant.DkgPubKey)
|
||||
m.payload.SignatureProposalPayload.Quorum[index] = &internal.SignatureProposalParticipant{
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
PubKey: participant.PubKey,
|
||||
DkgPubKey: participant.DkgPubKey,
|
||||
Status: internal.SigConfirmationAwaitConfirmation,
|
||||
|
@ -50,8 +49,8 @@ func (m *SignatureProposalFSM) actionInitSignatureProposal(inEvent fsm.Event, ar
|
|||
UpdatedAt: request.CreatedAt,
|
||||
}
|
||||
|
||||
m.payload.SetPubKeyAddr(participant.Addr, participant.PubKey)
|
||||
m.payload.SetIDAddr(participant.Addr, index)
|
||||
m.payload.SetPubKeyUsername(participant.Username, participant.PubKey)
|
||||
m.payload.SetIDUsername(participant.Username, index)
|
||||
}
|
||||
|
||||
// Checking fo quorum length
|
||||
|
@ -67,7 +66,7 @@ func (m *SignatureProposalFSM) actionInitSignatureProposal(inEvent fsm.Event, ar
|
|||
for participantId, participant := range m.payload.SignatureProposalPayload.Quorum {
|
||||
responseEntry := &responses.SignatureProposalParticipantInvitationEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
Threshold: participant.Threshold,
|
||||
DkgPubKey: participant.DkgPubKey,
|
||||
PubKey: participant.PubKey,
|
||||
|
@ -171,7 +170,7 @@ func (m *SignatureProposalFSM) actionValidateSignatureProposal(fsm.Event, ...int
|
|||
for participantId, participant := range m.payload.SignatureProposalPayload.Quorum {
|
||||
responseEntry := &responses.SignatureProposalParticipantStatusEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
Status: uint8(participant.Status),
|
||||
}
|
||||
responseData = append(responseData, responseEntry)
|
||||
|
|
|
@ -3,8 +3,8 @@ package signature_proposal_fsm
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,11 +4,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/config"
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/depools/dc4bc/fsm/types/requests"
|
||||
"github.com/depools/dc4bc/fsm/types/responses"
|
||||
"github.com/lidofinance/dc4bc/fsm/config"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/requests"
|
||||
"github.com/lidofinance/dc4bc/fsm/types/responses"
|
||||
)
|
||||
|
||||
func (m *SigningProposalFSM) actionInitSigningProposal(inEvent fsm.Event, args ...interface{}) (outEvent fsm.Event, response interface{}, err error) {
|
||||
|
@ -60,12 +60,7 @@ func (m *SigningProposalFSM) actionStartSigningProposal(inEvent fsm.Event, args
|
|||
return
|
||||
}
|
||||
|
||||
m.payload.SigningProposalPayload.SigningId, err = generateSigningId()
|
||||
|
||||
if err != nil {
|
||||
err = errors.New("cannot generate {SigningId}")
|
||||
return
|
||||
}
|
||||
m.payload.SigningProposalPayload.SigningId = request.SigningID
|
||||
|
||||
m.payload.SigningProposalPayload.InitiatorId = request.ParticipantId
|
||||
m.payload.SigningProposalPayload.SrcPayload = request.SrcPayload
|
||||
|
@ -75,7 +70,7 @@ func (m *SigningProposalFSM) actionStartSigningProposal(inEvent fsm.Event, args
|
|||
// Initialize new quorum
|
||||
for id, dkgEntry := range m.payload.DKGProposalPayload.Quorum {
|
||||
m.payload.SigningProposalPayload.Quorum[id] = &internal.SigningProposalParticipant{
|
||||
Addr: dkgEntry.Addr,
|
||||
Username: dkgEntry.Username,
|
||||
Status: internal.SigningAwaitConfirmation,
|
||||
UpdatedAt: request.CreatedAt,
|
||||
}
|
||||
|
@ -95,7 +90,7 @@ func (m *SigningProposalFSM) actionStartSigningProposal(inEvent fsm.Event, args
|
|||
for participantId, participant := range m.payload.SigningProposalPayload.Quorum {
|
||||
responseEntry := &responses.SigningProposalParticipantInvitationEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
Status: uint8(participant.Status),
|
||||
}
|
||||
responseData.Participants = append(responseData.Participants, responseEntry)
|
||||
|
@ -296,7 +291,7 @@ func (m *SigningProposalFSM) actionValidateSigningPartialSignsAwaitConfirmations
|
|||
for participantId, participant := range m.payload.SigningProposalPayload.Quorum {
|
||||
responseEntry := &responses.SigningProcessParticipantEntry{
|
||||
ParticipantId: participantId,
|
||||
Addr: participant.Addr,
|
||||
Username: participant.Username,
|
||||
PartialSign: participant.PartialSign,
|
||||
}
|
||||
responseData.Participants = append(responseData.Participants, responseEntry)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package signing_proposal_fsm
|
||||
|
||||
import (
|
||||
"github.com/depools/dc4bc/fsm/fsm"
|
||||
dkp "github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/depools/dc4bc/fsm/state_machines/internal"
|
||||
"github.com/lidofinance/dc4bc/fsm/fsm"
|
||||
dkp "github.com/lidofinance/dc4bc/fsm/state_machines/dkg_proposal_fsm"
|
||||
"github.com/lidofinance/dc4bc/fsm/state_machines/internal"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ type SignatureProposalParticipantsListRequest struct {
|
|||
}
|
||||
|
||||
type SignatureProposalParticipantsEntry struct {
|
||||
Addr string
|
||||
Username string
|
||||
PubKey []byte
|
||||
DkgPubKey []byte
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/depools/dc4bc/fsm/config"
|
||||
"github.com/lidofinance/dc4bc/fsm/config"
|
||||
)
|
||||
|
||||
func (r *SignatureProposalParticipantsListRequest) Validate() error {
|
||||
|
@ -20,21 +20,21 @@ func (r *SignatureProposalParticipantsListRequest) Validate() error {
|
|||
return errors.New("{SigningThreshold} cannot be higher than {ParticipantsCount}")
|
||||
}
|
||||
|
||||
uniqueAddresses := make(map[string]bool)
|
||||
uniqueUsernames := make(map[string]bool)
|
||||
for _, participant := range r.Participants {
|
||||
if _, ok := uniqueAddresses[participant.Addr]; ok {
|
||||
return errors.New("{Addr} must be unique")
|
||||
if _, ok := uniqueUsernames[participant.Username]; ok {
|
||||
return errors.New("{Username} must be unique")
|
||||
}
|
||||
uniqueAddresses[participant.Addr] = true
|
||||
uniqueUsernames[participant.Username] = true
|
||||
}
|
||||
|
||||
for _, participant := range r.Participants {
|
||||
if len(participant.Addr) < 3 {
|
||||
return errors.New("{Addr} minimum length is {3}")
|
||||
if len(participant.Username) < 3 {
|
||||
return errors.New("{Username} minimum length is {3}")
|
||||
}
|
||||
|
||||
if len(participant.Addr) > 150 {
|
||||
return errors.New("{Addr} maximum length is {150}")
|
||||
if len(participant.Username) > 150 {
|
||||
return errors.New("{Username} maximum length is {150}")
|
||||
}
|
||||
|
||||
if len(participant.PubKey) < 10 {
|
||||
|
|
|
@ -5,6 +5,7 @@ import "time"
|
|||
// States: "stage_signing_idle"
|
||||
// Events: "event_signing_start"
|
||||
type SigningProposalStartRequest struct {
|
||||
SigningID string
|
||||
ParticipantId int
|
||||
SrcPayload []byte
|
||||
CreatedAt time.Time
|
||||
|
|
|
@ -4,7 +4,7 @@ type DKGProposalPubKeysParticipantResponse []*DKGProposalPubKeysParticipantEntry
|
|||
|
||||
type DKGProposalPubKeysParticipantEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
DkgPubKey []byte
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ type DKGProposalCommitParticipantResponse []*DKGProposalCommitParticipantEntry
|
|||
|
||||
type DKGProposalCommitParticipantEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
DkgCommit []byte
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ type DKGProposalDealParticipantResponse []*DKGProposalDealParticipantEntry
|
|||
|
||||
type DKGProposalDealParticipantEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
DkgDeal []byte
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,6 @@ type DKGProposalResponseParticipantResponse []*DKGProposalResponseParticipantEnt
|
|||
|
||||
type DKGProposalResponseParticipantEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
DkgResponse []byte
|
||||
}
|
||||
|
|
|
@ -8,11 +8,10 @@ type SignatureProposalParticipantInvitationsResponse []*SignatureProposalPartici
|
|||
|
||||
type SignatureProposalParticipantInvitationEntry struct {
|
||||
ParticipantId int
|
||||
// Public title for address, such as name, nickname, organization
|
||||
Addr string
|
||||
Threshold int
|
||||
DkgPubKey []byte
|
||||
PubKey []byte
|
||||
Username string
|
||||
Threshold int
|
||||
DkgPubKey []byte
|
||||
PubKey []byte
|
||||
}
|
||||
|
||||
// Public lists for proposal confirmation process
|
||||
|
@ -21,7 +20,7 @@ type SignatureProposalParticipantStatusResponse []*SignatureProposalParticipantS
|
|||
|
||||
type SignatureProposalParticipantStatusEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
Status uint8
|
||||
DkgPubKey []byte
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ type SigningProposalParticipantInvitationsResponse struct {
|
|||
|
||||
type SigningProposalParticipantInvitationEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
Status uint8
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ type SigningProposalParticipantStatusResponse struct {
|
|||
|
||||
type SigningProposalParticipantStatusEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
Status uint8
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,6 @@ type SigningProcessParticipantResponse struct {
|
|||
|
||||
type SigningProcessParticipantEntry struct {
|
||||
ParticipantId int
|
||||
Addr string
|
||||
Username string
|
||||
PartialSign []byte
|
||||
}
|
||||
|
|
11
go.mod
11
go.mod
|
@ -1,14 +1,16 @@
|
|||
module github.com/depools/dc4bc
|
||||
module github.com/lidofinance/dc4bc
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/corestario/kyber v1.6.0
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 // indirect
|
||||
github.com/corestario/kyber v1.6.1-0.20201110123848-0eac241a9f75
|
||||
github.com/golang/mock v1.4.4
|
||||
github.com/google/go-cmp v0.5.0
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b
|
||||
github.com/makiuchi-d/gozxing v0.0.0-20190830103442-eaff64b1ceb7
|
||||
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2 // indirect
|
||||
github.com/prysmaticlabs/prysm v1.0.0-alpha.29.0.20201014075528-022b6667e5d0
|
||||
github.com/segmentio/kafka-go v0.4.2
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||
|
@ -16,10 +18,9 @@ require (
|
|||
github.com/stretchr/testify v1.6.1
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
|
||||
gocv.io/x/gocv v0.24.0
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
|
||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
|
||||
gopkg.in/matryer/try.v1 v1.0.0-20150601225556-312d2599e12e
|
||||
lukechampine.com/frand v1.3.0
|
||||
)
|
||||
|
||||
replace golang.org/x/crypto => github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5
|
||||
|
||||
replace github.com/ethereum/go-ethereum => github.com/ethereum/go-ethereum v1.9.22
|
||||
|
|
160
go.sum
160
go.sum
|
@ -40,12 +40,15 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
|
|||
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||
github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw=
|
||||
github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
|
||||
|
@ -56,6 +59,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
|
|||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
|
||||
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||
github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
|
||||
|
@ -64,6 +68,7 @@ github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VT
|
|||
github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks=
|
||||
github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA=
|
||||
github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ=
|
||||
github.com/aristanetworks/goarista v0.0.0-20200521140103-6c3304613b30 h1:cgk6xsRVshE29qzHDCQ+tqmu7ny8GnjPQhAw/RTk/Co=
|
||||
github.com/aristanetworks/goarista v0.0.0-20200521140103-6c3304613b30/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE=
|
||||
github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
|
@ -71,11 +76,13 @@ github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
|
|||
github.com/aws/aws-sdk-go v1.33.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.33.15/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/bazelbuild/buildtools v0.0.0-20200528175155-f4e8394f069d/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
|
||||
github.com/bazelbuild/rules_go v0.23.2 h1:Wxu7JjqnF78cKZbsBsARLSXx/jlGaSLCnUV3mTlyHvM=
|
||||
github.com/bazelbuild/rules_go v0.23.2/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M=
|
||||
github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
|
||||
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
|
@ -84,6 +91,7 @@ github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnC
|
|||
github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8=
|
||||
github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
|
||||
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
|
||||
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
|
||||
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
|
@ -96,9 +104,14 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f
|
|||
github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
||||
github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU=
|
||||
github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764=
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
|
@ -114,14 +127,16 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
|
|||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/corestario/kyber v1.3.0/go.mod h1:kIWfWekm8kSJNti3Fo3DCV0GHEH050MWQrdvZdefbkk=
|
||||
github.com/corestario/kyber v1.5.0 h1:wNkoKD6yYAJV8p8JmJYF0jdJzCx4LlDJQT6wobWPl+I=
|
||||
github.com/corestario/kyber v1.5.0/go.mod h1:mzxQ0SX6j2O1bH1EbCDcXxnEZx2pDskatkkSaINGKVA=
|
||||
github.com/corestario/kyber v1.6.0 h1:ix91T0CMHjT2dlLaJbg5e/qYOG/Fvx0YHC4qdiE8BxY=
|
||||
github.com/corestario/kyber v1.6.0/go.mod h1:8seqKJ5KGwEPN98iYQLoKFulfFn90ZxcdKSxb29A5XM=
|
||||
github.com/corestario/kyber v1.6.1-0.20201110123848-0eac241a9f75 h1:n7+2NN6aB+ZE/eM5+1E1KFO7tASgdohQ97OWHORgogM=
|
||||
github.com/corestario/kyber v1.6.1-0.20201110123848-0eac241a9f75/go.mod h1:8seqKJ5KGwEPN98iYQLoKFulfFn90ZxcdKSxb29A5XM=
|
||||
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/d4l3k/messagediff v1.2.1 h1:ZcAIMYsUg0EAp9X+tt8/enBE/Q8Yd5kzPynLyKptt9U=
|
||||
github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkEQxENCrlLo=
|
||||
github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
|
||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -131,19 +146,20 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4=
|
||||
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U=
|
||||
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
|
||||
github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ=
|
||||
github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
|
||||
github.com/depools/kyber-bls12381 v0.0.0-20200929134032-c24859b7d890 h1:ra3VcXLAwGdHzcPRXkDVVr2Gb9wpi+XHyljk0J566vs=
|
||||
github.com/depools/kyber-bls12381 v0.0.0-20200929134032-c24859b7d890/go.mod h1:82QP3olqMtRnlRCNxEc9/EKk1qlFCOklxasHvSnXMSI=
|
||||
github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ=
|
||||
github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
|
||||
github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
|
||||
github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU=
|
||||
github.com/dgraph-io/ristretto v0.0.1/go.mod h1:T40EBc7CJke8TkpiYfGGKAeFjSaxuFXhuXRyumBd6RE=
|
||||
github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
|
||||
github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI=
|
||||
github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ=
|
||||
github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
|
||||
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
|
||||
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
|
@ -158,6 +174,7 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1
|
|||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts=
|
||||
github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/emicklei/dot v0.11.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
|
||||
|
@ -166,28 +183,35 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
|||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/ethereum/go-ethereum v1.9.22 h1:/Fea9n2EWJuNJ9oahMq9luqjRBcbW7QWdThbcJl13ek=
|
||||
github.com/ethereum/go-ethereum v1.9.22/go.mod h1:FQjK3ZwD8C5DYn7ukTmFee36rq1dOMESiUfXr5RUc1w=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/ferranbt/fastssz v0.0.0-20200514094935-99fccaf93472/go.mod h1:LlFXPmgrgVYsuoFDwV8rDJ9tvt1pLQdjKvU1b5IRES0=
|
||||
github.com/ferranbt/fastssz v0.0.0-20200728110133-0b6e349af87a/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
|
||||
github.com/ferranbt/fastssz v0.0.0-20200826142241-3a913c5a1313 h1:8DS7uDmUkGF6UKNU1HivEsjrTusxLPb05KUr/D8ONWQ=
|
||||
github.com/ferranbt/fastssz v0.0.0-20200826142241-3a913c5a1313/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
|
||||
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
|
||||
github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||
github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk=
|
||||
github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
|
||||
github.com/fsnotify/fsnotify v1.4.3-0.20170329110642-4da3e2cfbabc/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/garyburd/redigo v1.1.1-0.20170914051019-70e1b1943d4f/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
||||
github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays=
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
|
||||
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
|
||||
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
|
||||
|
@ -196,10 +220,14 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9
|
|||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg=
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=
|
||||
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
|
||||
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
|
||||
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
|
||||
|
@ -209,12 +237,15 @@ github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq
|
|||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.6.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
|
||||
github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/gddo v0.0.0-20200528160355-8d077c1d8f4c/go.mod h1:sam69Hju0uq+5uvLJUMDlsKlQ21Vrs1Kd/1YFPNYdOU=
|
||||
|
@ -223,6 +254,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
|
|||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/lint v0.0.0-20170918230701-e5d664eb928e/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
|
@ -246,6 +278,7 @@ github.com/golang/protobuf v1.4.0-rc.4/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9c
|
|||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
|
@ -262,9 +295,11 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a
|
|||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64=
|
||||
github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=
|
||||
github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=
|
||||
|
@ -287,6 +322,7 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR
|
|||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=
|
||||
github.com/graph-gophers/graphql-go v0.0.0-20200309224638-dae41bde9ef9/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=
|
||||
|
@ -297,20 +333,25 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9G
|
|||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
|
||||
github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU=
|
||||
github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48=
|
||||
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v0.0.0-20170914154624-68e816d1c783/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/herumi/bls-eth-go-binary v0.0.0-20200706085701-832d8c2c0f7d/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U=
|
||||
github.com/herumi/bls-eth-go-binary v0.0.0-20200722032157-41fc56eba7b4 h1:TfBVK1MJ9vhrMXWVHu5p/MlVHZTeCGgDAEu5RykVZeI=
|
||||
github.com/herumi/bls-eth-go-binary v0.0.0-20200722032157-41fc56eba7b4/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U=
|
||||
github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw=
|
||||
github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo=
|
||||
github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc=
|
||||
github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o=
|
||||
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20200424224625-be1b05b0b279/go.mod h1:a5aratAVTWyz+nJMmDsN8O4XTfaLfdAsB1ysCmZX5Bw=
|
||||
|
@ -363,6 +404,7 @@ github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHn
|
|||
github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=
|
||||
github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
||||
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||
github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs=
|
||||
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
|
||||
|
@ -382,6 +424,7 @@ github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlT
|
|||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
|
@ -397,10 +440,9 @@ github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F
|
|||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
||||
github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0=
|
||||
github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
|
||||
github.com/karalabe/usb v0.0.0-20191104083709-911d15fe12a9 h1:ZHuwnjpP8LsVsUYqTqeVAI+GfDfJ6UNPrExZF+vX/DQ=
|
||||
github.com/karalabe/usb v0.0.0-20191104083709-911d15fe12a9/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
|
||||
github.com/kevinms/leakybucket-go v0.0.0-20200115003610-082473db97ca/go.mod h1:ph+C5vpnCcQvKBwJwKLTK3JLNGnBXYlG7m7JjoC/zYA=
|
||||
github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f h1:qET3Wx0v8tMtoTOQnsJXVvqvCopSf48qobR6tcJuDHo=
|
||||
github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s=
|
||||
github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391 h1:51kHw7l/dUDdOdW06AlUGT5jnpj6nqQSILebcsikSjA=
|
||||
github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
|
@ -418,11 +460,14 @@ github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPR
|
|||
github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||
github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
|
@ -562,9 +607,9 @@ github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZ
|
|||
github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
|
||||
github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE=
|
||||
github.com/libp2p/go-yamux v1.3.8/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE=
|
||||
github.com/lidofinance/kyber-bls12381 v0.0.0-20200929134032-c24859b7d890 h1:ra3VcXLAwGdHzcPRXkDVVr2Gb9wpi+XHyljk0J566vs=
|
||||
github.com/lidofinance/kyber-bls12381 v0.0.0-20200929134032-c24859b7d890/go.mod h1:82QP3olqMtRnlRCNxEc9/EKk1qlFCOklxasHvSnXMSI=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20=
|
||||
github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI=
|
||||
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/magiconair/properties v1.7.4-0.20170902060319-8d7837e64d3c/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
|
@ -574,10 +619,13 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN
|
|||
github.com/makiuchi-d/gozxing v0.0.0-20190830103442-eaff64b1ceb7 h1:CfWnkHgRG8zmxQI7RAhLIUFPkg+RfDdWiEtoE3y1+4w=
|
||||
github.com/makiuchi-d/gozxing v0.0.0-20190830103442-eaff64b1ceb7/go.mod h1:WoI7z45M7ZNA5BJxiJHaB+x7+k8S/3phW5Y13IR4yWY=
|
||||
github.com/manifoldco/promptui v0.7.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ=
|
||||
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2 h1:JAEbJn3j/FrhdWA9jW8B5ajsLIjeuEHLi8xE4fk997o=
|
||||
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.0.10-0.20170816031813-ad5389df28cd/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||
github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||
|
@ -587,34 +635,43 @@ github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXT
|
|||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
|
||||
github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
|
||||
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=
|
||||
github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA=
|
||||
github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc=
|
||||
github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=
|
||||
github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=
|
||||
github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=
|
||||
github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
||||
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20170523030023-d0303fe80992/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg=
|
||||
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
|
||||
github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
|
||||
|
@ -665,10 +722,12 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+
|
|||
github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=
|
||||
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
|
||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8=
|
||||
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
|
||||
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
|
@ -679,6 +738,7 @@ github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
|
|||
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
||||
|
@ -687,6 +747,7 @@ github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
|
|||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
|
||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc=
|
||||
github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696/go.mod h1:ym2A+zigScwkSEb/cVQB0/ZMpU3rqiH6X7WRRsxgOGw=
|
||||
|
@ -694,15 +755,18 @@ github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt
|
|||
github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||
github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE=
|
||||
github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
|
||||
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.0.1-0.20170904195809-1d6b12b7cb29/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
|
||||
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
|
||||
github.com/peterh/liner v1.2.0 h1:w/UPXyl5GfahFxcTOz2j9wCIHNI+pUPr2laqpojKNCg=
|
||||
github.com/peterh/liner v1.2.0/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
|
||||
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
|
||||
|
@ -711,6 +775,7 @@ github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/
|
|||
github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
|
@ -721,46 +786,60 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf
|
|||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
|
||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||
github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.0.10/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic=
|
||||
github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4=
|
||||
github.com/protolambda/zssz v0.1.3/go.mod h1:a4iwOX5FE7/JkKA+J/PH0Mjo9oXftN6P8NZyL28gpag=
|
||||
github.com/protolambda/zssz v0.1.5 h1:7fjJjissZIIaa2QcvmhS/pZISMX21zVITt49sW1ouek=
|
||||
github.com/protolambda/zssz v0.1.5/go.mod h1:a4iwOX5FE7/JkKA+J/PH0Mjo9oXftN6P8NZyL28gpag=
|
||||
github.com/prysmaticlabs/ethereumapis v0.0.0-20201003171600-a72e5f77d233 h1:dGeuKeaXxCepTbwsz7kYSfP1yazw1uRMn58CqNCcPP4=
|
||||
github.com/prysmaticlabs/ethereumapis v0.0.0-20201003171600-a72e5f77d233/go.mod h1:k7b2dxy6RppCG6kmOJkNOXzRpEoTdsPygc2aQhsUsZk=
|
||||
github.com/prysmaticlabs/go-bitfield v0.0.0-20191017011753-53b773adde52/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=
|
||||
github.com/prysmaticlabs/go-bitfield v0.0.0-20200322041314-62c2aee71669/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=
|
||||
github.com/prysmaticlabs/go-bitfield v0.0.0-20200618145306-2ae0807bef65 h1:hJfAWrlxx7SKpn4S/h2JGl2HHwA1a2wSS3HAzzZ0F+U=
|
||||
github.com/prysmaticlabs/go-bitfield v0.0.0-20200618145306-2ae0807bef65/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=
|
||||
github.com/prysmaticlabs/go-ssz v0.0.0-20200101200214-e24db4d9e963/go.mod h1:VecIJZrewdAuhVckySLFt2wAAHRME934bSDurP8ftkc=
|
||||
github.com/prysmaticlabs/go-ssz v0.0.0-20200612203617-6d5c9aa213ae h1:7qd0Af1ozWKBU3c93YW2RH+/09hJns9+ftqWUZyts9c=
|
||||
github.com/prysmaticlabs/go-ssz v0.0.0-20200612203617-6d5c9aa213ae/go.mod h1:VecIJZrewdAuhVckySLFt2wAAHRME934bSDurP8ftkc=
|
||||
github.com/prysmaticlabs/prombbolt v0.0.0-20200324184628-09789ef63796/go.mod h1:5JkKm84FcLZQPNuHwjX8Mtd5emni/PH5CylWCNqnKos=
|
||||
github.com/prysmaticlabs/prysm v1.0.0-alpha.29.0.20201014075528-022b6667e5d0 h1:TZg4sDJleyNd+P73Dhui1UaK4h+B7Ze4dqsz9YFeWO0=
|
||||
github.com/prysmaticlabs/prysm v1.0.0-alpha.29.0.20201014075528-022b6667e5d0/go.mod h1:bjLGVTnG4zNKtguTnm22tS/nB7NGzbDz60z1nMvvqRU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc=
|
||||
github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=
|
||||
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ=
|
||||
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
|
@ -771,10 +850,13 @@ github.com/segmentio/kafka-go v0.4.2 h1:QXZ6q9Bu1JkAJQ/CQBb2Av8pFRG8LQ0kWCrLXgQy
|
|||
github.com/segmentio/kafka-go v0.4.2/go.mod h1:Inh7PqOsxmfgasV8InZYKVXWsdjcCq2d9tFV75GLbuM=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0/go.mod h1:7AwjWCpdPhkSmNAgUv5C7EJ4AbmjEB3r047r3DXWu3Y=
|
||||
github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I=
|
||||
github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
|
||||
|
@ -785,6 +867,7 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k
|
|||
github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0=
|
||||
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v0.0.0-20170901052352-ee1bd8ee15a1/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
|
@ -808,8 +891,11 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
|
|||
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||
github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 h1:Oo2KZNP70KE0+IUJSidPj/BFS/RXNHmKIJOdckzml2E=
|
||||
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE=
|
||||
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw=
|
||||
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM=
|
||||
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
|
@ -820,6 +906,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
|
|||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/supranational/blst v0.1.2-alpha.1.0.20200917144033-cd0847a7580b h1:ofaf5ea+Xq4P7OdOWTwHUuLO/0sjAIoQHiJTDbhjbB4=
|
||||
github.com/supranational/blst v0.1.2-alpha.1.0.20200917144033-cd0847a7580b/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
|
||||
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
|
||||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
||||
|
@ -833,11 +920,14 @@ github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW
|
|||
github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
|
||||
github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8=
|
||||
github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
|
||||
github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
|
||||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4=
|
||||
github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
||||
github.com/wealdtech/eth2-signer-api v1.3.0/go.mod h1:H8OpAoTBl6CaBvZEnhxWDjjWXNc3kwVFKWMAZd6sHlk=
|
||||
github.com/wealdtech/go-bytesutil v1.0.1/go.mod h1:jENeMqeTEU8FNZyDFRVc7KqBdRKSnJ9CCh26TcuNb9s=
|
||||
|
@ -865,6 +955,7 @@ github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84
|
|||
github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI=
|
||||
github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg=
|
||||
github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
|
||||
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk=
|
||||
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees=
|
||||
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
|
||||
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk=
|
||||
|
@ -893,6 +984,7 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
|||
go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
|
@ -908,6 +1000,33 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
|||
go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
||||
gocv.io/x/gocv v0.24.0 h1:xtm5AnFNUtFvSmU+R/CgX7FguL7EDGEubhDdviX2rPY=
|
||||
gocv.io/x/gocv v0.24.0/go.mod h1:Rar2PS6DV+T4FL+PM535EImD/h13hGVaHhnCu1xarBs=
|
||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=
|
||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
|
@ -969,12 +1088,14 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL
|
|||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/oauth2 v0.0.0-20170912212905-13449ad91cb2/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20170517211232-f52d1811a629/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -1035,6 +1156,7 @@ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 h1:AvbQYmiaaaza3cW3QXRyPo5kYgpFIzOAfeAAN7m3qQ4=
|
||||
golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -1046,6 +1168,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||
golang.org/x/time v0.0.0-20170424234030-8be79e1e0910/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
@ -1108,6 +1231,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl
|
|||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20170918111702-1e559d0a00ee/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
|
@ -1132,6 +1256,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG
|
|||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20200528191852-705c0b31589b/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||
google.golang.org/genproto v0.0.0-20200730144737-007c33dbd381 h1:Q0pgDmaT3uO0cF7R0ctyAlhLj2I/xJ+FZyDBOZux0xk=
|
||||
google.golang.org/genproto v0.0.0-20200730144737-007c33dbd381/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/grpc v1.2.1-0.20170921194603-d4b75ebd4f9f/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
|
@ -1146,6 +1271,7 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
|
|||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||
google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||
google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
|
@ -1157,6 +1283,7 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
|
|||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610=
|
||||
|
@ -1165,16 +1292,21 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
|
|||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/confluentinc/confluent-kafka-go.v1 v1.4.2/go.mod h1:ZdI3yfYmdNSLQPNCpO1y00EHyWaHG5EnQEyL/ntAegY=
|
||||
gopkg.in/d4l3k/messagediff.v1 v1.2.1 h1:70AthpjunwzUiarMHyED52mj9UwtAnE89l1Gmrt3EU0=
|
||||
gopkg.in/d4l3k/messagediff.v1 v1.2.1/go.mod h1:EUzikiKadqXWcD1AzJLagx0j/BeeWGtn++04Xniyg44=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
|
||||
gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
|
||||
gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
|
||||
gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
|
||||
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
|
||||
gopkg.in/matryer/try.v1 v1.0.0-20150601225556-312d2599e12e h1:bJHzu9Qwc9wQRWJ/WVkJGAfs+riucl/tKAFNxf9pzqk=
|
||||
gopkg.in/matryer/try.v1 v1.0.0-20150601225556-312d2599e12e/go.mod h1:tve0rTLdGlwnXF7iBO9rbAEyeXvuuPx0n4DvXS/Nw7o=
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
|
||||
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=
|
||||
gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA=
|
||||
|
@ -1183,6 +1315,7 @@ gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVY
|
|||
gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
|
||||
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
@ -1192,6 +1325,7 @@ gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
|||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
@ -1201,16 +1335,22 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
k8s.io/api v0.18.3 h1:2AJaUQdgUZLoDZHrun21PW2Nx9+ll6cUzvn3IKhSIn0=
|
||||
k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA=
|
||||
k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk=
|
||||
k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko=
|
||||
k8s.io/client-go v0.18.3 h1:QaJzz92tsN67oorwzmoB0a9r9ZVHuD5ryjbCKP0U22k=
|
||||
k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
|
||||
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
k8s.io/utils v0.0.0-20200520001619-278ece378a50 h1:ZtTUW5+ZWaoqjR3zOpRa7oFJ5d4aA22l4me/xArfOIc=
|
||||
k8s.io/utils v0.0.0-20200520001619-278ece378a50/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
lukechampine.com/frand v1.3.0 h1:HFLrwEHr78+EqAfyp8OChgEzdYCVZzzj6Y+cGDQRhaI=
|
||||
lukechampine.com/frand v1.3.0/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s=
|
||||
|
@ -1219,6 +1359,8 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
|||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
package clientMocks
|
||||
|
||||
import (
|
||||
client "github.com/depools/dc4bc/client"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
client "github.com/lidofinance/dc4bc/client"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
package clientMocks
|
||||
|
||||
import (
|
||||
types "github.com/depools/dc4bc/client/types"
|
||||
state_machines "github.com/depools/dc4bc/fsm/state_machines"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
types "github.com/lidofinance/dc4bc/client/types"
|
||||
state_machines "github.com/lidofinance/dc4bc/fsm/state_machines"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
|
@ -180,19 +180,19 @@ func (mr *MockStateMockRecorder) SaveSignature(signature interface{}) *gomock.Ca
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSignature", reflect.TypeOf((*MockState)(nil).SaveSignature), signature)
|
||||
}
|
||||
|
||||
// GetSignatureByDataHash mocks base method
|
||||
func (m *MockState) GetSignatureByDataHash(dkgID, signatureID string) ([]types.ReconstructedSignature, error) {
|
||||
// GetSignatureByID mocks base method
|
||||
func (m *MockState) GetSignatureByID(dkgID, signatureID string) ([]types.ReconstructedSignature, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetSignatureByDataHash", dkgID, signatureID)
|
||||
ret := m.ctrl.Call(m, "GetSignatureByID", dkgID, signatureID)
|
||||
ret0, _ := ret[0].([]types.ReconstructedSignature)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetSignatureByDataHash indicates an expected call of GetSignatureByDataHash
|
||||
func (mr *MockStateMockRecorder) GetSignatureByDataHash(dkgID, signatureID interface{}) *gomock.Call {
|
||||
// GetSignatureByID indicates an expected call of GetSignatureByID
|
||||
func (mr *MockStateMockRecorder) GetSignatureByID(dkgID, signatureID interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSignatureByDataHash", reflect.TypeOf((*MockState)(nil).GetSignatureByDataHash), dkgID, signatureID)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSignatureByID", reflect.TypeOf((*MockState)(nil).GetSignatureByID), dkgID, signatureID)
|
||||
}
|
||||
|
||||
// GetSignatures mocks base method
|
||||
|
|
|
@ -84,3 +84,15 @@ func (mr *MockProcessorMockRecorder) SetChunkSize(chunkSize interface{}) *gomock
|
|||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetChunkSize", reflect.TypeOf((*MockProcessor)(nil).SetChunkSize), chunkSize)
|
||||
}
|
||||
|
||||
// CloseCameraReader mocks base method
|
||||
func (m *MockProcessor) CloseCameraReader() {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "CloseCameraReader")
|
||||
}
|
||||
|
||||
// CloseCameraReader indicates an expected call of CloseCameraReader
|
||||
func (mr *MockProcessorMockRecorder) CloseCameraReader() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseCameraReader", reflect.TypeOf((*MockProcessor)(nil).CloseCameraReader))
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
package storageMocks
|
||||
|
||||
import (
|
||||
storage "github.com/depools/dc4bc/storage"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
storage "github.com/lidofinance/dc4bc/storage"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
|
|
78
qr/qr.go
78
qr/qr.go
|
@ -30,15 +30,24 @@ type Processor interface {
|
|||
WriteQR(path string, data []byte) error
|
||||
SetDelay(delay int)
|
||||
SetChunkSize(chunkSize int)
|
||||
CloseCameraReader()
|
||||
}
|
||||
|
||||
type CameraProcessor struct {
|
||||
gifFramesDelay int
|
||||
chunkSize int
|
||||
|
||||
closeCameraReader chan bool
|
||||
}
|
||||
|
||||
func NewCameraProcessor() *CameraProcessor {
|
||||
return &CameraProcessor{}
|
||||
func NewCameraProcessor() Processor {
|
||||
return &CameraProcessor{
|
||||
closeCameraReader: make(chan bool),
|
||||
}
|
||||
}
|
||||
|
||||
func (p *CameraProcessor) CloseCameraReader() {
|
||||
p.closeCameraReader <- true
|
||||
}
|
||||
|
||||
func (p *CameraProcessor) SetDelay(delay int) {
|
||||
|
@ -73,37 +82,43 @@ func (p *CameraProcessor) ReadQR() ([]byte, error) {
|
|||
chunks := make([]*chunk, 0)
|
||||
decodedChunksCount := uint(0)
|
||||
// detects and scans QR-cods from camera until we scan successfully
|
||||
READER:
|
||||
for {
|
||||
webcam.Read(&img)
|
||||
window.IMShow(img)
|
||||
window.WaitKey(1)
|
||||
select {
|
||||
case <-p.closeCameraReader:
|
||||
return nil, fmt.Errorf("camera reader was closed")
|
||||
default:
|
||||
webcam.Read(&img)
|
||||
window.IMShow(img)
|
||||
window.WaitKey(1)
|
||||
|
||||
imgObject, err := img.ToImage()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get image object: %w", err)
|
||||
}
|
||||
data, err := ReadDataFromQR(imgObject)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
decodedChunk, err := decodeChunk(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if cap(chunks) == 0 {
|
||||
chunks = make([]*chunk, decodedChunk.Total)
|
||||
}
|
||||
if decodedChunk.Index > decodedChunk.Total {
|
||||
return nil, fmt.Errorf("invalid QR-code chunk")
|
||||
}
|
||||
if chunks[decodedChunk.Index] != nil {
|
||||
continue
|
||||
}
|
||||
chunks[decodedChunk.Index] = decodedChunk
|
||||
decodedChunksCount++
|
||||
window.SetWindowTitle(fmt.Sprintf("Read %d/%d chunks", decodedChunksCount, decodedChunk.Total))
|
||||
if decodedChunksCount == decodedChunk.Total {
|
||||
break
|
||||
imgObject, err := img.ToImage()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get image object: %w", err)
|
||||
}
|
||||
data, err := ReadDataFromQR(imgObject)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
decodedChunk, err := decodeChunk(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if cap(chunks) == 0 {
|
||||
chunks = make([]*chunk, decodedChunk.Total)
|
||||
}
|
||||
if decodedChunk.Index > decodedChunk.Total {
|
||||
return nil, fmt.Errorf("invalid QR-code chunk")
|
||||
}
|
||||
if chunks[decodedChunk.Index] != nil {
|
||||
continue
|
||||
}
|
||||
chunks[decodedChunk.Index] = decodedChunk
|
||||
decodedChunksCount++
|
||||
window.SetWindowTitle(fmt.Sprintf("Read %d/%d chunks", decodedChunksCount, decodedChunk.Total))
|
||||
if decodedChunksCount == decodedChunk.Total {
|
||||
break READER
|
||||
}
|
||||
}
|
||||
}
|
||||
window.SetWindowTitle("QR-code chunks successfully read!")
|
||||
|
@ -155,6 +170,7 @@ func ReadDataFromQR(img image.Image) ([]byte, error) {
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to decode the QR-code contents: %w", err)
|
||||
}
|
||||
|
||||
return []byte(result.String()), nil
|
||||
}
|
||||
|
||||
|
|
|
@ -4,40 +4,65 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/segmentio/kafka-go"
|
||||
"gopkg.in/matryer/try.v1"
|
||||
)
|
||||
|
||||
const (
|
||||
kafkaPartition = 0
|
||||
kafkaPartition = 0
|
||||
maxRetries = 30
|
||||
reconnectInterval = time.Second
|
||||
)
|
||||
|
||||
type KafkaStorage struct {
|
||||
writer *kafka.Conn
|
||||
reader *kafka.Reader
|
||||
func init() {
|
||||
try.MaxRetries = maxRetries
|
||||
}
|
||||
|
||||
func NewKafkaStorage(ctx context.Context, kafkaEndpoint string, kafkaTopic string) (Storage, error) {
|
||||
conn, err := kafka.DialLeader(ctx, "tcp", kafkaEndpoint, kafkaTopic, kafkaPartition)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to init Kafka client: %w", err)
|
||||
type KafkaStorage struct {
|
||||
ctx context.Context
|
||||
writer *kafka.Conn
|
||||
reader *kafka.Reader
|
||||
|
||||
kafkaEndpoint string
|
||||
kafkaTopic string
|
||||
}
|
||||
|
||||
func NewKafkaStorage(ctx context.Context, kafkaEndpoint, kafkaTopic string) (Storage, error) {
|
||||
stg := &KafkaStorage{
|
||||
ctx: ctx,
|
||||
kafkaEndpoint: kafkaEndpoint,
|
||||
kafkaTopic: kafkaTopic,
|
||||
}
|
||||
|
||||
reader := kafka.NewReader(kafka.ReaderConfig{
|
||||
Brokers: []string{kafkaEndpoint},
|
||||
Topic: kafkaTopic,
|
||||
Partition: kafkaPartition,
|
||||
MaxWait: time.Second,
|
||||
})
|
||||
if err := stg.connect(); err != nil {
|
||||
return nil, fmt.Errorf("failed to connect: %w", err)
|
||||
}
|
||||
|
||||
return &KafkaStorage{
|
||||
writer: conn,
|
||||
reader: reader,
|
||||
}, nil
|
||||
return stg, nil
|
||||
}
|
||||
|
||||
func (s *KafkaStorage) Send(m Message) (Message, error) {
|
||||
err := try.Do(func(attempt int) (bool, error) {
|
||||
var err error
|
||||
m, err = s.send(m)
|
||||
if err != nil {
|
||||
log.Printf("failed while trying to send message (%v), trying to reconnect", err)
|
||||
if err := s.connect(); err != nil {
|
||||
log.Printf("failed to reconnect (%v), %d retries left", err, try.MaxRetries-attempt)
|
||||
}
|
||||
}
|
||||
time.Sleep(reconnectInterval)
|
||||
|
||||
return attempt < try.MaxRetries, err
|
||||
})
|
||||
|
||||
return m, err
|
||||
}
|
||||
|
||||
func (s *KafkaStorage) send(m Message) (Message, error) {
|
||||
data, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
return m, fmt.Errorf("failed to marshal a message %v: %v", m, err)
|
||||
|
@ -54,7 +79,25 @@ func (s *KafkaStorage) Send(m Message) (Message, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func (s *KafkaStorage) GetMessages(offset uint64) ([]Message, error) {
|
||||
func (s *KafkaStorage) GetMessages(offset uint64) (messages []Message, err error) {
|
||||
err = try.Do(func(attempt int) (bool, error) {
|
||||
var err error
|
||||
messages, err = s.getMessages(offset)
|
||||
if err != nil {
|
||||
log.Printf("failed while trying to getMessages (%v), trying to reconnect", err)
|
||||
if err := s.connect(); err != nil {
|
||||
log.Printf("failed to reconnect (%v), %d retries left", err, try.MaxRetries-attempt)
|
||||
}
|
||||
}
|
||||
time.Sleep(reconnectInterval)
|
||||
|
||||
return attempt < try.MaxRetries, err
|
||||
})
|
||||
|
||||
return messages, err
|
||||
}
|
||||
|
||||
func (s *KafkaStorage) getMessages(offset uint64) ([]Message, error) {
|
||||
if err := s.reader.SetOffset(int64(offset)); err != nil {
|
||||
return nil, fmt.Errorf("failed to SetOffset: %w", err)
|
||||
}
|
||||
|
@ -87,13 +130,37 @@ func (s *KafkaStorage) GetMessages(offset uint64) ([]Message, error) {
|
|||
}
|
||||
|
||||
func (s *KafkaStorage) Close() error {
|
||||
if err := s.reader.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close reader: %w", err)
|
||||
if s.writer != nil {
|
||||
if err := s.writer.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close writer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := s.writer.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close writer: %w", err)
|
||||
if s.reader != nil {
|
||||
if err := s.reader.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close reader: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *KafkaStorage) connect() error {
|
||||
_ = s.Close()
|
||||
|
||||
conn, err := kafka.DialLeader(s.ctx, "tcp", s.kafkaEndpoint, s.kafkaTopic, kafkaPartition)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to init Kafka client: %w", err)
|
||||
}
|
||||
|
||||
reader := kafka.NewReader(kafka.ReaderConfig{
|
||||
Brokers: []string{s.kafkaEndpoint},
|
||||
Topic: s.kafkaTopic,
|
||||
Partition: kafkaPartition,
|
||||
MaxWait: time.Second,
|
||||
})
|
||||
|
||||
s.writer, s.reader = conn, reader
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue