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

test(stellar-test-ledger): Stellar Test Ledger #3239

Closed
fazzatti opened this issue Apr 29, 2024 · 2 comments · Fixed by #3274 or #3324
Closed

test(stellar-test-ledger): Stellar Test Ledger #3239

fazzatti opened this issue Apr 29, 2024 · 2 comments · Fixed by #3274 or #3324
Labels
enhancement New feature or request

Comments

@fazzatti
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Implement a Test Ledger able to pull up a docker image with a stellar network core, validators, and necessary services(Horizon API, Soroban RPC, and Friendbot) to run Stellar-related Cacti tests against.

Describe the solution you'd like
The Stellar Test Ledger should:

  • Start, stop, and destroy a docker container with the test ledger.
  • Contains all the necessary services to execute complete use cases in Stellar.
    • Horizon API server for interacting with the Stellar network.
    • Soroban RPC for interacting with smart contracts.
    • Friendbot for starting and funding accounts in a test environment.
  • Ensure all services are available before allowing the tests to be executed.
  • Allow for an ephemeral pristine local ledger to be started with no history.

Additional context
This is the first step of the initiative mention in the issue #3238 .

@fazzatti fazzatti added the enhancement New feature or request label Apr 29, 2024
@fazzatti
Copy link
Contributor Author

With @petermetz 's assistance, I begin by pulling up the code from this branch #3235 and implemented a working prototype version for this test ledger in my fork of Cacti. You can access and test in this branch:

There, it is possible to test the Test Ledger directly by triggering the following tests:

yarn jest packages/cactus-test-tooling/src/test/typescript/integration/stellar/stellar-test-ledger/constructor-validates-options.test.ts

These tests will validate that the StellarTestLedger class operates correctly and exposes the services properly for the tests to be conducted.

If one would like to further test this test ledger, there are temporary tests under the connector tests directory that can be executed with:

yarn jest packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/validate-test-ledger.test.ts

I'm just using these temporarily to start working on the connector but they can triggered in this branch to execute a few simple stellar transactions such as creating accounts and performing payments to ensure all services are operating correctly.

@fazzatti fazzatti changed the title test(stellar-test-ledger): Stellar Test Ledegr test(stellar-test-ledger): Stellar Test Ledger Apr 29, 2024
@RafaelAPB
Copy link
Contributor

Happy to help reviewing the PR when you have a first draft! Thanks for your contribution

fazzatti added a commit to fazzatti/cacti that referenced this issue May 20, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 20, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 20, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 20, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 20, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 21, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 21, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
petermetz pushed a commit to fazzatti/cacti that referenced this issue May 22, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
fazzatti added a commit to fazzatti/cacti that referenced this issue May 22, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
petermetz pushed a commit to fazzatti/cacti that referenced this issue May 22, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
petermetz pushed a commit that referenced this issue May 22, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes #3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
sandeepnRES pushed a commit to sandeepnRES/cacti that referenced this issue Jul 30, 2024
- Add a Stellar test ledger class that can be used in integration tests
  to start and stop a Stellar test network based on the Stellar
  quickstart docker image: https://github.com/stellar/quickstart

- Inclues the following services for fetching ledger state, executing
classic transactions and also soroban smart contracts transactions.
  - Stellar Core
  - Horizon API
  - Soroban RPC
  - Friendbot

Fixes hyperledger#3239

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants