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: libpreflight: Remove base64 encoding between Go and Rust #893

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Aug 23, 2023

Addresses most of stellar/stellar-rpc#49

It doesn't yet address this though, which is hard since, in order to check expirations, we sometimes need to unmarshallthe entry anyways. I will revisit this when once the new expiration changes land.

The ledger entry is obtained from the DB in binary-serialized XDR

Before:

goos: darwin
goarch: arm64
pkg: github.com/stellar/soroban-tools/cmd/soroban-rpc/internal/preflight
BenchmarkGetPreflight
BenchmarkGetPreflight/In-memory_storage
BenchmarkGetPreflight/In-memory_storage-12         	    4802	    239106 ns/op
BenchmarkGetPreflight/DB_storage
BenchmarkGetPreflight/DB_storage-12                	    3680	    304496 ns/op
BenchmarkGetPreflight/DB_storage,_restarting
BenchmarkGetPreflight/DB_storage,_restarting-12    	    3664	    304327 ns/op
BenchmarkGetPreflight/DB_storage,_no_cache
BenchmarkGetPreflight/DB_storage,_no_cache-12      	    2146	    527755 ns/op
PASS

After:

goos: darwin
goarch: arm64
pkg: github.com/stellar/soroban-tools/cmd/soroban-rpc/internal/preflight
BenchmarkGetPreflight
BenchmarkGetPreflight/In-memory_storage
BenchmarkGetPreflight/In-memory_storage-12         	    6972	    168184 ns/op
BenchmarkGetPreflight/DB_storage
BenchmarkGetPreflight/DB_storage-12                	    4916	    229217 ns/op
BenchmarkGetPreflight/DB_storage,_restarting
BenchmarkGetPreflight/DB_storage,_restarting-12    	    4800	    229573 ns/op
BenchmarkGetPreflight/DB_storage,_no_cache
BenchmarkGetPreflight/DB_storage,_no_cache-12      	    2594	    431494 ns/op
PASS

@2opremio 2opremio force-pushed the libpreflight-remove-base64 branch from baf9537 to 21da2d8 Compare August 23, 2023 19:04
Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

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

One comment on something that I initially misunderstood, but does not need addressing.

👏🏻

cmd/soroban-rpc/lib/preflight.h Show resolved Hide resolved
@2opremio 2opremio merged commit ff5ffa1 into stellar:main Aug 23, 2023
@2opremio 2opremio deleted the libpreflight-remove-base64 branch August 23, 2023 22:49
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.

2 participants