82 Commits

Author SHA1 Message Date
TAMARA LIPOWSKI
f5bcd31d66 feat: Rust testing SDK - implement get_amount_out simulation 2025-09-10 11:44:16 -04:00
TAMARA LIPOWSKI
5f8dccb729 feat: Pass adapter contract to decoder
This was the most elegant solution we could come up with at the moment for having the proper adapter in the builder.

Notes:
- The default adapter bytecode in tycho-simulation is still loaded at compile time.
- If the adapter bytecode is passed to the decoder, it will be loaded dynamically at runtime and used instead the bytecodes in tycho-simulation.
- The adapter bytecode is used in the builder to get capabilities and thus spot prices before returning the state, so just overwriting the adapter in the state is way too cumbersome. We went with this solution since it was the lesser evil, even though we know it leaks VM-specific info to non-vm protocols (which was already being done anyway with the balances).
2025-09-10 11:44:16 -04:00
adrian
242a5892da chore: update readme 2025-09-10 16:36:08 +02:00
adrian
62f0cc3060 chore: move separator to print it before anything else at the start 2025-09-10 16:36:08 +02:00
adrian
b1db641c31 fix: docker entrypoint handle correctly passing a single argument as a string 2025-09-10 16:36:08 +02:00
adrian
580a8822a5 feat: add match-test argument to test cli 2025-09-10 16:36:08 +02:00
adrian
24504d0f94 feat: add docker image to build binaries used in tests 2025-09-10 16:36:08 +02:00
Tamara
93b969e41f feat(Testing SDK): Pass adapter path to decoder (#249)
* feat: Pass adapter contract to decoder

This was the most elegant solution we could come up with at the moment for having the proper adapter in the builder.

Notes:
- The default adapter bytecode in tycho-simulation is still loaded at compile time.
- If the adapter bytecode is passed to the decoder, it will be loaded dynamically at runtime and used instead the bytecodes in tycho-simulation.
- The adapter bytecode is used in the builder to get capabilities and thus spot prices before returning the state, so just overwriting the adapter in the state is way too cumbersome. We went with this solution since it was the lesser evil, even though we know it leaks VM-specific info to non-vm protocols (which was already being done anyway with the balances).

* feat: Take a struct of vm_attributes instead of just adapter path

So that we don't need to change the interface in the future

* chore: remove comment - we are no longer blocked

This is fixed with the latest change to pass adapter contract to decoder

* feat: Use DecoderContext instead of VMAttributes

- More easily extendable
- Doesn't break the existing decoder interface

---------

Co-authored-by: TAMARA LIPOWSKI <data.lipowski@extaccount.com>
2025-09-08 14:34:27 -04:00
adrian
5a9a757a06 fix: downgrade tycho deps to compatible version with tycho-simulation 2025-09-08 11:29:28 +02:00
adrian
eac74450bc test: add test for the token balances validation 2025-09-04 17:46:27 +02:00
adrian
ae6f5e0a12 feat: return errors instead of doing asserts 2025-09-03 08:55:29 -04:00
adrian
7b028f4263 fix: postgres extensions setup in dockerfile 2025-09-03 08:55:29 -04:00
adrian
281bab5cac feat: add adapter builder 2025-09-03 08:55:29 -04:00
adrian
87c9a8b60f test: check that all the existing substreams integration test files can be parsed 2025-09-03 08:55:29 -04:00
adrian
8f1b2d9df8 feat: split postgres.Dockerfile in two stages to not include build pkgs into the final image. It also adds the postgres user at the end 2025-09-03 08:55:29 -04:00
TAMARA LIPOWSKI
10fceb1607 fix: Don't error if stream ends
tycho-indexer may exit with non-zero status when stream ends normally

Not entirely confident in this commit - please double-check
2025-09-03 08:55:29 -04:00
TAMARA LIPOWSKI
742948cdf5 feat: Fix tycho-common and -client dependencies
- These should match what we currently have in simulation and execution.
- Also nightly fmt
2025-09-03 08:55:29 -04:00
TAMARA LIPOWSKI
c12affb3ca docs: Add README and logging to match python package
- The readme is useful for us during development. This should be eventually removed and replaced with gitbook docs.
2025-09-03 08:55:29 -04:00
TAMARA LIPOWSKI
c89fbee0ae feat: add docker-compose.yaml to set up postgres 2025-09-03 08:55:29 -04:00
adrian
8205c2a8d5 feat: handle errors in protocol-testing 2025-09-03 08:55:29 -04:00
adrian
f3500dff44 feat: update tycho deps and upgrade code 2025-09-03 08:55:29 -04:00
adrian
f7e3b7350e feat: add docker-compose.yaml to set up postgres 2025-09-03 08:55:29 -04:00
Thales
def49e7ddf feat: fix test runner. Working version to get_amount_out 2025-09-03 08:55:29 -04:00
Thales Lima
afd5527b15 feat: Start simulation by calling get_amount_out 2025-09-03 08:55:29 -04:00
Thales
c9b2c655dd feat: build snapshot message from rpc requests 2025-09-03 08:55:29 -04:00
Thales Lima
052d11b759 feat: Add tokens balance check and component diff 2025-09-03 08:55:29 -04:00
Thales Lima
2c8e349280 feat: Add methods to fetch state from Tycho RPC 2025-09-03 08:55:29 -04:00
Thales Lima
160523a888 feat: add test runner structure 2025-09-03 08:55:29 -04:00
Thales Lima
e3ae70ab43 feat: add Tycho Runner to run separate tycho processes 2025-09-03 08:55:29 -04:00
Thales Lima
4425fe1680 feat: add util to build SPKG with a modified start block 2025-09-03 08:55:29 -04:00
Thales Lima
0bc39aee55 feat: add RPC logic and config yaml parsing 2025-09-03 08:55:29 -04:00
Thales Lima
8b6beb0214 feat: create rust-testing module 2025-09-03 08:55:29 -04:00