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

change block_number to hex string #53

Merged
merged 0 commits into from
Feb 20, 2019
Merged

Conversation

nicodechal
Copy link

@nicodechal nicodechal commented Nov 21, 2018

In Smallbank benchmark, change block_number to hex string like YCSB benchmark to avoid request error:
https://github.com/nicodechal/blockbench/blob/ae833572c16d60f76fd3b249f93a4517336e19ee/src/macro/kvstore/core/evm_utils.cc#L289-L291

and then I found in poll_txs_by_block_number, uncle in uncles already has quotes, But GET_BLOCK_BY_HASH_PREFIX gives uncle one more pair of quotes, so I remove the quotes of uncle to make it run correct. If this is true, then YCSB benchmark also need to be modified.

@ug93tad
Copy link
Collaborator

ug93tad commented Nov 26, 2018

Thanks for the PR.

  • Ethereum eth_getBlockByNumber take a decimal representation as well as hex, so the current implementation still works.

  • The quote was already removed in the StatusThread in smallbank.cc file.

@nicodechal
Copy link
Author

nicodechal commented Nov 26, 2018

@ug93tad

{
  "jsonrpc":"2.0",
  "id":1,
  "error": { 
    "code": -32602,
    "message": "invalid argument 0: hex string without 0x prefix"
  }
}
  • and the quote I removed is different with the quote in StatusThread. The hash I removed quote is uncle's and it's used to find uncle block with poll_txs_by_block_hash, while removing quote in StatusThread is for counting.
    The Error I got:
{
  "jsonrpc":"2.0",
  "error":  {
    "code":-32600,
    "message": "invalid character '0' after array element"
  }
}

@ug93tad ug93tad merged commit ae83357 into ooibc88:master Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants