Jump to content
Tricky Fast Mike

Treat Fighter Status

Recommended Posts

Hi everyone!

Just a quick update on the status of Treat Fighter. We're still working through the backlog of bugs from the beta competition. Hopefully we will have another build out soon. At that point, we will consider doing another beta competition to make sure there are no more sync bugs before the real release.

Thanks for your patience!

Mike

  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

Hi Everyone!

There's a new version of Treat Fighter out this week! You can get it off the official website!

Release Notes:

  • Cache local names for 10 blocks
  • Speedups for CHITrigger, processing new blocks, database hash generation, sql queries
  • Fix issue where inventory was created in the live db even when pending and therefore would be out of order and cause hash mismatches.
  • Don’t allow fighters to go above Super Sweet.
  • Remember last scroll position even on infinite scroll lists
  • Remove some log spam

Expect more releases as we continue to fix bugs and work up to another tournament!

Mike

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Nice. I need to try this again but switched to linux for my main pc in the meantime. Is the plan to be only windows forever?

Share this post


Link to post
Share on other sites
15 minutes ago, DarkClaw said:

Nice. I need to try this again but switched to linux for my main pc in the meantime. Is the plan to be only windows forever?

You're in luck! There is a Linux version downloadable from the same link above! It hasn't had a ton of testing, but it does seem to work for everyone who has tried it.

We'll eventually have an OS X version as well, but that isn't ready yet.

Share this post


Link to post
Share on other sites
1 hour ago, Tricky Fast Mike said:

You're in luck! There is a Linux version downloadable from the same link above! It hasn't had a ton of testing, but it does seem to work for everyone who has tried it.

We'll eventually have an OS X version as well, but that isn't ready yet.

Awesome. Trying it now.

  • Like 1

Share this post


Link to post
Share on other sites

It synced, but is stuck on "Please add CHI to your wallet...". I definitely have xayad running and can see coins in there via xaya-cli getbalance.

Perhaps it is expecting to be unzipped to the home folder? I put it somewhere else.

Share this post


Link to post
Share on other sites
3 hours ago, DarkClaw said:

It synced, but is stuck on "Please add CHI to your wallet...". I definitely have xayad running and can see coins in there via xaya-cli getbalance.

Perhaps it is expecting to be unzipped to the home folder? I put it somewhere else.

Make sure that you have the game.dat wallet loaded. Try these:

xaya-cli loadwallet "game.dat"

You may not have run xayad with "-rpcwallet=game.dat". Also, try this:

xaya-cli -rpcwallet=game.dat getbalance

 

Share this post


Link to post
Share on other sites
59 minutes ago, DarkClaw said:

I don't have vault and game wallets, just a wallet.dat.

I don't know for certain ( @Tricky Fast Mike should probably chime in), but my guess is that TF is looking for the game.dat wallet. 

Try restarting xayad with the "-rpcwallet=game.dat" option. That should create a new game wallet for you. You can then send CHI to it from your other wallet. 

So, for example maybe try running like this:

xayad -rpcwallet=game.dat -server=1 -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332

I've got some more information in the docs & tutorials about running xayad here:

https://github.com/xaya/xaya_tutorials/wiki/Running-xayad-for-Games

It doesn't cover wallet creation though. It's just about running with options for games. 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
xxx@xxx:~$ xayad -rpcwallet=game.dat -server=1 -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332
Error parsing command line arguments: Invalid parameter -rpcwallet

Got this error.

Here are my rpc options:

RPC server options:

  -maxgameblockattaches=<n>
       Sets the maximum number of attach steps sent for a single
       game_sendupdates request (default: 1000)

  -nameencoding=<enc>
       Sets the default encoding used for names in the RPC interface (default:
       utf8)

  -rest
       Accept public REST requests (default: 0)

  -rpcallowip=<ip>
       Allow JSON-RPC connections from specified source. Valid for <ip> are a
       single IP (e.g. 1.2.3.4), a network/netmask (e.g.
       1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This
       option can be specified multiple times

  -rpcauth=<userpw>
       Username and hashed password for JSON-RPC connections. The field
       <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A
       canonical python script is included in share/rpcauth. The client
       then connects normally using the
       rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This
       option can be specified multiple times

  -rpcbind=<addr>[:port]
       Bind to given address to listen for JSON-RPC connections. This option is
       ignored unless -rpcallowip is also passed. Port is optional and
       overrides -rpcport. Use [host]:port notation for IPv6. This
       option can be specified multiple times (default: 127.0.0.1 and
       ::1 i.e., localhost, or if -rpcallowip has been specified,
       0.0.0.0 and :: i.e., all addresses)

  -rpccookiefile=<loc>
       Location of the auth cookie. Relative paths will be prefixed by a
       net-specific datadir location. (default: data dir)

  -rpcpassword=<pw>
       Password for JSON-RPC connections

  -rpcport=<port>
       Listen for JSON-RPC connections on <port> (default: 8396, testnet:
       18396, regtest: 18493)

  -rpcserialversion
       Sets the serialization of raw transaction or block hex returned in
       non-verbose mode, non-segwit(0) or segwit(1) (default: 1)

  -rpcthreads=<n>
       Set the number of threads to service RPC calls (default: 4)

  -rpcuser=<user>
       Username for JSON-RPC connections

  -server
       Accept command line and JSON-RPC commands

  -valueencoding=<enc>
       Sets the default encoding used for values in the RPC interface (default:
       ascii)

 

Edited by DarkClaw

Share this post


Link to post
Share on other sites

-rpcwallet is for specifying the wallet with xaya-cli.  To load it with xayad or in xaya.conf, the option is just -wallet=game.dat.

Share this post


Link to post
Share on other sites
5 hours ago, domob said:

-rpcwallet is for specifying the wallet with xaya-cli.  To load it with xayad or in xaya.conf, the option is just -wallet=game.dat.

Thanks, it is working now.

Share this post


Link to post
Share on other sites
Posted (edited)

I think it is freezing up: You can see xayad shows block 637,273 but treatfighter shows 637,260. Also, earlier when I bought the crystals, etc it didn't update until I restarted.

Actually, just now I restarted treatfighter and now my treat is ready right away. So I think the game gets stuck on the last block when it starts up.

Reminder: This is the linux version.

 

EDIT:

Yes, sometimes it is updating but for a lot of stuff (end expedition, etc) I need to restart it. I can see xayad doing stuff in the background in response to eg starting to cook a treat, but sometimes it just gets stuck in "prepare" mode.

tf_froze.png

Edited by DarkClaw

Share this post


Link to post
Share on other sites
On 3/2/2019 at 11:13 AM, DarkClaw said:

I think it is freezing up: You can see xayad shows block 637,273 but treatfighter shows 637,260. Also, earlier when I bought the crystals, etc it didn't update until I restarted.

Actually, just now I restarted treatfighter and now my treat is ready right away. So I think the game gets stuck on the last block when it starts up.

Reminder: This is the linux version.

 

EDIT:

Yes, sometimes it is updating but for a lot of stuff (end expedition, etc) I need to restart it. I can see xayad doing stuff in the background in response to eg starting to cook a treat, but sometimes it just gets stuck in "prepare" mode.

tf_froze.png

That sounds like you need to have zeroMQ enabled in your wallet. I think there's a compile option and maybe a config option, but it's been a while since I've looked at that since it's built in to the windows wallet automatically.

Share this post


Link to post
Share on other sites
20 minutes ago, Tricky Fast Mike said:

That sounds like you need to have zeroMQ enabled in your wallet. I think there's a compile option and maybe a config option, but it's been a while since I've looked at that since it's built in to the windows wallet automatically.

Interesting. This makes it seem like it should be enabled on linux automatically.  I also found this trackgame flag by running xayad -help, not sure what it does but it did not solve my problem:

xayad -wallet=game.dat -trackgame=tftr

I will try to recompile and make sure zmq is enabled, perhaps it failed due to a missing dependency. Otherwise it should be enabled by default:

Quote

By default, the ZeroMQ feature is automatically compiled in if the necessary prerequisites are found. To disable, use --disable-zmq during the configure step of building bitcoind:

https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md

Share this post


Link to post
Share on other sites
Options used to compile and link:
  with wallet   = yes
  with gui / qt = yes
    with bip70  = yes
    with qr     = yes
  with zmq      = yes
  with test     = yes
  with bench    = yes
  with upnp     = yes
  use asm       = yes
  sanitizers    =
  debug enabled = no
  gprof enabled = no
  werror        = no

  target os     = linux
  build os      =

  CC            = gcc
  CFLAGS        = -g -O2
  CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = g++ -std=c++11
  CXXFLAGS      =   -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wformat-security -Wredundant-decls  -Wno-unused-parameter -Wno-implicit-fallthrough   -g -O2
  LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie  
  ARFLAGS       = cr

ZMQ info:

xxx@xxx:~$ dpkg -l "*libzmq*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                         Version                     Architecture                Description
+++-============================================-===========================-===========================-=============================================================================================
un  libzmq-dev                                   <none>                      <none>                      (no description available)
ii  libzmq3-dev:amd64                            4.2.5-1ubuntu0.1            amd64                       lightweight messaging kernel (development files)
ii  libzmq5:amd64                                4.2.5-1ubuntu0.1            amd64                       lightweight messaging kernel (shared library)
un  libzmq5-dev                                  <none>                      <none>                      (no description available)

I still have the same issue, but it looks like zeromq is installed (although a slightly old version) and enabled. So there may be a xaya.conf entry I am missing?

Share this post


Link to post
Share on other sites

ZMQ is automatically compiled in if found, but the notifications need to be enabled at runtime.  You need to pass flags like "-zmqpubgameblocks=tcp://127.0.0.1:28555" for that; this is the flag needed for other games like Taurion and SME, I don't actually know exactly which notifications you need for Treat Fighter.  You can run "getzmqnotifications" to see which ones are enabled at runtime.

The trackedgames options can be modified at runtime using the "trackedgames" RPC method, so games can automatically enable/disable themselves as needed.  Again, I know for sure that Taurion and SME do this (as well as other libxayagame-based games), but I don't know about Treat Fighter.

Share this post


Link to post
Share on other sites
9 hours ago, domob said:

You can run "getzmqnotifications" to see which ones are enabled at runtime. 

Like this? By default it is empty:

xxx@xxx:~$ xaya-cli getzmqnotifications
[
]

Then I restarted xayad as:

xayad -wallet=game.dat -zmqpubgameblocks=tcp://127.0.0.1:28555 -trackgame=tftr

Now I can see:

xxx@xxx:~$ xaya-cli getzmqnotifications
[
  {
    "type": "pubgameblocks",
    "address": "tcp://127.0.0.1:28555"
  }
]
xxx@xxx:~$ xaya-cli trackedgames
[
  "tftr"
]

But still I have the same issue. Are you saying I need to know the correct port for treatfighter to use with the zmqpubgameblocks argument?

Share this post


Link to post
Share on other sites

Hey. These are the options you should run xayad with:

 

-rpcuser=user -rpcpassword=password -wallet=game.dat -server=1 -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332

 

  • Thanks 1

Share this post


Link to post
Share on other sites
9 minutes ago, snailbrain said:

Hey. These are the options you should run xayad with:

 


-rpcuser=user -rpcpassword=password -wallet=game.dat -server=1 -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332

 

This worked, thanks. Is it a problem to put all these zmq settings in the xaya.conf? Will they be different for each game?

Share this post


Link to post
Share on other sites
1 hour ago, DarkClaw said:

This worked, thanks. Is it a problem to put all these zmq settings in the xaya.conf? Will they be different for each game?

yeh you can put them in the conf file.
yeh if everyone uses those default ports, everything should work fine 

Share this post


Link to post
Share on other sites
14 hours ago, snailbrain said:

yeh if everyone uses those default ports, everything should work fine 

Even if the ports are different then games should still work fine - they should not use fixed ports but call "getzmqnotifications" to find out which ports to connect.  libxayagame-based games do that - I don't know about TreatFighter.  But I think we mentioned "getzmqnotifications" in some discussions with Trickyfast, so I think they also do it.

Share this post


Link to post
Share on other sites

Which is the default port? 2855 or 28332? And I think there should be a default xaya.conf that includes all these then, you don't want people getting strange half-working behaviour I just experienced.

In case it helps anyone, mine looks like:

server = 1
 
rpcallowip       = 127.0.0.1 
zmqpubhashtx     = tcp://127.0.0.1:28332 
zmqpubhashblock  = tcp://127.0.0.1:28332 
zmqpubrawblock   = tcp://127.0.0.1:28332 
zmqpubrawtx      = tcp://127.0.0.1:28332 
zmqpubgameblocks = tcp://127.0.0.1:28332

 

Share this post


Link to post
Share on other sites
4 hours ago, domob said:

they should not use fixed ports but call "getzmqnotifications" to find out which ports to connect.

That was empty by default for me though.

Share this post


Link to post
Share on other sites
17 hours ago, DarkClaw said:

That was empty by default for me though.

Yes sure, you need to set those "-zmq..." arguments.  What I meant is that it doesn't matter what ports you choose in them, as games should detect that automatically.

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Your use of this site is governed by our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.