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

Bump Rust dependencies to support fees #625

Merged
merged 8 commits into from
May 4, 2023
Merged

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented May 3, 2023

What

Bump dependencies and add support fee support to soroban-tools

Why

Closes #621

Known limitations

This PR breaks Soroban-RPCs API (the xdr field is renamed to xdrs which is now a list containing multiple results).

This PR just handles proper complication of the Rust/Go code following XDR changes.
It still has a few TODOs and is complementary to #627 .

This will break CI when merged. The remaining tasks for this to work are:

  • Updating the Go code soroban-rpc: update xdr #627
  • Producing and filling in the new fee fields. This will require API changes
  • Updating the downstream SDKs to accomodate the new API.

write_bytes: 0,
extended_meta_data_size_bytes: 0,
},
// TODO: what value to use here?
Copy link
Contributor

Choose a reason for hiding this comment

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

I discussed that with @dmkozh and @sisuresh. Leave it like this for now, and once the simulateTransaction endpoint is ready, we'll need to update this code to use the endpoint to figure out these values.

Copy link
Contributor Author

@2opremio 2opremio May 4, 2023

Choose a reason for hiding this comment

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

Yes, I was planning to do that :)

However, the question is, what values to use for cases in which we were not preflight-ing the transaction (e.g. when uploading the contract).

Will we now need to start preflight-ing those transactions or can the values be inferred? (like we used to do before introducing fees)

@2opremio 2opremio marked this pull request as ready for review May 4, 2023 11:03
@2opremio 2opremio enabled auto-merge (squash) May 4, 2023 14:21
@tsachiherman tsachiherman disabled auto-merge May 4, 2023 14:46
@2opremio 2opremio changed the base branch from main to fees May 4, 2023 16:18
@2opremio 2opremio merged commit 5ce313e into stellar:fees May 4, 2023
@2opremio 2opremio deleted the fee-support branch May 4, 2023 16:18
tsachiherman added a commit that referenced this pull request May 17, 2023
* Bump Rust dependencies to support fees (#625)

* soroban-rpc: update xdr (#627)

update

* soroban-rpc: Bump core dependencies supporting fees (#634)

* fees: Bump stellar/go dependency (#637)

* Bump Rust dependencies to their latest version (#635)

* port: merge soroban cli inspect from main (#639)

* Try new docker compose plugin (#631)

* Try new docker compose plugin

* Ok we need to add the docker apt repo :(

* Need an apt-get update

* Force-install docker-compose

* Remove old docker-compose first?

* try removing moby-compose

* Clean up workflow

* Add meta output to soroban-cli contract inspect output (#620)

* Add env_meta output to soroban-cli contract inspect output

* Output contract meta and improve contract inspect formatting

* Indent the docs to match

* rustfmt

* Improve function inspect output

* improving the inspect output formatting

* handle lib in inspect output

* Satiate clippy

---------

Co-authored-by: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com>

---------

Co-authored-by: Paul Bellamy <paul@stellar.org>

* soroban-rpc: Calculate soroban transaction data in libpreflight (#636)

* Create Skeletton to calculate soroban transaction data in libpreflight

* Calculate transaction data a minimum fee in libpreflight

* Calculate transaction data a minimum fee in libpreflight

* Make integration tests compilable again

* Assume missing entries from ledger storage are created

* Update simulate transaction integration tests

* Add TODOs for the integration tests to pass

* Make events global

* Address review feedback

* Add TODO about taking into account the Auth size

* Add a few more TODOs and debug info

* First attempt and preflighting all transactions

* Always take into account keys when computing unmodified ledgers

* Come up with the minimum fee to add in order to make it work

* Fix transaction_resources computation

* Remove debug printout

* Increase instruction leeway

* Fix the rest of the simulate transaction test

* Fix remaining intgeration tests

* Address review feedback

* Tweak the instruction estimation further

* Address review feedback

* Fix tests again

* Obtain auth data per function

* Take auth data into account for estimating envelope size

* Split up libpreflight in multiple modules and improve the storage code

* Fix TODO

* Remove another TODO

* Remove yet another TODO

* Appease clippy

* update

* update core version

* make sure to test multiple host functions invocations.

---------

Co-authored-by: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com>

* try to replace the dns servers to avoid stale addresses.

* rollback dns change

* Add handling for invalid toml file support in ConfigOption.setValue

* #519: fixed issue with file path configs being lost after re loading cli/env flags, ordering of config value application was modified to default->env/cli->file path.

---------

Co-authored-by: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com>
Co-authored-by: Paul Bellamy <paul@stellar.org>
Co-authored-by: Shawn Reuland <shawn@stellar.org>
paulbellamy pushed a commit that referenced this pull request May 22, 2023
* Bump Rust dependencies to support fees (#625)

* soroban-rpc: update xdr (#627)

update

* soroban-rpc: Bump core dependencies supporting fees (#634)

* fees: Bump stellar/go dependency (#637)

* Bump Rust dependencies to their latest version (#635)

* port: merge soroban cli inspect from main (#639)

* Try new docker compose plugin (#631)

* Try new docker compose plugin

* Ok we need to add the docker apt repo :(

* Need an apt-get update

* Force-install docker-compose

* Remove old docker-compose first?

* try removing moby-compose

* Clean up workflow

* Add meta output to soroban-cli contract inspect output (#620)

* Add env_meta output to soroban-cli contract inspect output

* Output contract meta and improve contract inspect formatting

* Indent the docs to match

* rustfmt

* Improve function inspect output

* improving the inspect output formatting

* handle lib in inspect output

* Satiate clippy

---------

Co-authored-by: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com>

---------

Co-authored-by: Paul Bellamy <paul@stellar.org>

* soroban-rpc: Calculate soroban transaction data in libpreflight (#636)

* Create Skeletton to calculate soroban transaction data in libpreflight

* Calculate transaction data a minimum fee in libpreflight

* Calculate transaction data a minimum fee in libpreflight

* Make integration tests compilable again

* Assume missing entries from ledger storage are created

* Update simulate transaction integration tests

* Add TODOs for the integration tests to pass

* Make events global

* Address review feedback

* Add TODO about taking into account the Auth size

* Add a few more TODOs and debug info

* First attempt and preflighting all transactions

* Always take into account keys when computing unmodified ledgers

* Come up with the minimum fee to add in order to make it work

* Fix transaction_resources computation

* Remove debug printout

* Increase instruction leeway

* Fix the rest of the simulate transaction test

* Fix remaining intgeration tests

* Address review feedback

* Tweak the instruction estimation further

* Address review feedback

* Fix tests again

* Obtain auth data per function

* Take auth data into account for estimating envelope size

* Split up libpreflight in multiple modules and improve the storage code

* Fix TODO

* Remove another TODO

* Remove yet another TODO

* Appease clippy

* update

* update core version

* make sure to test multiple host functions invocations.

---------

Co-authored-by: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com>

* try to replace the dns servers to avoid stale addresses.

* rollback dns change

* Add handling for invalid toml file support in ConfigOption.setValue

* update

* appease cargo fmt

* update

* update

* Add rpc::server.get_network

* Add rpc::server.prepare_transaction

* get prepare_transaction stuff compiling

* use prepare_transaction and simplify

* Add and use client.prepare_and_send_transaction

* appease cargo fmt

* update fix compilation.

* Improve output for failed txn submission

* Add missing field from getLedgerEntries response

* Add transaction::assemble unit tests based on js-soroban-client

* Clean up some leftover printlns

* We don't need to manually set transaction_data, it can come from the simulation

---------

Co-authored-by: Alfonso Acosta <alfonso@stellar.org>
Co-authored-by: Paul Bellamy <paul@stellar.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

soroban-tools: Update Cargo.toml to meet core's fees changes
2 participants