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

Non-deterministic Error #147

Closed
rigelrozanski opened this issue Jun 29, 2017 · 6 comments
Closed

Non-deterministic Error #147

rigelrozanski opened this issue Jun 29, 2017 · 6 comments

Comments

@rigelrozanski
Copy link
Contributor

fails
https://circleci.com/gh/tendermint/basecoin/435
and then passes on a re-build
https://circleci.com/gh/tendermint/basecoin/436

@ethanfrey
Copy link
Contributor

True dat. Any idea the cause? I've never got it locally, only on CircleCI :(

@rigelrozanski
Copy link
Contributor Author

It looks like a series of sequence errors are stemming from an invalid address length - maybe has to do with parsing the hash?

From circle build 435:

test00GetAccount
test01SendIBCTx
ASSERT:good check: {
  "check_tx": {
    "code": 107,
    "data": "",
    "log": "Error in CheckTx;in validateOutputsBasic();Error (base) invalid output;Invalid address length"
  },
  "deliver_tx": {
    "code": 0,
    "data": "",
    "log": ""
  },
  "hash": "254269BBCB580106654A7BD471ABBB51F7423C1D",
  "height": 0
} expected:<0> but was:<107>
ASSERT:proper sequence expected:<1> but was:<0>
ASSERT:proper money expected:<9007199254720990> but was:<9007199254740992>
ERROR: Tx: Response error: Tx (254269BBCB580106654A7BD471ABBB51F7423C1D) not found
ASSERT:found tx
ASSERT:expected:<proper height> but was:<0>
ASSERT:expected:<type=send> but was:<"send">
ASSERT:expected:<proper sender> but was:<"8DA5C60E94ACDC56D934EDF72C47C38F258930C8">
ASSERT:expected:<proper out amount> but was:<20002>
Waiting for node http://localhost:12347 to commit a block ...
starting relay ...
ASSERT:good check: {
  "check_tx": {
    "code": 109,
    "data": "",
    "log": "Error in CheckTx;in validateInputsAdvanced();Error (base) invalid sequence;Got 2, expected 1. (acc.seq=0)"
  },
  "deliver_tx": {
    "code": 0,
    "data": "",
    "log": ""
  },
  "hash": "503FED9716A6B264BE806BFF09F7776163DBCEBE",
  "height": 0
} expected:<0> but was:<109>
ERROR: Account bytes are empty for address: 1B1BE55F969F54064628A63B9559E7C21C925165 
can't initialize relays
can't start relay

@ethanfrey
Copy link
Contributor

Okay, got an error case.

--to="test-chain-2/F40ECECEA86F29D0FDF2980EF72F1708687BD4BF"

this is converted to "test-chain-2/(binary encoding of above)"

note that 2F in hex corresponds to the bytes for /, so the address contains a /. Which causes problems here: https://github.com/tendermint/basecoin/blob/develop/types/tx.go#L125-L136

I will make a proper test case and fix the issue. But it brings up a point that just overloading the chain into the binary data is a bit fragile...

@ethanfrey
Copy link
Contributor

This means any address with a properly aligned 2F will not be able to receive tokens over ibc, like 1/13 of the addresses. Surprised we didn't find this in our manual tests...

ethanfrey added a commit that referenced this issue Jun 30, 2017
@ethanfrey
Copy link
Contributor

Should be fixed by 6dc3aed

@rigelrozanski
Copy link
Contributor Author

AHA - I had the feeling it was something along these lines - great stuff fixing this one

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

No branches or pull requests

2 participants