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

Integrate chain simulator into xSuite #94

Closed
wants to merge 49 commits into from

Conversation

raress96
Copy link
Contributor

@raress96 raress96 commented Feb 12, 2024

  • New package xsuite-chain-simulator was added.
  • xsuite-chain-simulator is an optional dependencies of the xsuite package
  • New CSProxy, CSWorld, CSContract and CSWallet classes were made similar to SProxy etc

The xsuite-chain-simulator-temp package is for testing ONLY and need to be removed before this is merged.

xsuite/src/assert/assert.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/proxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/proxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/proxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/proxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/csproxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/csproxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/csproxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/csproxy.ts Outdated Show resolved Hide resolved
xsuite/src/proxy/csproxy.ts Outdated Show resolved Hide resolved
@lcswillems
Copy link
Contributor

lcswillems commented Apr 13, 2024

Notes to myself:

  1. Once all the feedback above is discussed / taken into account, review more closely CSProxy and CSWorld.

  2. Thinking about changing the name "chainsimulator" to something else. Maybe "lightSimulnet" / "simulnet"?

  3. Review CSWorld.ts once all the other feedback is taken into account.

  4. CSWorld / CSProxy should implement at least the functionalities of SWorld and SProxy. For example, createContract is missing.

xsuite/src/world/csworld.ts Outdated Show resolved Hide resolved
@lcswillems
Copy link
Contributor

@lcswillems One thing I noticed now that I re-added the Hatom tests is that the world.createWallet function will always create the wallets in Shard 0 due to the way it generates addresses. So for the Hatom tests I had to manually input an address which is on Shard 1 for everything to work sync.

I am thinking that maybe in the future the world.createWallet function of the CSWorld could also take an optional Shard argument to create a wallet in a specific shard? Something to keep in mind for the future.

That's a good idea. WIll think more about it

@arda-org arda-org deleted a comment from raress96 May 3, 2024
@arda-org arda-org deleted a comment from raress96 May 3, 2024
@lcswillems
Copy link
Contributor

lcswillems commented May 5, 2024

It seems the CI doesn't pass.

@lcswillems
Copy link
Contributor

lcswillems commented May 9, 2024

Things to be fixed upstream in the chain simulator repo:

  • config. We should not have to set the min stake to be 1 EGLD in our own config.
  • process-status doesn't work properly when metachain call fails.

Things to be fixed in xSuite:

  • correctly implementing tx status in cases 1, 2, 3, 4

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

Successfully merging this pull request may close these issues.

None yet

2 participants