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 resharding RPC tx nayduck test #11288

Open
staffik opened this issue May 10, 2024 · 3 comments
Open

Fix resharding RPC tx nayduck test #11288

staffik opened this issue May 10, 2024 · 3 comments
Assignees

Comments

@staffik
Copy link
Contributor

staffik commented May 10, 2024

cargo build -pneard --features test_features,rosetta_rpc &&
cargo build -pgenesis-populate -prestaked -pnear-test-contracts &&
python3 pytest/tests/sanity/resharding_rpc_tx.py

fails on nayduck: https://nayduck.nearone.org/#/test/24054

It is caused by replacing get_final_transaction_result() with get_partial_transaction_result()
https://github.com/near/nearcore/pull/10792/files?diff=unified&w=0#diff-34fd63bb882408a6cd040297ab48d277c848f434f9f72da6696aa17e86099405L510-R507

@staffik
Copy link
Contributor Author

staffik commented May 10, 2024

@telezhnaya Do you want to take it over? Or could we have a call so I better understand it to fix it myself?

payment_tx = transaction.sign_payment_tx(from_key, to_account_id, 100,
                                                 nonce, encoded_block_hash)
response = self.node.send_tx_and_wait(payment_tx, timeout=20)

does not have refund receipt if we use get_partial_transaction_result() inside view_client::get_tx_status().
Then, after resharding, in __verify_tx_status():

tx_hash = transfer_response['result']['transaction']['hash']
response = self.node.get_tx(tx_hash, sender_account_id)

response has the refund receipt and the test fails because the first response did not have the refund receipt and they are supposed to be equal.

Also, I noted that there is an issue: #9545 that is expected to be solved after resharding release. So I thought it is better to ask you before I fix it blindly.

@telezhnaya telezhnaya self-assigned this May 13, 2024
@telezhnaya
Copy link
Contributor

Thank you, I'll have a look

@Longarithm
Copy link
Member

There is a recent fix for that: #11292

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

3 participants