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

soroban-rpc: Remove dependency on Horizon #431

Merged
merged 7 commits into from
Mar 20, 2023

Conversation

2opremio
Copy link
Contributor

Fixes #430

@2opremio 2opremio requested review from tamirms and sreuland February 23, 2023 15:43
@2opremio
Copy link
Contributor Author

2opremio commented Feb 23, 2023

@sreuland @tamirms I am not sure how to handle the different workflows (build-latest.yml build-soroban-dev.yml build-testing.yml) It seems that latest is using 0.4, soroban-dev is using 0.6.1and testing is using 0.4

However, the removal of the Horizon dependency only happened in main. Maybe we should wait until all workflows surpass a version with Horizon removed?

@sreuland
Copy link
Contributor

@sreuland @tamirms I am not sure how to handle the different workflows (build-latest.yml build-soroban-dev.yml build-testing.yml) It seems that latest is using 0.4, soroban-dev is using 0.6.1and testing is using 0.4

However, the removal of the Horizon dependency only happened in main. Maybe we should wait until all workflows surpass a version with Horizon removed?

Ok, yes, I think for now, can continue to update just the workflows with soroban-tools ref where it's possible to be used, so just the soroban-dev and just to a soroban release version. All the workflows build rpc from soroban-tools and copy the bin to the final quickstart image, but it's only started as a service if --enable-soroban-rpc is passed on docker run and that is only supposed to be used on the soroban-dev image and the option is only allowed with --standalone and --futurenet.

Am assuming when testnet/pubnet get upgrade to soroban enabled core version, then the latest/testing workflows get changed to use same core release/ref version and would bump the soroban_tools_ref to latest version and change quickstart to allow --enable-soroban-rpc with --testnet and --pubnet and change the README.md to accurately state the same allowed usages.

for situations that want to build quickstart and use main or other ref on soroban tools, can do that locally, by checking out quickstart and running make with CORE_REF/SOROBAN_TOOLS_REF/GO_REF

@2opremio
Copy link
Contributor Author

All the workflows build rpc from soroban-tools and copy the bin to the final quickstart image, but it's only started as a service if --enable-soroban-rpc is passed on docker run and that is only supposed to be used on the soroban-dev image and the option is only allowed with --standalone and --futurenet.

Does this mean that the current change will only impact the soroban-dev image?

I guess that we will need to make a new soroban-tools release so that we can bump the soroban_tools_ref to something higher that 0.6.1?

Should I just create a new tag, say, 0.7.0? (I see there's already a 0.6.1 tag without a matching release).

@sreuland
Copy link
Contributor

All the workflows build rpc from soroban-tools and copy the bin to the final quickstart image, but it's only started as a service if --enable-soroban-rpc is passed on docker run and that is only supposed to be used on the soroban-dev image and the option is only allowed with --standalone and --futurenet.

Does this mean that the current change will only impact the soroban-dev image?

I guess that we will need to make a new soroban-tools release so that we can bump the soroban_tools_ref to something higher that 0.6.1?

Should I just create a new tag, say, 0.7.0? (I see there's already a 0.6.1 tag without a matching release).

the '0.6.1' tag on tools was done as part of Preview 7 release, just to capture a needed fix done in ingest package for rpc to use during ingestion, a gh release would have initiated other workflows that weren't desired.

Yes, the changes here are effective in the soroban-dev image build only. The soroban-rpc bin and supervisord service config files are compiled into all quickstart image variants, but it is only deployed and started when the --enable-soroban-rpc is used which also requires --standalone or --futurenet network only, and will only work on the soroban-dev image b/c it uses the latest released soroban enabled core git ref compiled with 'enable next protocol version'. As testnet and pubnet get upgraded, then at same time, will have to change quickstart to deploy and enable soroban-rpc for that network type also(follow the same as done in futurenet/soroban-rpc).

The intent of soroban-dev image was to be pinned to soroban release, we probably don't want to change soroban_tools_ref until next. There is option to build quickstart image locally with the makefile and specify newer version of tools/core refs. Once pubnet is upgraded to soroban, assuming we likely deprecate 'soroban-dev' and then just have the latest and testing images set to the latest tools/core refs.

start Outdated Show resolved Hide resolved
@2opremio
Copy link
Contributor Author

2opremio commented Feb 24, 2023

@sreuland this cannot be merged without updating thesoroban-tools ref so we have two options:

  1. Create a v0.6.2 tag on soroban-tools repo and use that.
  2. Put this on hold until the next soroban release

I actually think (1) is fine since the changes are only specific to soroban-rpc (although the API is changed) and don't have anything to do with the network: stellar/stellar-cli@v0.6.1...main

@2opremio
Copy link
Contributor Author

I took the liberty of creating a v0.6.2 tag on soroban-tools and bumping the reference here.

@2opremio
Copy link
Contributor Author

2opremio commented Feb 24, 2023

It seems like the arm64 build is getting killed (OOM?) when compiling the Rust libpreflight library:

 #12 255.7    Compiling quote v1.0.23
#12 609.6 Killed
#12 609.8 make: *** [Makefile:43: build-libpreflight] Error 137

See https://github.com/stellar/quickstart/actions/runs/4261942106/jobs/7417223417

@sreuland
Copy link
Contributor

sreuland commented Feb 24, 2023

@sreuland this cannot be merged without updating thesoroban-tools ref so we have two options:

  1. Create a v0.6.2 tag on soroban-tools repo and use that.
  2. Put this on hold until the next soroban release

I actually think (1) is fine since the changes are only specific to soroban-rpc (although the API is changed) and don't have anything to do with the network: stellar/[email protected]

yes, agreed on first option and can approve if API change coming in 0.6.2 is just additive, not breaking compatibility from 0.6.1 correct?
[update] - tried out the versions on system-test, confirm that [email protected] is not compatible with [email protected] due to the removal of getAccount jrpc method, if we proceed with update, it would require using soroban-cli built with >= [email protected], or we hold here and for use cases that need latest can build quickstart locally with newer versions via the make arguments CORE_REF/SOROBAN_TOOLS_REF/GO_REF.

The Preview 7 Release also provides a pinned hash of stellar/quickstart:soroban-dev from time of release, so, for those wanting to stay on that release, they can do so.

It seems like the arm64 build is getting killed (OOM?) when compiling the Rust libpreflight library:

ok, looking at test failure, maybe a docker qemu thing..

@2opremio
Copy link
Contributor Author

, if we proceed with update, it would require using soroban-cli built with >= [email protected], or we hold here and for use cases that need latest can build quickstart locally with newer versions via the make arguments CORE_REF/SOROBAN_TOOLS_REF/GO_REF.

I'm fine with one option or the other. Your call

ok, looking at test failure, maybe a docker qemu thing..

Did you get somewhere?

@sreuland
Copy link
Contributor

, if we proceed with update, it would require using soroban-cli built with >= [email protected], or we hold here and for use cases that need latest can build quickstart locally with newer versions via the make arguments CORE_REF/SOROBAN_TOOLS_REF/GO_REF.

I'm fine with one option or the other. Your call

ok, looking at test failure, maybe a docker qemu thing..

Did you get somewhere?

@tsachiherman , do you have preference on inter-release updates to stellar/quickstart:soroban-dev, we want to confirm what the meaning of this image should represent, i.e. last stable release or 'latest', this pr introduces a newer rpc with breaking change that requires users to use the latest soroban-tools build of cli with it(the getAccount method is removed), the preview 7 release does specify a specific hash of stellar/quickstart:soroban-dev.

@2opremio , on the test failure, it does look like qemu triggering more memory, I asked about options for using gh runner with larger ram profile, the default only provides 7g, will try that out.

@tsachiherman
Copy link
Contributor

, if we proceed with update, it would require using soroban-cli built with >= [email protected], or we hold here and for use cases that need latest can build quickstart locally with newer versions via the make arguments CORE_REF/SOROBAN_TOOLS_REF/GO_REF.

I'm fine with one option or the other. Your call

ok, looking at test failure, maybe a docker qemu thing..

Did you get somewhere?

@tsachiherman , do you have preference on inter-release updates to stellar/quickstart:soroban-dev, we want to confirm what the meaning of this image should represent, i.e. last stable release or 'latest', this pr introduces a newer rpc with breaking change that requires users to use the latest soroban-tools build of cli with it(the getAccount method is removed), the preview 7 release does specify a specific hash of stellar/quickstart:soroban-dev.

I think that you already answered your own question. Yes, we need to be able to define clearly what each one of these means, so that there is a clear definition. I think that the release docs should specify that hash, so that you could always use historical builds. That would allow us to use the latest without the hash, right ?

@sreuland
Copy link
Contributor

I think that you already answered your own question. Yes, we need to be able to define clearly what each one of these means, so that there is a clear definition. I think that the release docs should specify that hash, so that you could always use historical builds. That would allow us to use the latest without the hash, right ?

Yes, that does imply to maintain that consistency, refs to soroban-tools from here should keep up with the changes occurring in soroban-tools inter-release so that latest from there works with latest ref used here, doesn't have to be tags on soroban-tools, can just be commit refs.

…d, preflight processing was running out of memory on 'ubuntu-latest'
@tsachiherman
Copy link
Contributor

given that we need to start wrapping up our commitments toward the upcoming release, I'd suggest merging this in, so that we would have less technical debt toward the completing of the release. Otherwise, we need to find some way to ensure that this would get merged before the release takes place.

@sreuland
Copy link
Contributor

given that we need to start wrapping up our commitments toward the upcoming release, I'd suggest merging this in, so that we would have less technical debt toward the completing of the release. Otherwise, we need to find some way to ensure that this would get merged before the release takes place.

Ok, we had a discussion on here about what version of soroban stack that quickstart's 'soroban-dev' image should reference, agreed to make it latest, so,I've updated the pr to change 'soroban-dev' references to the mainline dev branches soroban-tools:main and go:soroban-xdr-next - 2d590c1

@2opremio
Copy link
Contributor Author

Great, should we merge @sreuland ?

Copy link
Contributor

@sreuland sreuland left a comment

Choose a reason for hiding this comment

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

yes, lgtm!

@2opremio 2opremio merged commit fedd819 into master Mar 20, 2023
@2opremio 2opremio deleted the soroban-rpc-remove-horizon-dependency branch March 20, 2023 08:54
runs-on: ubuntu-latest
runs-on: ${{ inputs.core_build_runner_type }}
Copy link
Member

Choose a reason for hiding this comment

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

@2opremio Why did we switch to using a 16x cpu runner for soroban-rpc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

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.

remove horizon from soroban-dev image
4 participants