-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat: add wait_until flag, drop check_tx method #136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@telezhnaya Thank you for contributing it ahead of time!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm ✨
examples/send_tx.rs
Outdated
let signer_account_id = utils::input("Enter the signer Account ID: ")?.parse()?; | ||
let signer_secret_key = utils::input("Enter the signer's private key: ")?.parse()?; | ||
let wait_until_str = utils::input("Enter the desired guaranteed execution status: ")?; | ||
let wait_until = serde_json::from_str(&("\"".to_owned() + &wait_until_str + "\""))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, this can be simplified:
let wait_until = serde_json::from_str(&("\"".to_owned() + &wait_until_str + "\""))?; | |
let wait_until = serde_json::from_value(json!(wait_until_str))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, it's not true.
I also need to put my str into quotes to create a valid json. With adding quotes, your option is the same as mine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@telezhnaya Are you sure you tried from_value
(not from_str
) and pass json!(value)
instead of String value? This code should work as far as I can tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value
should be a valid json in json!(value)
. If it's string, it should be quoted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@telezhnaya This is what we meant here: a4f27a4
615021f
to
e92e6f8
Compare
The only failing test fails because it really sends RPC request to mainnet which is not upgraded yet (so, the method does not work as we expect). |
599369b
to
ddc30f0
Compare
ddc30f0
to
781fa5d
Compare
Updated. As before, one of the tests fails because mainnet and testnet still has 1.36, waiting for the release |
I am curious about the best approach to releasing this soon. With the ReadRPC project, we are working on a version compatible with 1.37.x nearcore that is already run on testnet. We use And for the future, we'd like to be able to use newer versions of the client before the |
Update: We've agreed with the change on the The mainnet 1.37.0 release is anticipated this week, so we're not getting the necessary crates beforehand this time, but the next time it should be available 🎉 |
Are there any new changes needed here other than just running the CI again? |
I will re-open this PR to trigger CI |
Thanks Vlad, I can see that doc tests failed again. I made a PR to wait_until branch to fix this. As an aside, I see that you fixed it a month ago as well. Does the archival node only keep a months old data? or is it failing because of some other reason. |
Updated the code to match with 1.37 nearcore release
https://github.com/near/nearcore/blob/447572bb775a5954ca7a5a4b65c85b45aab9e499/chain/jsonrpc/CHANGELOG.md#023
TLDR:
EXPERIMENTAL_check_tx
method, we won't support it anymoresend_tx
methodsend_tx
wait_until
flag to few placesWe need to merge it only after 1.37 will be released