Menu

#3968 Exception when soroban transaction is missing soroban transaction data (Version: v20.0.0-rc.2.1)

open
nobody
bug (31)
2023-10-12
2023-10-12
Anonymous
No

Originally created by: leighmcculloch

Issue Description

stellar-core has an exception when a transaction is submitted containing an invoke host function operation, but without soroban transaction data included.

Steps to Reproduce

  • Submit a tx that has a soroban invoke host function operation without soroban transaction data included:
    AAAAAgAAAACO88xKn7okL6qS3284Mhbs9GzuDPvx3KtzGqZOGJoSIgABhqAAAFjxAAAAAQAAAAEAAAAAAAAAAAAAAABlJ4AXAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABO7Gz+xb9nyreNvibQN6mvUsL1reysddANoBFVlwN27MAAAAGZGVwbG95AAAAAAACAAAADQAAACCkDLz/pCit1PKtox2QTFwDpJIehLZSsjURBvQk5Kr3hgAAAA0AAAAAAAAAAAAAAAAAAAABGJoSIgAAAECXFGdEfDeyn8zE7idSy++Vw8To/KzXfyEjfJj1TsS08on+w9aa0j7BxO+m+/kzg2tJbTc0YTGa3oX7i+CEEsgI

Expected Result

Some sort of invalid or malformed tx error because soroban transaction data is always required for soroban transactions.

Actual Result

stellar-core has an exception saying:

stellar-core exception: _ext_t: sorobanData accessed when not selected

Full logs from horizon who submitted the tx to stellar-core:

time="2023-10-12T05:11:21.549Z" level=info msg="Processing transaction" hash=18bceec982241446ea77718ac11607e0eb0d1997a32fdb75b230274f521e5ecc pid=237 req=3cf5ce9e4cbc/kW1N9ArkV6-007273 service=txsub.System tx=AAAAAgAAAACO88xKn7okL6qS3284Mhbs9GzuDPvx3KtzGqZOGJoSIgABhqAAAFjxAAAAAQAAAAEAAAAAAAAAAAAAAABlJ4AXAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABO7Gz+xb9nyreNvibQN6mvUsL1reysddANoBFVlwN27MAAAAGZGVwbG95AAAAAAACAAAADQAAACCkDLz/pCit1PKtox2QTFwDpJIehLZSsjURBvQk5Kr3hgAAAA0AAAAAAAAAAAAAAAAAAAABGJoSIgAAAECXFGdEfDeyn8zE7idSy++Vw8To/KzXfyEjfJj1TsS08on+w9aa0j7BxO+m+/kzg2tJbTc0YTGa3oX7i+CEEsgI tx_type=EnvelopeTypeEnvelopeTypeTx
time="2023-10-12T05:11:21.565Z" level=info msg="Submitter result" duration=0.001100334 err="stellar-core exception: _ext_t: sorobanData accessed when not selected" pid=237 req=3cf5ce9e4cbc/kW1N9ArkV6-007273 service=txsub.submitter
time="2023-10-12T05:11:21.565Z" level=info msg="Submission system result" hash=18bceec982241446ea77718ac11607e0eb0d1997a32fdb75b230274f521e5ecc pid=237 req=3cf5ce9e4cbc/kW1N9ArkV6-007273 result="{Err:stellar-core exception: _ext_t: sorobanData accessed when not selected\ngithub.com/stellar/go/support/errors.Errorf\n\t/go/src/github.com/stellar/go/support/errors/main.go:30\ngithub.com/stellar/go/services/horizon/internal/txsub.(*submitter).Submit\n\t/go/src/github.com/stellar/go/services/horizon/internal/txsub/submitter.go:55\ngithub.com/stellar/go/services/horizon/internal/txsub.(*System).submitOnce\n\t/go/src/github.com/stellar/go/services/horizon/internal/txsub/system.go:255\ngithub.com/stellar/go/services/horizon/internal/txsub.(*System).Submit\n\t/go/src/github.com/stellar/go/services/horizon/internal/txsub/system.go:164\ngithub.com/stellar/go/services/horizon/internal/actions.SubmitTransactionHandler.GetResource\n\t/go/src/github.com/stellar/go/services/horizon/internal/actions/submit_transaction.go:174\ngithub.com/stellar/go/services/horizon/internal/httpx.ObjectActionHandler.ServeHTTP\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/handler.go:38\ngithub.com/go-chi/chi.(*Mux).routeHTTP\n\t/go/pkg/mod/github.com/go-chi/chi@v4.0.3+incompatible/mux.go:425\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/throttled.(*HTTPRateLimiter).RateLimit.func1\n\t/go/pkg/mod/github.com/stellar/throttled@v2.2.3-0.20190823235211-89d75816f59d+incompatible/http.go:73\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/services/horizon/internal/httpx.(*Router).addMiddleware.func2.1\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/router.go:118\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/rs/cors.(*Cors).Handler.func1\n\t/go/pkg/mod/github.com/rs/cors@v0.0.0-20160617231935-a62a804a8a00/cors.go:190\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/go-chi/chi/middleware.(*Compressor).Handler.func1.1\n\t/go/pkg/mod/github.com/go-chi/chi@v4.0.3+incompatible/middleware/compress.go:190\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/services/horizon/internal/httpx.recoverMiddleware.func1\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/middleware.go:228\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\nnet/http.MaxBytesHandler.func1\n\t/usr/local/go/src/net/http/server.go:3642\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/services/horizon/internal/httpx.timeoutMiddleware.func1.1\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/middleware.go:111\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/services/horizon/internal/httpx.loggerMiddleware.func1.1\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/middleware.go:84\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/support/http.XFFMiddleware.func1.1\n\t/go/src/github.com/stellar/go/support/http/xff_middleware.go:51\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/services/horizon/internal/httpx.contextMiddleware.func1\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/middleware.go:48\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/go-chi/chi/middleware.RequestID.func1\n\t/go/pkg/mod/github.com/go-chi/chi@v4.0.3+incompatible/middleware/request_id.go:76\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/stellar/go/services/horizon/internal/httpx.requestCacheHeadersMiddleware.func1\n\t/go/src/github.com/stellar/go/services/horizon/internal/httpx/middleware.go:38\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122 Transaction:{LedgerCloseTime:0001-01-01 00:00:00 +0000 UTC TransactionWithoutLedger:{TotalOrderID:{ID:0} TransactionHash: LedgerSequence:0 ApplicationOrder:0 Account: AccountMuxed:{NullString:{String: Valid:false}} AccountSequence:0 MaxFee:0 FeeCharged:0 OperationCount:0 TxEnvelope: TxResult: TxMeta: TxFeeMeta: Signatures:[] MemoType: Memo:{NullString:{String: Valid:false}} TimeBounds:{Null:false Upper:{NullInt64:{Int64:0 Valid:false}} Lower:{NullInt64:{Int64:0 Valid:false}}} LedgerBounds:{Null:false MaxLedger:{NullInt64:{Int64:0 Valid:false}} MinLedger:{NullInt64:{Int64:0 Valid:false}}} MinAccountSequence:{NullInt64:{Int64:0 Valid:false}} MinAccountSequenceAge:{NullString:{String: Valid:false}} MinAccountSequenceLedgerGap:{NullInt64:{Int64:0 Valid:false}} ExtraSigners:[] CreatedAt:0001-01-01 00:00:00 +0000 UTC UpdatedAt:0001-01-01 00:00:00 +0000 UTC Successful:false FeeAccount:{NullString:{String: Valid:false}} FeeAccountMuxed:{NullString:{String: Valid:false}} InnerTransactionHash:{NullString:{String: Valid:false}} NewMaxFee:{NullInt64:{Int64:0 Valid:false}} InnerSignatures:[]}}}" service=txsub.System
time="2023-10-12T05:11:21.565Z" level=error msg="stellar-core exception: _ext_t: sorobanData accessed when not selected" pid=237 req=3cf5ce9e4cbc/kW1N9ArkV6-007273 stack="[main.go:30 submitter.go:55 system.go:255 system.go:164 submit_transaction.go:174 handler.go:38 mux.go:425 server.go:2122 http.go:73 server.go:2122 router.go:118 server.go:2122 cors.go:190 server.go:2122 compress.go:190 server.go:2122 middleware.go:228 server.go:2122 server.go:3642 server.go:2122 middleware.go:111 server.go:2122 middleware.go:84 server.go:2122 xff_middleware.go:51 server.go:2122 middleware.go:48 server.go:2122 request_id.go:76 server.go:2122 middleware.go:38 server.go:2122]"
time="2023-10-12T05:11:21.565Z" level=info msg="Finished request" app_name=undefined app_version=undefined bytes=354 client_name=undefined client_version=undefined duration=0.016752791 host="localhost:8000" ip=127.0.0.1 ip_port="127.0.0.1:40740" method=POST path=/transactions pid=237 referer="http://localhost:4507/" req=3cf5ce9e4cbc/kW1N9ArkV6-007273 route=/transactions status=500 streaming=false x_forwarder_for=

Your Environment and Setup

stellar-core Version

v20.0.0-rc.2.1

Environment

  • Operation System & Version (You can usually obtain from uname -a)
    Linux 6f5e2876f9c5 6.3.13-linuxkit [#1] SMP PREEMPT Thu Sep 7 07:48:47 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
  • Are you running from the command line? From a container?
    Container
  • Did you pass in special parameters when building the app?
    --disable-tests
  • Please add any additional relevant configuration related to this bug report.
    N/A

Supporting Files

None

Additional context

This issue was first opened here:

Discussion


Log in to post a comment.