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

fix multichain-testing waitForBlock #10932

Merged
merged 2 commits into from
Feb 4, 2025
Merged

fix multichain-testing waitForBlock #10932

merged 2 commits into from
Feb 4, 2025

Conversation

turadg
Copy link
Member

@turadg turadg commented Feb 3, 2025

closes: #9934

Description

It appears that when provisioning multiple wallets, waitForBlock only runs on the first one. See delay in these logs:

provisioning log

{ provisioning: 'agoric1yupasge4528pgkszg9v328x4faxtkldsnygwjl' }
----- Agd.10 8 $ agd tx swingset provision-one my-wallet agoric1yupasge4528pgkszg9v328x4faxtkldsnygwjl SMART_WALLET --keyring-backend test --chain-id agoriclocal --from agoric1yupasge4528pgkszg9v328x4faxtkldsnygwjl --broadcast-mode block --gas auto --gas-adjustment 1.4 --yes --output json
----- Agd.10 9 agd returned; {
height: '428',
txhash: 'B23153D1E23F536A16AA386338F29BF6AC98F6C27F93F4F2444BDA6AFFCCB909',
codespace: '',
code: 0,
data: '12270A252F61676F7269632E7377696E677365742E4D736750726F766973696F6E526573706F6E7365',
raw_log: '[{"msg_index":0,"events":[{"type":"coin_received","attributes":[{"key":"receiver","value":"agoric1ae0lmtzlgrcnla9xjkpaarq5d5dfez63h3nucl"},{"key":"amount","value":"10000000ubld"}]},{"type":"coin_spent","attributes":[{"key":"spender","value":"agoric1yupasge4528pgkszg9v328x4faxtkldsnygwjl"},{"key":"amount","value":"10000000ubld"}]},{"type":"message","attributes":[{"key":"action","value":"/agoric.swingset.MsgProvision"},{"key":"sender","value":"agoric1yupasge4528pgkszg9v328x4faxtkldsnygwjl"}]},{"type":"transfer","attributes":[{"key":"recipient","value":"agoric1ae0lmtzlgrcnla9xjkpaarq5d5dfez63h3nucl"},{"key":"sender","value":"agoric1yupasge4528pgkszg9v328x4faxtkldsnygwjl"},{"key":"amount","value":"10000000ubld"}]}]}]',
logs: [ { msg_index: 0, log: '', events: [Array] } ],
info: '',
gas_wanted: '169174',
gas_used: '119101',
tx: null,
timestamp: '',
events: [
{ type: 'tx', attributes: [Array] },
{ type: 'tx', attributes: [Array] },
{ type: 'tx', attributes: [Array] },
{ type: 'message', attributes: [Array] },
{ type: 'coin_spent', attributes: [Array] },
{ type: 'coin_received', attributes: [Array] },
{ type: 'transfer', attributes: [Array] },
{ type: 'message', attributes: [Array] }
]
}
----- E2ET.11 8 delay { step: 'bank send', delay: 1 } ...

{ provisioning: 'agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p' }
----- Agd.10 10 $ agd tx swingset provision-one my-wallet agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p SMART_WALLET --keyring-backend test --chain-id agoriclocal --from agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p --broadcast-mode block --gas auto --gas-adjustment 1.4 --yes --output json
----- Agd.10 11 agd returned; {
height: '429',
txhash: 'D54B21B3AABC44660E800DCE758AD42533F4AAB408D0EAA8CA91CFD420790223',
codespace: '',
code: 0,
data: '12270A252F61676F7269632E7377696E677365742E4D736750726F766973696F6E526573706F6E7365',
raw_log: '[{"msg_index":0,"events":[{"type":"coin_received","attributes":[{"key":"receiver","value":"agoric1ae0lmtzlgrcnla9xjkpaarq5d5dfez63h3nucl"},{"key":"amount","value":"10000000ubld"}]},{"type":"coin_spent","attributes":[{"key":"spender","value":"agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p"},{"key":"amount","value":"10000000ubld"}]},{"type":"message","attributes":[{"key":"action","value":"/agoric.swingset.MsgProvision"},{"key":"sender","value":"agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p"}]},{"type":"transfer","attributes":[{"key":"recipient","value":"agoric1ae0lmtzlgrcnla9xjkpaarq5d5dfez63h3nucl"},{"key":"sender","value":"agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p"},{"key":"amount","value":"10000000ubld"}]}]}]',
logs: [ { msg_index: 0, log: '', events: [Array] } ],
info: '',
gas_wanted: '164596',
gas_used: '115831',
tx: null,
timestamp: '',
events: [
{ type: 'tx', attributes: [Array] },
{ type: 'tx', attributes: [Array] },
{ type: 'tx', attributes: [Array] },
{ type: 'message', attributes: [Array] },
{ type: 'coin_spent', attributes: [Array] },
{ type: 'coin_received', attributes: [Array] },
{ type: 'transfer', attributes: [Array] },
{ type: 'message', attributes: [Array] }
]
}

{ provisioning: 'agoric1dh04lnl7epr7l4cpvqqprxvam7ewdswj7yv6ep' }
----- Agd.10 12 $ agd tx swingset provision-one my-wallet agoric1dh04lnl7epr7l4cpvqqprxvam7ewdswj7yv6ep SMART_WALLET --keyring-backend test --chain-id agoriclocal --from agoric1dh04lnl7epr7l4cpvqqprxvam7ewdswj7yv6ep --broadcast-mode block --gas auto --gas-adjustment 1.4 --yes --output json
----- Agd.10 13 agd returned; {
height: '430',
txhash: '25CC5888D26EB595DDF11C7F1741E1B5509D875A7FDC06E7A7227530B646F17D',
codespace: '',
code: 0,
data: '12270A252F61676F7269632E7377696E677365742E4D736750726F766973696F6E526573706F6E7365',
raw_log: '[{"msg_index":0,"events":[{"type":"coin_received","attributes":[{"key":"receiver","value":"agoric1ae0lmtzlgrcnla9xjkpaarq5d5dfez63h3nucl"},{"key":"amount","value":"10000000ubld"}]},{"type":"coin_spent","attributes":[{"key":"spender","value":"agoric1dh04lnl7epr7l4cpvqqprxvam7ewdswj7yv6ep"},{"key":"amount","value":"10000000ubld"}]},{"type":"message","attributes":[{"key":"action","value":"/agoric.swingset.MsgProvision"},{"key":"sender","value":"agoric1dh04lnl7epr7l4cpvqqprxvam7ewdswj7yv6ep"}]},{"type":"transfer","attributes":[{"key":"recipient","value":"agoric1ae0lmtzlgrcnla9xjkpaarq5d5dfez63h3nucl"},{"key":"sender","value":"agoric1dh04lnl7epr7l4cpvqqprxvam7ewdswj7yv6ep"},{"key":"amount","value":"10000000ubld"}]}]}]',
logs: [ { msg_index: 0, log: '', events: [Array] } ],
info: '',
gas_wanted: '164596',
gas_used: '115831',
tx: null,
timestamp: '',
events: [
{ type: 'tx', attributes: [Array] },
{ type: 'tx', attributes: [Array] },
{ type: 'tx', attributes: [Array] },
{ type: 'message', attributes: [Array] },
{ type: 'coin_spent', attributes: [Array] },
{ type: 'coin_received', attributes: [Array] },
{ type: 'transfer', attributes: [Array] },
{ type: 'message', attributes: [Array] }
]
}

This fixes waitForBlock to advance by the number of blocks in the argument.

It also removes waitForBootstrap which is a legacy fn that's not used.

Security Considerations

n/a, tests

Scaling Considerations

n/a, tests

Documentation Considerations

none

Testing Considerations

per se

Upgrade Considerations

none

@turadg turadg added the force:integration Force integration tests to run on PR label Feb 3, 2025
Copy link

cloudflare-workers-and-pages bot commented Feb 3, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3694cac
Status: ✅  Deploy successful!
Preview URL: https://128c49a7.agoric-sdk.pages.dev
Branch Preview URL: https://9934-waitforblock.agoric-sdk.pages.dev

View logs

@turadg turadg force-pushed the 9934-waitForBlock branch from d251503 to 7aff123 Compare February 3, 2025 23:27
@turadg turadg requested review from dckc and samsiegart February 3, 2025 23:29
@turadg turadg marked this pull request as ready for review February 3, 2025 23:29
@turadg turadg requested a review from a team as a code owner February 3, 2025 23:29
@turadg turadg marked this pull request as draft February 3, 2025 23:54
@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Feb 4, 2025
@turadg turadg marked this pull request as ready for review February 4, 2025 15:06
@turadg turadg force-pushed the 9934-waitForBlock branch from 1506145 to 3694cac Compare February 4, 2025 15:06
@mergify mergify bot merged commit 078e9f8 into master Feb 4, 2025
83 checks passed
@mergify mergify bot deleted the 9934-waitForBlock branch February 4, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix flake in multichain-testing
3 participants