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

[4.0 -> main] Restore Node.py Changes that were lost #880

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

ClaytonCalabrese
Copy link
Contributor

A number of changes to functions in Node.py were lost as a result of the splitting of Node.py into itself plus 2 additional files. This PR returns all those lost changes.

Process for finding missing changes:

Last commit prior to merge was df5ad0c,
First commit prior to branch was bf4267e

Therefore, every change that happened in the diff of the two must be reflected in the current main code.
Diff: https://www.diffchecker.com/dYC5EHTW/

getTransBlockNum -> Moved to queries.py
Moved a piece of code

stdinAndCheckOutput still in Node.py, merge caught change

getTransaction -> Moved to queries.py
"get transaction_trace" replaced with lambda call

getBlockNumByTransId -> moved to queries.py
key and refBlockNum both now use a lambda

createInitializeAccount -> Moved to transactions.py
 self.waitForTransInBlock(transId) was replaced by self.waitForTransactionInBlock(transId)
This was caught by an earlier merge

createAccount -> moved to transactions.py
 self.waitForTransInBlock(transId) was replaced by self.waitForTransactionInBlock(transId)
This was caught by an earlier merge

getTable -> moved to queries.py
self.cleosLimit was added to cmd, along with an additional %s to hold it

waitForTransInBlock renamed to waitForTransactionInBlock, still in Node.py

checkBlockForTransactions
new, and added to Node.py, unchanged on merge

waitForTransactionsInBlockRange
new, and added to Node.py, unchanged on merge

waitForTransactionsInBlock
new, and added to Node.py, was intentionally changed in Python Port PR
waitForTrxGeneratorsSpinup called this and needed to be changed due to now returning a status. Updated nodeos_snapshot_diff_tests.py and nodeos_startup_catchup.py as a result.

transferFunds -> moved to transactions.py
  msg=ex.output.decode("utf-8") changed to msg=ex.stderr.decode("utf-8")

transferFundsAsync-> moved to transactions.py
  msg=ex.output.decode("utf-8") changed to msg=ex.stderr.decode("utf-8")

getAccountCodeHash -> moved to queries.py
  msg=ex.output.decode("utf-8") changed to msg=ex.stderr.decode("utf-8")

publishContract -> moved to transactions.py
Print statement adds out, changes msg to stderr, changes print order
retMap ["stdout"=ex.stdout removed

pushTransaction -> moved to transactions.py
  msg=ex.output.decode("utf-8") changed to msg=ex.stderr.decode("utf-8")

pushMessage -> moved to transactions.py
adds force=False to function. Caught and added by Peter already.
msg=ex.stderr.decode("utf-8") got doubled up.
print statement appears to have added output but it is the same on main already

processCleosCmd -> moved to queries.py
 out=ex.output.decode("utf-8") added, msg changed to be stderr
print statement adds out

killNodeOnProducer still in node.py
Merge caught changes already

processUrllibRequest -> moved to queries.py
New to the code, replaced processCurlCmd, merged properly

waitForTransBlockIfNeeded still in Node.py
waitForTransInBlock changed to waitForTransactionInBlock, merged previously

relaunch still in Node.py
waitForTerm default changed from True to False, already caught in prior merge.

didNodeExitGracefully is still in Node.py
if "successfully exiting" in f.read(): replaced old check
if waitForTerm: added
else behavior changed
All these merged properly


scheduleProtocolFeatureActivations still in Node.py
processCurlCmd replaced by processUrllibRequest, caught by merge

getSupportedProtocolFeatures -> moved to queries.py
processCurlCmd replaced by processUrllibRequest, caught by merge

getSupportedProtocolFeatureDict -> moved to queries.py
for protocolFeature in supportedProtocolFeatures: changed to
for protocolFeature in supportedProtocolFeatures["payload"]:
caught by merge

getAllBuiltinFeatureDigestsToPreactivate -> moved to transactions.py
for protocolFeature in supportedProtocolFeatures: changed to
for protocolFeature in supportedProtocolFeatures["payload"]:
caught by merge

createSnapshot still in Node.py
processCurlCmd replaced by processUrllibRequest, caught by merge

Contains these changes: #875

@ClaytonCalabrese ClaytonCalabrese self-assigned this Mar 23, 2023
@heifner heifner requested a review from linh2931 March 23, 2023 16:15
@ClaytonCalabrese ClaytonCalabrese merged commit 1dd3f89 into main Mar 23, 2023
@ClaytonCalabrese ClaytonCalabrese deleted the restore_lost_node_py_changes_main branch March 23, 2023 16:38
@heifner heifner added the OCI Work exclusive to OCI team label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants