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

Tx Simulator - sc calls accounts #2345

Merged
merged 5 commits into from
Oct 8, 2020

Conversation

bogdan-rosianu
Copy link
Contributor

@bogdan-rosianu bogdan-rosianu commented Oct 7, 2020

Used the read only accounts db also in the smart contract processor. If not, in some cases, when simulating more than one transaction in the same round, the nonce would have been affected until the beginning of the next round and simulation with the same nonce would have returned error.

Testing procedure:

  1. run a testnet with this branch
  2. send 2 invalid SC calls (not enough gas or wrong function name) one after the other one with the same nonce. Both simulations should work and not throw an error regarding lower nonce.

Alternative using erdjs (also the ways this issue was reproduced and checked that is has been fixed):

  1. run a testnet with this branch
  2. update the following test with the proxy URL and also send tokens to Alice:
    https://github.com/ElrondNetwork/elrond-sdk/blob/2a142ffe6590046dfe243c589c4b6a10b00bcf3f/erdjs/src/smartcontracts/smartContract.spec.ts#L125
  3. run the test. it should display the lower nonce message
  4. comment the fake increment part (which was a temporary fix) and run again -> should work

@bogdan-rosianu bogdan-rosianu added the type:feature New feature or request label Oct 7, 2020
@bogdan-rosianu bogdan-rosianu self-assigned this Oct 7, 2020
Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System tests passed.

@LucianMincu LucianMincu merged commit 8a03a71 into development Oct 8, 2020
@LucianMincu LucianMincu deleted the EN-7826-bug-fix-tx-simulate branch October 8, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants