Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/is 700 update consensus da signature verifiaction after rotation #1434

Merged
8 changes: 6 additions & 2 deletions libethereum/ChainParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,15 @@ ChainParams ChainParams::loadConfig(
auto groupNodesObj = nodeGroupObj["nodes"].get_obj();
for ( const auto& groupNodeConf : groupNodesObj ) {
auto groupNodeConfObj = groupNodeConf.second.get_array();
u256 id = groupNodeConfObj[0].get_uint64();
u256 sChainIndex = groupNodeConfObj[1].get_uint64();
u256 sChainIndex = groupNodeConfObj[0].get_uint64();
u256 id = groupNodeConfObj[1].get_uint64();
std::string publicKey = groupNodeConfObj[2].get_str();
groupNodes.push_back( { id, sChainIndex, publicKey } );
}
std::sort( groupNodes.begin(), groupNodes.end(),
[]( const GroupNode& lhs, const GroupNode& rhs ) {
return lhs.schainIndex < rhs.schainIndex;
} );
nodeGroup.nodes = groupNodes;

std::array< std::string, 4 > nodeGroupBlsPublicKey;
Expand Down
2 changes: 1 addition & 1 deletion libethereum/SkaleHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void DefaultConsensusFactory::fillRotationHistory( ConsensusEngine& consensus )
std::vector< uint64_t > nodes;
// add ecdsa keys info and historic groups info
for ( const auto& node : nodeGroup.nodes ) {
historicECDSAKeys[u256toUint64( node.id )] = node.publicKey;
historicECDSAKeys[u256toUint64( node.id )] = node.publicKey.substr( 2 );
nodes.push_back( u256toUint64( node.id ) );
}
historicNodeGroups[nodeGroup.finishTs] = nodes;
Expand Down