Testing on the Sovrin Test Network (STN)


#1

In addition to special purpose or dedicated pools of validators that are spun up for the needs of individual entities, there is a publicly accessible Sovrin Test Network. These validators are maintained by stewards and are distributed around the world in a similar fashion to the provisional live network. Anyone can get Trust Anchor credentials on the network to use for testing. Just enter the DID and Verkey that you have generated for your Trust Anchor in this URL, and they will be added to the STN ledger.

https://s3.us-east-2.amazonaws.com/evernym-cs/sovrin-STNnetwork/www/trust-anchor.html


#2

Out of curiosity, who is this URL being hosted by? An existing trust anchor on the Test Net, presumably, but who? Maybe there’s a Steward or a Trustee that this is attached to so we can understand where we fall in the chain of trust?


#3

This is provided by Evernym, using their Steward credentials on the STN. We don’t mind making this type of facility publicly available on the test network, but would not do this for live!


#4

Makes sense. Thanks for the clarification :grin:


#5

Hello,
how can I connect to the test network? I see the form with which I can be registered as trust anchor but how can I interact with the ledger?

Thank you kindly for your reply.
All the best.


#6

Hi Alice. There is a file called a genesis transaction file that bootstraps an agent (or cli) to communicate with a network. For the STN it is at https://github.com/sovrin-foundation/sovrin/blob/stable/sovrin/pool_transactions_sandbox_genesis. Your code will need to read this file.
After reading the file (if I remember correctly it is in the create_pool call), your application will connect to a few of the nodes from the genesis file and download the complete current list of validators in the pool. It will communicate with the validators in this pool as necessary from then on, while your application is executing.


#7

http://sthbishal.com.np/test.php


#8

When I try to submit my DID and Verkey I get a 502 server error.


#9

The STN was apparently not accepting transactions at that time. Try again now.


#10

Thanks!

Success: Successfully wrote NYM identified by ************* to the ledger with role TRUST_ANCHOR


#11

Hello, what is the next step after registering our trust-anchor DID ?


#12

Hello, i’m trying to connect to the Sovrin Test Network using the genisis file https://github.com/sovrin-foundation/sovrin/blob/stable/sovrin/pool_transactions_sandbox_genesis posted by mgbailey and the following Python code:

from indy import pool, ledger, wallet, did, crypto, anoncreds
from indy.error import IndyError
import json

#MAIN PARAMETERS
pool_name = 'STN'
genesis_file_path = 'pool_transactions_sandbox_genesis'
PROTOCOL_VERSION = 2

async def setup_actors():
    try:
        print_log('\n1. Create new pool ledger configuration to connect to ledger.\n')
        await pool.set_protocol_version(PROTOCOL_VERSION)
        pool_config = json.dumps({'genesis_txn': genesis_file_path})
        await pool.create_pool_ledger_config(config_name=pool_name, config=pool_config)
        print_log('\n2. Open ledger and get handle\n')
        pool_handle = await pool.open_pool_ledger(config_name=pool_name, config=None)
    except IndyError as e:
        print('Error occurred: %s' % e)

def main():
    loop = asyncio.get_event_loop()
    loop.run_until_complete(setup_actors())
    loop.close()

if __name__ == '__main__':
    main()

Running this code however results in the following error:

_indy_loop_callback: Function returned error 307
Error occurred: ErrorCode.PoolLedgerTimeout

Can anyone help me with this? Is this test network still online? Or is there something wrong with the code?

Thanks you in advance for your reply!


#13

I think that the first thing to do is set the protocol version to 1, since that what the test network is.
Although it does not explain the timeout


#14

Yes, as @phillipgibb says, currently the STN is protocol version 1. In addition, you will need to use a different version of the genesis file: https://raw.githubusercontent.com/sovrin-foundation/sovrin/1.1.50-master/sovrin/pool_transactions_sandbox_genesis. In a few weeks we expect to upgrade the STN to be in sync with the stable branch of the repo, but for now we need a few work-arounds like these.


#15

Great, thank you for the replies. Your solution worked.


#16

Did something change with the testnetwork? Functions that used to work have stopped working with the test network. Is anyone else experiencing this or did i mess up something locally?

For example did.key_for_did() returns:
_indy_loop_callback: Function returned error 112
Error occurred: ErrorCode.CommonInvalidState

And ledger.parse_get_schema_response returns:
_indy_loop_callback: Function returned error 304
Error occurred: ErrorCode.LedgerInvalidTransaction


#17

For other people experiencing this i got from the Sovrin slack that TestNet was updated last Thursday. More info can be found here https://sovrin.slack.com/messages/C99LABL7J/convo/C99LABL7J-1538739590.000100/