Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
ddf62aa0
Unverified
Commit
ddf62aa0
authored
Jun 07, 2021
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3951 use v2 methods
parent
784064c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
6 deletions
+4
-6
SGXWalletServer.hpp
SGXWalletServer.hpp
+1
-1
ReqMessage.cpp
zmq_src/ReqMessage.cpp
+3
-3
ServerWorker.cpp
zmq_src/ServerWorker.cpp
+0
-1
ServerWorker.h
zmq_src/ServerWorker.h
+0
-1
No files found.
SGXWalletServer.hpp
View file @
ddf62aa0
...
@@ -172,7 +172,7 @@ public:
...
@@ -172,7 +172,7 @@ public:
static
Json
::
Value
dkgVerificationV2Impl
(
const
string
&
_publicShares
,
const
string
&
_ethKeyName
,
const
string
&
_secretShare
,
int
_t
,
int
_n
,
int
_index
);
static
Json
::
Value
dkgVerificationV2Impl
(
const
string
&
_publicShares
,
const
string
&
_ethKeyName
,
const
string
&
_secretShare
,
int
_t
,
int
_n
,
int
_index
);
virtual
Json
::
Value
createBLSPrivateKeyV2Impl
(
const
std
::
string
&
blsKeyName
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
polyName
,
const
std
::
string
&
SecretShare
,
int
t
,
int
n
);
static
Json
::
Value
createBLSPrivateKeyV2Impl
(
const
std
::
string
&
blsKeyName
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
polyName
,
const
std
::
string
&
SecretShare
,
int
t
,
int
n
);
static
void
printDB
();
static
void
printDB
();
...
...
zmq_src/ReqMessage.cpp
View file @
ddf62aa0
...
@@ -97,7 +97,7 @@ Json::Value getSecretShareReqMessage::process() {
...
@@ -97,7 +97,7 @@ Json::Value getSecretShareReqMessage::process() {
auto
t
=
getUint64Rapid
(
"t"
);
auto
t
=
getUint64Rapid
(
"t"
);
auto
n
=
getUint64Rapid
(
"n"
);
auto
n
=
getUint64Rapid
(
"n"
);
auto
pubKeys
=
getJsonValueRapid
(
"publicKeys"
);
auto
pubKeys
=
getJsonValueRapid
(
"publicKeys"
);
auto
result
=
SGXWalletServer
::
getSecretShareImpl
(
polyName
,
pubKeys
,
t
,
n
);
auto
result
=
SGXWalletServer
::
getSecretShare
V2
Impl
(
polyName
,
pubKeys
,
t
,
n
);
result
[
"type"
]
=
ZMQMessage
::
GET_SECRET_SHARE_RSP
;
result
[
"type"
]
=
ZMQMessage
::
GET_SECRET_SHARE_RSP
;
return
result
;
return
result
;
}
}
...
@@ -109,7 +109,7 @@ Json::Value dkgVerificationReqMessage::process() {
...
@@ -109,7 +109,7 @@ Json::Value dkgVerificationReqMessage::process() {
auto
idx
=
getUint64Rapid
(
"index"
);
auto
idx
=
getUint64Rapid
(
"index"
);
auto
pubShares
=
getStringRapid
(
"publicShares"
);
auto
pubShares
=
getStringRapid
(
"publicShares"
);
auto
secretShare
=
getStringRapid
(
"secretShare"
);
auto
secretShare
=
getStringRapid
(
"secretShare"
);
auto
result
=
SGXWalletServer
::
dkgVerificationImpl
(
pubShares
,
ethKeyName
,
secretShare
,
t
,
n
,
idx
);
auto
result
=
SGXWalletServer
::
dkgVerification
V2
Impl
(
pubShares
,
ethKeyName
,
secretShare
,
t
,
n
,
idx
);
result
[
"type"
]
=
ZMQMessage
::
DKG_VERIFY_RSP
;
result
[
"type"
]
=
ZMQMessage
::
DKG_VERIFY_RSP
;
return
result
;
return
result
;
}
}
...
@@ -121,7 +121,7 @@ Json::Value createBLSPrivateKeyReqMessage::process() {
...
@@ -121,7 +121,7 @@ Json::Value createBLSPrivateKeyReqMessage::process() {
auto
secretShare
=
getStringRapid
(
"secretShare"
);
auto
secretShare
=
getStringRapid
(
"secretShare"
);
auto
t
=
getUint64Rapid
(
"t"
);
auto
t
=
getUint64Rapid
(
"t"
);
auto
n
=
getUint64Rapid
(
"n"
);
auto
n
=
getUint64Rapid
(
"n"
);
auto
result
=
SGXWalletServer
::
createBLSPrivateKeyImpl
(
blsKeyName
,
ethKeyName
,
polyName
,
secretShare
,
t
,
n
);
auto
result
=
SGXWalletServer
::
createBLSPrivateKey
V2
Impl
(
blsKeyName
,
ethKeyName
,
polyName
,
secretShare
,
t
,
n
);
result
[
"type"
]
=
ZMQMessage
::
CREATE_BLS_PRIVATE_RSP
;
result
[
"type"
]
=
ZMQMessage
::
CREATE_BLS_PRIVATE_RSP
;
return
result
;
return
result
;
}
}
...
...
zmq_src/ServerWorker.cpp
View file @
ddf62aa0
...
@@ -139,7 +139,6 @@ void ServerWorker::doOneServerLoop() noexcept {
...
@@ -139,7 +139,6 @@ void ServerWorker::doOneServerLoop() noexcept {
void
ServerWorker
::
work
()
{
void
ServerWorker
::
work
()
{
worker
->
connect
(
"inproc://backend"
);
worker
->
connect
(
"inproc://backend"
);
while
(
!
isExitRequested
)
{
while
(
!
isExitRequested
)
{
try
{
try
{
doOneServerLoop
();
doOneServerLoop
();
...
...
zmq_src/ServerWorker.h
View file @
ddf62aa0
...
@@ -44,7 +44,6 @@ class ServerWorker {
...
@@ -44,7 +44,6 @@ class ServerWorker {
public
:
public
:
ServerWorker
(
zmq
::
context_t
&
ctx
,
int
sock_type
,
bool
_checkSignature
,
const
string
&
_caCert
);
ServerWorker
(
zmq
::
context_t
&
ctx
,
int
sock_type
,
bool
_checkSignature
,
const
string
&
_caCert
);
void
work
();
void
work
();
void
requestExit
();
void
requestExit
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment