stellar
Repos
109

Developer discussion about possible changes to the protocol.

446
266

stellar-core is the reference implementation for the peer to peer agent that manages the Stellar network

C
3019
876

Stellar's public monorepo of go code

1184
434

Main Stellar client library for the Javascript language

564
253

Documentation for Stellar

3
19

Events

Undo breaking api change to registering tokens (#777)

What

Add back the contract ID param to the register_contract_token function.

Why

It was removed as part of the deployment, similar to the corresponding wasm function which we readded. Readding the same parameter here for consistency and to make the function behave as its comments and docs describe.

Created at 29 minutes ago
delete branch
leighmcculloch delete branch undoapichangetoken
Created at 29 minutes ago
pull request closed
Undo breaking api change to registering tokens

What

Add back the contract ID param to the register_contract_token function.

Why

It was removed as part of the deployment, similar to the corresponding wasm function which we readded. Readding the same parameter here for consistency and to make the function behave as its comments and docs describe.

Created at 29 minutes ago

Add missing tests and comments (#776)

What

Add missing tests that capture existing behavios and update comments to accurately describe the behavior too.

Why

There are no tests for this behavior that exists. There were missing comments that also don't elude to this behavior.

Merge branch 'main' into undoapichangetoken

Created at 40 minutes ago
delete branch
leighmcculloch delete branch addmissingtestsandcomments
Created at 41 minutes ago

Add missing tests and comments (#776)

What

Add missing tests that capture existing behavios and update comments to accurately describe the behavior too.

Why

There are no tests for this behavior that exists. There were missing comments that also don't elude to this behavior.

Created at 41 minutes ago
pull request closed
Add missing tests and comments

What

Add missing tests that capture existing behavios and update comments to accurately describe the behavior too.

Why

There are no tests for this behavior that exists. There were missing comments that also don't elude to this behavior.

Created at 41 minutes ago

Undo breaking api change to registering tokens

Created at 42 minutes ago
pull request opened
Undo breaking api change to registering tokens

What

Add back the contract ID param to the register_contract_token function.

Why

It was removed as part of the deployment, similar to the corresponding wasm function which we readded. Readding the same parameter here for consistency and to make the function behave as its comments and docs describe.

Created at 56 minutes ago
create branch
leighmcculloch create branch undoapichangetoken
Created at 56 minutes ago
pull request opened
Add missing tests and comments

What

Add missing tests that capture existing behavios and update comments to accurately describe the behavior too.

Why

There are no tests for this behavior that exists. There were missing comments that also don't elude to this behavior.

Created at 1 hour ago
create branch
leighmcculloch create branch addmissingtestsandcomments
Created at 1 hour ago
pull request closed
Fix tests when run in some configurations

What

Fix tests when run in some configurations where testutils isn't activated.

Why

We should always configure code intended for tests with test and testutils, not just testutils. I made this mistake in a recent PR. It breaks running tests in some IDEs, although by happenstance this doesn't show up in CI because of feature unification that happens during the CI builds.

Created at 1 hour ago

Fix tests when run in some configurations (#775)

What

Fix tests when run in some configurations where testutils isn't activated.

Why

We should always configure code intended for tests with test and testutils, not just testutils. I made this mistake in a recent PR. It breaks running tests in some IDEs, although by happenstance this doesn't show up in CI because of feature unification that happens during the CI builds.

Created at 1 hour ago
delete branch
leighmcculloch delete branch fixtests
Created at 1 hour ago
create branch
leighmcculloch create branch fixtests
Created at 1 hour ago
pull request opened
Fix tests when run in some configurations

What

Fix tests when run in some configurations where testutils isn't activated.

Why

We should always configure code intended for tests with test and testutils, not just testutils. I made this mistake in a recent PR. It breaks running tests in some IDEs, although by happenstance this doesn't show up in CI because of feature unification that happens during the CI builds.

Created at 1 hour ago
issue comment
Output a history JSON file next to buckets when running stellar-core catchup

Then for this particular use case you would run ./stellarc-core offline-info --full and get a json blob

Would this command be able to retroactively figure out what the history was that was downloaded? When I run catch-up I don't see any state being stored that would help stellar-core know.

I think it makes sense to do something like what @graydon describes or in the description where the history json is outputted at the same time as building the buckets, which means the output of that command will be more complete and standalone in a single shot.

Created at 1 hour ago
issue comment
Output a history JSON file next to buckets when running stellar-core catchup

Is the catch-up info something that is easily readable by a tool? It looks like it is dumped to stdout, so to confirm I think the workflow would be to:

  • run the catch-up command redirecting stdout to file
  • run the custom tool giving it that file and the bucket files

I just want to make sure that the format and way that the history json is delivered is in a way that a tool can easily access it. It wouldn't be ideal if a human had to look at a bunch of mixed output and pull out the relevant info by hand.

Created at 1 hour ago
issue comment
Output a history JSON file next to buckets when running stellar-core catchup

(We already emit a catchupinfo json object when doing offline catchup, we can just tack this on the end of it, it will not be a hard change)

Created at 1 hour ago
issue comment
Output a history JSON file next to buckets when running stellar-core catchup

@MonsieurNicolas No, he wants to download the buckets (and drive them forward to a specific ledger) and then ingest the state into a separate tool, and needs to know the buckets to read (in some way that's more reliable than "just ingest whatever is in the buckets directory")

Created at 1 hour ago
opened issue
Bulk map and vec initializers and accessors

Most of our host objects and host functions are "point-based", which makes some code needlessly expensive. Mainly when converting UDTs to and from maps and vecs, we make multiple temporaries and make multiple host function calls -- one per field -- when we could get away with some "bulk" operations fairly easily that pass more than one value in each direction. For example we could initialize a 4-element map with push, push, push, push, new_map_4 instead of push, new_map, push, map_push, push, map_push, push, map_push as we do today. These costs add up, and I think UDT code is one of our main cost amplifiers right now.

As with the multi-word experiments, we might find there's a saddlepoint between functions that take up-to-N arguments and a single function that takes a linear-memory slice pointing to a local array of rawvals (at least for inputs). For outputs, probably anything less than the saddlepoint is going to be no cheaper to bulk-extract than pointwise-extract, because of the overhead of setting up the array and bouncing arguments through it. My guess is that the saddlepoint is around 6 or 8 arguments, but it could be a ways off in either direction.

Created at 1 hour ago
opened issue
Host::unchecked_visit_val_obj should signal more errors

There's a helper function unchecked_visit_val_obj that is fairly lax with errors -- it converts a rawval to an object without checking that it's an object, and then indexes with vec::get() and passes the option to its caller. This is used as a helper for comparisons (among other things) and possibly made sense when we were trying to shoehorn comparison semantics into an infallible API like ord::cmp but we're giving up on that (see https://github.com/stellar/rs-soroban-env/issues/579) and so this function should probably be more strict about signalling errors in its input.

(Note: this is not a memory-safety or host-integrity issue, just a catching-bugs-in-contracts issue. The current code will, for example, allow a user to sort two dead object references against one another without complaint. The contract should probably actually trap if they do that.)

Created at 2 hours ago
pull request opened
fix okhttp3 class loader issue on android platform

I was able to replicate this problem in Android studio using emulator set at SDK version 28( android 'pie'):

The underlying issue was due to the shadowed jar, which rewrote an unintended 'com.android.org.conscrypt' hardcoded reference in the okhttp3 platform initialization which uses that as default to initialize networking from android:

https://github.com/square/okhttp/blob/parent-4.10.0/okhttp/src/main/kotlin/okhttp3/internal/platform/android/StandardAndroidSocketAdapter.kt#L61

it had a cycle when in error, trying to reference the platform instance while it was inside the platform init routine.

to avoid the problem, I tweaked the shadow config to ignore com.android.org.conscrypt ,which stops it from trying to rewrite any refs to that in the .class files in the shadowed jar.

after this change, I was able to verify the fix by running the same prior failing example with org.stellar.sdk.Server("https://horizon.stellar.com/") and OkHttpClient() which now worked.

Closes #450

Created at 2 hours ago