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

Time synchronization during test tx. #3

Open
miguelmonares opened this issue Oct 5, 2022 · 1 comment
Open

Time synchronization during test tx. #3

miguelmonares opened this issue Oct 5, 2022 · 1 comment

Comments

@miguelmonares
Copy link

OS: MacOS Monterey 12.3.1

Issue: We are using the tm2fab demo (yui-relayer-build, branch v0.2) to make transactions between tendermint and fabric with the yui-relayer. This appears successful on initial run, but when we try to make transactions after 10 minutes, we receive the following error.

fabric.SendMsgs.result: res=‘[]’ err=‘Failed to submit: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to execute message; message index: 0: cannot update client with ID 07-tendermint-0: failed to verify header: invalid header: new header has a time from the future 2022-10-05 03:27:12.262279251 +0000 UTC (now: 2022-10-05 03:15:31 +0000 UTC; max clock drift: 10m0s)’

The time that the status currently declares as the current time is the initial run of make test in yui-relayer/tests/cases/tm2fab.

We produce the error as follows:

Build Relay

  • make yrly
    Build Tendermint docker image
  • cd tests/chains/tendermint/
  • make docker-images
    Build fabric docker image
  • cd tests/chains/fabric
  • make bin
  • make initial-data
  • make snapshot
  • make docker-images
    Run test
  • cd tests/cases/tm2fab/
  • make network
  • make test *****

After 10 minutes, we try to run <tm2fab/scripts/test-tx> and receive the aforementioned error, where the current time is not updated (still reflects the time where ***** was run), hence the new header is determined to be "in the future". We are unsure if the headers are updated, or if the dockers are running out of time synchronization.

Thank you for your help :)

@toshihiko-okubo
Copy link
Member

Hi @mxnares.
Thanks for trying.

We have investigated and found that the problem is caused by the relayer module of fabric-ibc.
We have created the issue here, so please wait for the fix.
hyperledger-labs/yui-fabric-ibc#47

If you want to run your test cases without waiting for this fix, I suggest you stop using the relayer in yui-relayer-build and fork the v0.2.0.
https://github.com/hyperledger-labs/yui-relayer/tree/v0.2.0

You can temporarily work around this problem by building a relayer with a value like 365 days set to MaxClockDrift in the forked relayer.
https://github.com/hyperledger-labs/yui-relayer/blob/04879cc93ec0cf0c46d7f05742a201d7c8a25986/chains/tendermint/client-tx.go#L29

However, this is a workaround and not a fundamental solution to the problem.

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