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

No delimiter in string, cannot determine type Error #11

Closed
yepp4you opened this issue May 2, 2018 · 7 comments
Closed

No delimiter in string, cannot determine type Error #11

yepp4you opened this issue May 2, 2018 · 7 comments
Assignees
Labels

Comments

@yepp4you
Copy link

yepp4you commented May 2, 2018

It seems that the signature has changed in eos.
It seems that we need to make changes.
libraries/fc/src/crypto/signature.cpp
static signature::storage_type parse_base58(const std::string& base58str)
{
constexpr auto prefix = config::signature_base_prefix;

  const auto pivot = base58str.find('_');
  FC_ASSERT(pivot != std::string::npos, "No delimiter in string, cannot determine type: ${str}", ("str", base58str));

  const auto prefix_str = base58str.substr(0, pivot);
  FC_ASSERT(prefix == prefix_str, "Signature Key has invalid prefix: ${str}", ("str", base58str)("prefix_str", prefix_str));

  auto data_str = base58str.substr(pivot + 1);
  FC_ASSERT(!data_str.empty(), "Signature has no data: ${str}", ("str", base58str));
  return base58_str_parser<signature::storage_type, config::signature_prefix>::apply(data_str);

}

Error Log ==>
EOSIO/eos@f55f431#diff-41a221719ab6bb16c1ddaf8a235c9a47

@jcalfee jcalfee added the bug label May 2, 2018
@jcalfee
Copy link
Contributor

jcalfee commented May 2, 2018

I need to sync this fix with an eosio release. Please consider the dawn3 release DAWN-2018-04-23-ALPHA in the mean time. Does this work for you?

@jcalfee jcalfee self-assigned this May 4, 2018
@jcalfee
Copy link
Contributor

jcalfee commented May 4, 2018

New private, public, and signature prefixes (w/legacy fallback): EOSIO/eos@573be19

Delimiter changed from . to _ EOSIO/eos@f55f431

EOS => PUB_R1_ (public key w/legacy fallback) unit tests
EOS => SIG_K1_ (rename signature prefix)
PVT => private key prefix

@jcalfee
Copy link
Contributor

jcalfee commented May 4, 2018

The signature error is fixed and published under: [email protected] (also eosjs@dawn3) ..

@BinaryFocus
Copy link

I've just tested this and it seems to be working. Thank you!

@nsjames
Copy link
Contributor

nsjames commented May 4, 2018

They must be driving you crazy James :)

@crypto5000
Copy link

Confirmed. Now works for me, too. James is a rock star with these turnarounds.

@jcalfee
Copy link
Contributor

jcalfee commented May 6, 2018

The other changes are moved to this ticket: #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants