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

construction: switch to SubmitTxNoWait #38

Merged
merged 1 commit into from
Aug 17, 2020
Merged

Conversation

pro-wh
Copy link
Collaborator

@pro-wh pro-wh commented Aug 13, 2020

fixes #24

switch to this new API in 20.9

@pro-wh
Copy link
Collaborator Author

pro-wh commented Aug 14, 2020

what's with this submission?

(gateway) :55:14.443 - ConstructionHash OK for 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc

(cli) Transaction Created: 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc
oasis1qpxnnlakg83xu8c2xw9jrz05mh0733twwq54xjga -- 54.387348712 ROSE --> oasis1qzm8zn43fl9lc20pr4gkkdks5htwu3r8wucz38dv

(gateway) :55:14.446 - ConstructionSubmit OK for 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc

(cli) :55:19 - {Code:15 Message:unable to submit transaction Retriable:false Details:map[]}: unable to broadcast transaction: unable to broadcast transaction 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc

(cli) :55:30 - {Code:15 Message:unable to submit transaction Retriable:false Details:map[]}: unable to broadcast transaction: unable to broadcast transaction 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc

(gateway) :55:40.154 - Block OK containing 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc

(cli) Check failed: broadcast failed for transaction 9f7f67e02e80dec4b4c35d84d61adf838dc5a727ec5a28444865fadd80125efc

why is there a ~5 second delay after ConstructionSubmit OK and then the CLI says it's unable to submit transaction?

@pro-wh
Copy link
Collaborator Author

pro-wh commented Aug 14, 2020

maybe they rebroadcast it after a while even if the first broadcast succeeded

@pro-wh
Copy link
Collaborator Author

pro-wh commented Aug 14, 2020

alright, they for sure rebroadcast it if the previous attempt succeeded. even after #40, it still fails due to too many broadcast attempts. all we have to do is raise the limit or make the interval slower

@pro-wh pro-wh force-pushed the pro-wh/feature/nowait branch 2 times, most recently from 61f5009 to 907aaf8 Compare August 14, 2020 23:33
@pro-wh
Copy link
Collaborator Author

pro-wh commented Aug 14, 2020

wow how far would we have to increase it? in https://github.com/oasisprotocol/oasis-core-rosetta-gateway/pull/38/checks?check_run_id=986970053, the transaction with hash 4f97e85bd6f7cdcf8d0e837fe844de45cb1416acd69027a10c021b63b09ff9b0 is created at ~:41:30 and submitted. but it doesn't appear in a block until :42:59!

@pro-wh
Copy link
Collaborator Author

pro-wh commented Aug 14, 2020

hm, during that ~minute and a half, the block handling goes from height 1209 to 1501. that seems like a lot. is the block production just running away, leaving the gateway in the dust?

@kostko
Copy link
Member

kostko commented Aug 15, 2020

Ohh, it seems that it uses an old fixture format (see tests/test-fixture-config.json) so the commit timeout is not configured properly and it probably uses the insanely fast default. And this is something that changed in 20.9 indeed.

Instead of:
https://github.com/oasisprotocol/oasis-core-rosetta-gateway/blob/610438f34a10c11fe77048ded8464b206bf0b90d/tests/test-fixture-config.json#L6-L9

It should be:

    "network": {
        "node_binary": "oasis-node",
        "consensus": {
            "backend": "",
            "params": {
                "timeout_commit": 1000000000,

Base automatically changed from pro-wh/feature/corebump to master August 17, 2020 19:14
@pro-wh pro-wh merged commit 05b1304 into master Aug 17, 2020
@pro-wh pro-wh deleted the pro-wh/feature/nowait branch August 17, 2020 19:52
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.

ConstructionSubmit should not block on transaction being included in a block
2 participants