stellar-deprecated / stellar_core_commander

A system of creating isolated Stellar test networks into which you can play transactions and record results.
Apache License 2.0
19 stars 27 forks source link

Transaction is not supported on 13 protocol #140

Open charlie-wasp opened 4 years ago

charlie-wasp commented 4 years ago

What version are you using?

master branch stellar-core v13.1.0

What did you do?

bundle exec scc -r examples/simple_payment.rb

What did you expect to see?

SQL queries, reflecting the stellar-core database state after operations from example file executed

What did you see instead?

running recipe
running node0-11625-GD5TEH (dir:/var/folders/1y/7dh6grvx0sjb9668mc2ky11h0000gn/T/scc20200610-76205-huv6jq/node0)
node0-11625-GD5TEH waiting for 127.0.0.1: 11625
node0-11625-GD5TEH waiting for 127.0.0.1: 11625
node0-11625-GD5TEH ready on 127.0.0.1: 11625
waiting 960.0 seconds for stellar-core node0-11625-GD5TEH ( catchup_complete: false, catchup_recent: false, special_peers: false )
Wait is over! stellar-core node0-11625-GD5TEH is synced (state: Synced!, SCP quorum: 2, Status: ["Armed with network upgrades: upgradetime=2020-06-10T09:12:15Z, protocolversion=13, maxtxsize=1000000"])
DEPRECATION WARNING: Transaction.create_account is deprecated. Use Stellar::TransactionBuilder instead. (called from create_account at /Users/charlie/code/stellar_core_commander/transaction_builder.rb:136)

Error! (RuntimeError): transaction on node0-11625-GD5TEH failed: #<Stellar::TransactionResult:0x00007fd9881db190 @attributes={:fee_charged=>100, :result=>#<Stellar::TransactionResult::Result:0x00007fd9881daf38 @switch=#<Stellar::TransactionResultCode:0x00007fd987cc1290 @name="tx_not_supported", @value=-12>, @arm=nil, @value=:void>, :ext=>#<Stellar::TransactionResult::Ext:0x00007fd9881dae48 @switch=0, @arm=nil, @value=:void>}>

/Users/charlie/code/stellar_core_commander/process.rb:653:in `submit_transaction'
/Users/charlie/code/stellar_core_commander/transactor.rb:475:in `submit_transaction'
/Users/charlie/code/stellar_core_commander/transactor.rb:91:in `block in recipe_step'
examples/simple_payment.rb:3:in `run_recipe'
/Users/charlie/code/stellar_core_commander/transactor.rb:53:in `instance_eval'
/Users/charlie/code/stellar_core_commander/transactor.rb:53:in `run_recipe'
/Users/charlie/code/stellar_core_commander/bin/scc:94:in `run'
/Users/charlie/code/stellar_core_commander/bin/scc:155:in `<top (required)>'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/bin/scc:23:in `load'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/bin/scc:23:in `<top (required)>'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:63:in `load'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:63:in `kernel_load'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:28:in `run'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:476:in `exec'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:30:in `dispatch'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:24:in `start'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/Users/charlie/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/Users/charlie/.asdf/installs/ruby/2.5.1/bin/bundle:23:in `load'
/Users/charlie/.asdf/installs/ruby/2.5.1/bin/bundle:23:in `<main>'

cleaning up 1 processes
dumping database to /var/folders/1y/7dh6grvx0sjb9668mc2ky11h0000gn/T/scc20200610-76205-huv6jq/node0/database-1591780335-21738.sql
dumping server query /var/folders/1y/7dh6grvx0sjb9668mc2ky11h0000gn/T/scc20200610-76205-huv6jq/node0/scp-1591780335-78968.json
dumping server query /var/folders/1y/7dh6grvx0sjb9668mc2ky11h0000gn/T/scc20200610-76205-huv6jq/node0/info-1591780335-5169.json
dumping server query /var/folders/1y/7dh6grvx0sjb9668mc2ky11h0000gn/T/scc20200610-76205-huv6jq/node0/metrics-1591780335-81442.json
stellar-core process exited: 76467

===================================

Hey, there 👋 I tried to test, how stellar_core_commander works on 13 protocol. I cloned the repo and changed its dependency on the new stellar-sdk version release candidate. Basically I got the "transaction is not supported" error. I believe this particular part of the stellar-core code can cause it:

https://github.com/stellar/stellar-core/blob/65d17d3ab11d12281cc2958795dba4676fa88dbe/src/transactions/TransactionFrame.cpp#L330-L336

Since new SDK version submits envelopes with ENVELOPE_TYPE_TX type and muxed accounts as sources, I guess something happened with ledger versions during scc work. I tried to troubleshoot that, but all I got is that scc run leaves two ledgers in the database, both with ledgerVersion set to 0 (which feels weird for me)

Is scc prepared for work with 13 protocol at all now? Or am I too hasty? 😅

ire-and-curses commented 4 years ago

Could you tell us more about why and how you are using this project for your work? We've been moving away from this approach in favour of mocking and creating fixtures, which is probably why this is out of date.

charlie-wasp commented 4 years ago

@ire-and-curses actually, I don't use scc in my work. I just wanted to test backward compatibility of the new upcoming Ruby SDK version, using this repo. So if it will be abandoned soon, I'm pretty sure that this issue is irrelevant then

Thank you for the quick response!

ire-and-curses commented 4 years ago

Ok! We'll discuss this early next week and decide on next steps for this.