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
5dced189
Unverified
Commit
5dced189
authored
Jun 25, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2794 fix keys generation
parent
4864f2cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
sgxwall.cpp
sgxwall.cpp
+11
-5
No files found.
sgxwall.cpp
View file @
5dced189
...
...
@@ -77,8 +77,12 @@ void SGXWallet::serializeKeys(const vector<string>& _ecdsaKeyNames, const vector
for
(
uint
i
=
0
;
i
<
_ecdsaKeyNames
.
size
();
i
++
)
{
auto
key
=
to_string
(
i
+
1
);
ecdsaKeysJson
[
key
]
=
_ecdsaKeyNames
[
i
];
blsKeysJson
[
key
]
=
_blsKeyNames
[
i
];
string
keyFull
(
3
-
key
.
size
(),
'0'
);
keyFull
.
append
(
key
);
ecdsaKeysJson
[
keyFull
]
=
_ecdsaKeyNames
[
i
];
blsKeysJson
[
keyFull
]
=
_blsKeyNames
[
i
];
}
top
[
"ecdsaKeyNames"
]
=
ecdsaKeysJson
;
...
...
@@ -169,7 +173,9 @@ int main(int argc, char *argv[]) {
initAll
(
enclaveLogLevel
,
checkClientCertOption
,
autoSignClientCertOption
);
if
(
generateTestKeys
)
{
ifstream
is
(
"sgx_data/4node.json"
);
if
(
generateTestKeys
&&
!
is
.
good
())
{
cerr
<<
"Generating test keys ..."
<<
endl
;
HttpClient
client
(
RPC_ENDPOINT
);
...
...
@@ -181,14 +187,14 @@ int main(int argc, char *argv[]) {
int
schainID
=
1
;
int
dkgID
=
1
;
TestUtils
::
doDKG
(
c
,
4
,
1
,
ecdsaKeyNames
,
blsKeyNames
,
schainID
,
dkgID
);
TestUtils
::
doDKG
(
c
,
4
,
3
,
ecdsaKeyNames
,
blsKeyNames
,
schainID
,
dkgID
);
SGXWallet
::
serializeKeys
(
ecdsaKeyNames
,
blsKeyNames
,
"sgx_data/4node.json"
);
schainID
=
2
;
dkgID
=
2
;
TestUtils
::
doDKG
(
c
,
16
,
5
,
ecdsaKeyNames
,
blsKeyNames
,
schainID
,
dkgID
);
TestUtils
::
doDKG
(
c
,
16
,
11
,
ecdsaKeyNames
,
blsKeyNames
,
schainID
,
dkgID
);
SGXWallet
::
serializeKeys
(
ecdsaKeyNames
,
blsKeyNames
,
"sgx_data/16node.json"
);
...
...
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