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

Add framework for converting XDR structures to JSON #249

Merged
merged 68 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
e95604b
WIP: Add basic format switching to an endpoint
Shaptic Jul 11, 2024
68d007e
WIP: Add initial bindings for XDR to JSON
Shaptic Jul 11, 2024
c8ad6a8
Use local encoding and drop CLI req
Shaptic Jul 11, 2024
f0ecbfa
Add Go-side of bindings, test in getTransaction
Shaptic Jul 11, 2024
5fde6a1
Use official version, better memory cleanup
Shaptic Jul 15, 2024
0d128e1
Pipe through errors
Shaptic Jul 15, 2024
6607774
Merge branch 'main' into json-response-format
Shaptic Jul 15, 2024
dc16f33
Use built-in XDR instead of separate
Shaptic Jul 15, 2024
684f432
Pass-by-value and try JSON conversion
Shaptic Jul 16, 2024
f54de44
Add stellar_xdr and it works now \o/
Shaptic Jul 16, 2024
08f9e23
Remove encoding round-trip, diff field names
Shaptic Jul 16, 2024
a8fdfa9
Remove serde dependency
Shaptic Jul 16, 2024
dc19c52
Move everything into its own package
Shaptic Jul 16, 2024
5406ce7
Remove panics, return JSON errors
Shaptic Jul 16, 2024
c777fb8
Handle error structure in Go code
Shaptic Jul 16, 2024
9a89db8
Rust and Go linter appeasement
Shaptic Jul 16, 2024
5a67330
Add support for getTransactions()
Shaptic Jul 17, 2024
e156438
Add support for other endpoints
Shaptic Jul 17, 2024
d52ba92
Unify validation code
Shaptic Jul 17, 2024
37c8e92
Add function docs, use constants
Shaptic Jul 17, 2024
772d3b6
Add basic (needs discussion) getLedgerEntries support
Shaptic Jul 17, 2024
4234fe3
Bro wtfuck just give me ALL of the errors at once pls???
Shaptic Jul 17, 2024
351f2f9
Merge branch 'main' into json-response-format
Shaptic Jul 17, 2024
f2d7504
Xdr -> XDR, add JSON equivalents
Shaptic Jul 17, 2024
d2dd900
Merge branch 'json-response-format' of github.com:stellar/soroban-rpc…
Shaptic Jul 17, 2024
3cade16
Add support to sendTransaction endpoint
Shaptic Jul 17, 2024
74b8e51
Add getEvents support for topic/value
Shaptic Jul 17, 2024
4f67197
Improve comments and error message
Shaptic Jul 17, 2024
8d5025f
Merge branch 'main' into json-response-format
Shaptic Jul 18, 2024
fe34e37
Add JSON support for auth/retval in simulateTransaction
Shaptic Jul 19, 2024
120ba73
Merge branch 'json-response-format' of github.com:stellar/soroban-rpc…
Shaptic Jul 19, 2024
14a7984
Add transactionData support for simulateTransaction()
Shaptic Jul 19, 2024
0ef8b4b
PR feedback: error structure, fn renames
Shaptic Jul 26, 2024
b0f7c3b
Run formatters
Shaptic Jul 26, 2024
81cee9d
Merge branch 'main' into json-response-format
Shaptic Jul 26, 2024
8b4aec2
Add testing for several endpoints
Shaptic Jul 30, 2024
3c87d6a
Finish support for getLedgerEntries and simulateTransaction
Shaptic Jul 30, 2024
7472fc0
Better decoding for slices
Shaptic Jul 30, 2024
04d967d
Add ledger change parsing test
Shaptic Jul 30, 2024
706e47f
Simplify switch statement
Shaptic Jul 30, 2024
3beaf8f
Optimize code to avoid JSON round-trip
Shaptic Jul 31, 2024
3a01192
Test and linting fixups
Shaptic Jul 31, 2024
6eddc9f
Always return valid JSON
Shaptic Jul 31, 2024
fc066a3
Add barebones conversion test suite
Shaptic Jul 31, 2024
38811fd
Linting complaints: missing error checks
Shaptic Jul 31, 2024
ed07fbb
Add unsafe Rust annotation
Shaptic Jul 31, 2024
b4fe4d9
Fixup: don't preallocate
Shaptic Jul 31, 2024
b96985b
Omg linters are so annoying
Shaptic Jul 31, 2024
610a4e9
Magic number fixup
Shaptic Jul 31, 2024
05d19b9
Separate function, cyclomatic fuckery
Shaptic Jul 31, 2024
6b1f73d
Run gofumpt and fix long line :facepalm:
Shaptic Jul 31, 2024
8d2df95
Add input validation to getEvents
Shaptic Jul 31, 2024
449b5e7
Address some PR feedback: better interface mgmt
Shaptic Aug 5, 2024
bd2a7a0
Demonstrate Core -> Schema versioning pipeline
Shaptic Aug 5, 2024
c6b9817
Remove extraneous field left in during prototyping
Shaptic Aug 5, 2024
d3483e6
Revert "Demonstrate Core -> Schema versioning pipeline"
Shaptic Aug 5, 2024
1ef0940
Add benchmarking to evaluate XDR vs JSON format
Shaptic Aug 5, 2024
464727d
Remove experimental code after a sloppy revert
Shaptic Aug 5, 2024
d988dd9
Linting fixups: intrange, std error, assert -> require
Shaptic Aug 5, 2024
bf70f6f
Move xdr2json into its own library and add shared FFI
Shaptic Aug 6, 2024
e1c0061
Go linting: assert -> require
Shaptic Aug 6, 2024
ae2897a
Fix all Rust lints: docstrings, unsafe, etc.
Shaptic Aug 6, 2024
2a0a217
Simplify switch statement
Shaptic Aug 6, 2024
8c9977f
Feedback: move to methods, fixup event handling
Shaptic Aug 9, 2024
52fa037
Feedback: rename to IsValidFormat
Shaptic Aug 9, 2024
abeffe9
Feedback: remove extraneous logging
Shaptic Aug 9, 2024
5445b85
Fixup linter complaints
Shaptic Aug 9, 2024
2ae24b3
Bugfix: type wasn't set during simulation
Shaptic Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
go-version: 1.22
- run: rustup update
- uses: stellar/actions/rust-cache@main
- run: make build-libpreflight
- run: make build-libs

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@ jobs:
- name: Build libpreflight
run: |
rustup update
make build-libpreflight
make build-libs

- name: Run golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # version v6.0.1
with:
version: v1.59.1 # this is the golangci-lint version
github-token: ${{ secrets.GITHUB_TOKEN }}
only-new-issues: true




6 changes: 3 additions & 3 deletions .github/workflows/soroban-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: ./.github/actions/setup-go
- run: rustup update
- uses: stellar/actions/rust-cache@main
- run: make build-libpreflight
- run: make build-libs
- run: go test -race -timeout 25m ./cmd/soroban-rpc/...

build:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
rustup target add ${{ matrix.rust_target }}
rustup update
- uses: stellar/actions/rust-cache@main
- run: make build-libpreflight
- run: make build-libs
env:
CARGO_BUILD_TARGET: ${{ matrix.rust_target }}

Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:

- run: rustup update
- uses: stellar/actions/rust-cache@main
- run: make build-libpreflight
- run: make build-libs

- name: Run Soroban RPC Integration Tests
run: |
Expand Down
Loading
Loading