diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_cantsteal.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_cantsteal.py index 5d634ee7f..e319b769d 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_cantsteal.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_cantsteal.py @@ -49,8 +49,8 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # only wallets[3] should get it - testlib.blockstack_name_register( "foo.test", wallets[4].privkey, wallets[3].addr ) - testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) + testlib.blockstack_name_register( "foo.test", wallets[4].privkey, wallets[3].addr, safety_checks=False ) + testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) testlib.next_block( **kw ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_collisions.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_collisions.py index 36f775608..03607c763 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_collisions.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_collisions.py @@ -42,55 +42,55 @@ debug = True def scenario( wallets, **kw ): - resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey ) + resp = testlib.blockstack_namespace_preorder( "test", wallets[1].addr, wallets[0].privkey, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should get rejected - resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey ) + resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) # should get rejected (NOTE: the underlying mock utxo provider doesn't handle double-spends!) - resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey ) + resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should get accepted - resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey ) + resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) # should get rejected (but only because the namespace isn't revealed until the block goes through) - resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey ) + resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) - resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey ) + resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) - resp = testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr ) + resp = testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should get rejected - resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) + resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) # should get rejected (NOTE: the underlying mock utxo provider doesn't handle double-spends!) - resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) + resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -99,36 +99,36 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # should succeed - resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) + resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # (this should succeed) - resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) # (this should also succeed) - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # (this should succeed) - resp = testlib.blockstack_name_renew( "foo.test", wallets[4].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[4].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) # (this should also succeed) - resp = testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[4].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[4].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) # (this should succeed) - resp = testlib.blockstack_name_transfer( "foo.test", wallets[3].addr, True, wallets[4].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[3].addr, True, wallets[4].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -136,7 +136,7 @@ def scenario( wallets, **kw ): # lots of updates for i in xrange(0, 9): - resp = testlib.blockstack_name_update( "foo.test", ("%s%s" % (i,i)) * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", ("%s%s" % (i,i)) * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -146,11 +146,11 @@ def scenario( wallets, **kw ): for i in xrange(0, 5): #resp = testlib.blockstack_name_transfer( "foo.test", wallets[3].addr, True, wallets[4].privkey ) - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) - resp = testlib.blockstack_name_transfer( "foo.test", wallets[3].addr, True, wallets[4].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[3].addr, True, wallets[4].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -160,19 +160,19 @@ def scenario( wallets, **kw ): # update/transfer/update/transfer for i in xrange(0, 5): - resp = testlib.blockstack_name_transfer("foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer("foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) - resp = testlib.blockstack_name_update("foo.test", "aa" * 20, wallets[4].privkey ) + resp = testlib.blockstack_name_update("foo.test", "aa" * 20, wallets[4].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) - resp = testlib.blockstack_name_transfer("foo.test", wallets[3].addr, True, wallets[4].privkey ) + resp = testlib.blockstack_name_transfer("foo.test", wallets[3].addr, True, wallets[4].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) - resp = testlib.blockstack_name_update("foo.test", "bb" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update("foo.test", "bb" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nodups.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nodups.py index dccd577d6..e0b9dea9a 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nodups.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nodups.py @@ -46,17 +46,17 @@ def scenario( wallets, **kw ): testlib.blockstack_namespace_ready( "test", wallets[1].privkey ) testlib.next_block( **kw ) - testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr ) - testlib.blockstack_name_preorder( "foo.test", wallets[4].privkey, wallets[5].addr ) - testlib.blockstack_name_preorder( "foo.test", wallets[0].privkey, wallets[1].addr ) - testlib.blockstack_name_preorder( "foo.test", wallets[5].privkey, wallets[2].addr ) + testlib.blockstack_name_preorder( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) + testlib.blockstack_name_preorder( "foo.test", wallets[4].privkey, wallets[5].addr, safety_checks=False ) + testlib.blockstack_name_preorder( "foo.test", wallets[0].privkey, wallets[1].addr, safety_checks=False ) + testlib.blockstack_name_preorder( "foo.test", wallets[5].privkey, wallets[2].addr, safety_checks=False ) testlib.next_block( **kw ) # all of these should fail, since they're in the same block - testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) - testlib.blockstack_name_register( "foo.test", wallets[4].privkey, wallets[5].addr ) - testlib.blockstack_name_register( "foo.test", wallets[0].privkey, wallets[1].addr ) - testlib.blockstack_name_register( "foo.test", wallets[5].privkey, wallets[2].addr ) + testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) + testlib.blockstack_name_register( "foo.test", wallets[4].privkey, wallets[5].addr, safety_checks=False ) + testlib.blockstack_name_register( "foo.test", wallets[0].privkey, wallets[1].addr, safety_checks=False ) + testlib.blockstack_name_register( "foo.test", wallets[5].privkey, wallets[2].addr, safety_checks=False ) testlib.next_block( **kw ) def check( state_engine ): diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_quota.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_quota.py index 9bc2744b0..ad9e81901 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_quota.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_quota.py @@ -68,7 +68,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_register( "bar.test", wallets[2].privkey, wallets[3].addr ) + resp = testlib.blockstack_name_register( "bar.test", wallets[2].privkey, wallets[3].addr, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_cantforce.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_cantforce.py index 3d69da4a7..707111dfc 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_cantforce.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_cantforce.py @@ -52,7 +52,7 @@ def scenario( wallets, **kw ): testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) testlib.next_block( **kw ) - resp = testlib.blockstack_name_revoke( "foo.test", wallets[4].privkey ) + resp = testlib.blockstack_name_revoke( "foo.test", wallets[4].privkey, safety_checks=False ) testlib.next_block( **kw ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_isdead.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_isdead.py index e0549e144..ab6ec90b4 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_isdead.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_isdead.py @@ -56,21 +56,21 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # can't do anything with the name for another 10 blocks - resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -81,21 +81,21 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # verify that operations continue to fail - resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister.py index 0fb122eb6..fe104b3e3 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister.py @@ -63,14 +63,14 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -81,21 +81,21 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # verify that operations continue to fail - resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister_newowner.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister_newowner.py index cfdc3f008..20a373526 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister_newowner.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister_newowner.py @@ -56,21 +56,21 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # can't do anything with the name for another 10 blocks - resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) @@ -81,21 +81,21 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # verify that operations continue to fail - resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey ) + resp = testlib.blockstack_name_update( "foo.test", "11" * 20, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey ) + resp = testlib.blockstack_name_transfer( "foo.test", wallets[4].addr, True, wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) testlib.next_block( **kw ) # should fail - resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey ) + resp = testlib.blockstack_name_renew( "foo.test", wallets[3].privkey, safety_checks=False ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_delays.py index 96cc190d8..9607f0904 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_delays.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_delays.py @@ -49,7 +49,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey, consensus_hash=consensus_hash ) + resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) @@ -58,7 +58,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey, consensus_hash=consensus_hash ) + resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) @@ -76,7 +76,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, consensus_hash=consensus_hash ) + resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays.py index 84bc61b3a..6748aed7f 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays.py @@ -67,7 +67,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_name_register( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr, consensus_hash=consensus_hash ) + resp = testlib.blockstack_name_register( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts.py index 39c8d51b2..0c0e32f1e 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts.py @@ -76,7 +76,7 @@ def scenario( wallets, **kw ): wallet_keys = blockstack_client.make_wallet_keys( owner_privkey=wallets[3].privkey, data_privkey=wallets[4].privkey ) # migrate profiles - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_blockstackurl.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_blockstackurl.py index 92cd72542..531ea5439 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_blockstackurl.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_blockstackurl.py @@ -133,7 +133,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # migrate - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) @@ -143,7 +143,7 @@ def scenario( wallets, **kw ): zonefile_hash = res['zonefile_hash'] # migrate - res = blockstack_client.migrate_profile( "bar.test", proxy=test_proxy, wallet_keys=wallet_keys_2 ) + res = testlib.migrate_profile( "bar.test", proxy=test_proxy, wallet_keys=wallet_keys_2 ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable.py index ae7cd4a50..fd76a19bd 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable.py @@ -72,7 +72,7 @@ def scenario( wallets, **kw ): wallet_keys = blockstack_client.make_wallet_keys( owner_privkey=wallets[3].privkey, data_privkey=wallets[4].privkey ) # migrate profile - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable.py index f1e8a1f66..985b2c30a 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable.py @@ -72,7 +72,7 @@ def scenario( wallets, **kw ): wallet_keys = blockstack_client.make_wallet_keys( owner_privkey=wallets[3].privkey, data_privkey=wallets[4].privkey ) # migrate profile - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file.py index 24f5906a2..63db106f9 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file.py @@ -104,7 +104,7 @@ def scenario( wallets, **kw ): # migrate profiles for name in ['foo.test', 'bar.test', 'baz.test']: - res = blockstack_client.migrate_profile( name, proxy=test_proxy, wallet_keys=wallet_keys[name] ) + res = testlib.migrate_profile( name, proxy=test_proxy, wallet_keys=wallet_keys[name] ) if 'error' in res: res['test'] = 'Failed to initialize %s profile' % name print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file_benchmark.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file_benchmark.py index 7e9c8a24b..082db9078 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file_benchmark.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_file_benchmark.py @@ -151,7 +151,7 @@ def scenario( wallets, **kw ): # migrate profiles for name in ['foo.test', 'bar.test']: - res = blockstack_client.migrate_profile( name, proxy=test_proxy, wallet_keys=wallet_keys[name] ) + res = testlib.migrate_profile( name, proxy=test_proxy, wallet_keys=wallet_keys[name] ) if 'error' in res: res['test'] = 'Failed to initialize %s profile' % name print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_gpg.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_gpg.py index d2da60aaa..c6f0dfa8e 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_gpg.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_gpg.py @@ -82,14 +82,14 @@ def scenario( wallets, **kw ): wallet_keys_2 = blockstack_client.make_wallet_keys( owner_privkey=wallets[6].privkey, data_privkey=wallets[7].privkey ) # migrate profiles - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) error = True return - res = blockstack_client.migrate_profile( "bar.test", proxy=test_proxy, wallet_keys=wallet_keys_2 ) + res = testlib.migrate_profile( "bar.test", proxy=test_proxy, wallet_keys=wallet_keys_2 ) if 'error' in res: res['test'] = 'Failed to initialize bar.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listimmutablehistory.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listimmutablehistory.py index 04f7c0c7b..d96bad578 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listimmutablehistory.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listimmutablehistory.py @@ -133,7 +133,7 @@ def scenario( wallets, **kw ): wallet_keys = blockstack_client.make_wallet_keys( owner_privkey=wallets[3].privkey, data_privkey=wallets[4].privkey ) # migrate profile - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile.py index c4005d630..b91335a24 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile.py @@ -131,7 +131,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # migrate profiles - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) @@ -140,7 +140,7 @@ def scenario( wallets, **kw ): zonefile_hash = res['zonefile_hash'] - res = blockstack_client.migrate_profile( "bar.test", proxy=test_proxy, wallet_keys=wallet_keys_2 ) + res = testlib.migrate_profile( "bar.test", proxy=test_proxy, wallet_keys=wallet_keys_2 ) if 'error' in res: res['test'] = 'Failed to initialize bar.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_notstale.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_notstale.py index 50263e0dc..56e594463 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_notstale.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_notstale.py @@ -62,7 +62,8 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) # update with stale consensus hash (should fail) - testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[3].privkey, consensus_hash=consensus_hash, test_api_proxy=False ) + print "\n\nsend update with consensus hash %s\n\n" % consensus_hash + testlib.blockstack_name_update( "foo.test", "22" * 20, wallets[3].privkey, consensus_hash=consensus_hash ) testlib.next_block( **kw ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable.py index cdd11b197..0374e6f05 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable.py @@ -71,7 +71,7 @@ def scenario( wallets, **kw ): wallet_keys = blockstack_client.make_wallet_keys( owner_privkey=wallets[3].privkey, data_privkey=wallets[4].privkey ) # migrate profile - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable.py index 5c51ec842..d3ca963f5 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable.py @@ -72,7 +72,7 @@ def scenario( wallets, **kw ): wallet_keys = blockstack_client.make_wallet_keys( owner_privkey=wallets[3].privkey, data_privkey=wallets[4].privkey ) # migrate profile - res = blockstack_client.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) + res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys ) if 'error' in res: res['test'] = 'Failed to initialize foo.test profile' print json.dumps(res, indent=4, sort_keys=True) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_delays.py index dc78036a1..826de7748 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_delays.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_delays.py @@ -49,7 +49,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey, consensus_hash=consensus_hash ) + resp = testlib.blockstack_namespace_reveal( "test", wallets[1].addr, 52595, 250, 4, [6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0], 10, 10, wallets[0].privkey ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) @@ -58,7 +58,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey, consensus_hash=consensus_hash ) + resp = testlib.blockstack_namespace_ready( "test", wallets[1].privkey ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) @@ -76,7 +76,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, consensus_hash=consensus_hash ) + resp = testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr ) if debug or 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_delays.py index 64d1ee7a5..8a5a5096a 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_delays.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_delays.py @@ -67,7 +67,7 @@ def scenario( wallets, **kw ): testlib.next_block( **kw ) testlib.next_block( **kw ) - resp = testlib.blockstack_name_register( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr, consensus_hash=consensus_hash ) + resp = testlib.blockstack_name_register( "foo.test", wallets[i].privkey, wallets[(i+1)%11].addr ) if 'error' in resp: print json.dumps( resp, indent=4 ) diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_user_storage.py b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_user_storage.py index 5a4c414f6..b945017c1 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_user_storage.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_user_storage.py @@ -173,8 +173,8 @@ def check( state_engine ): print "http://localhost:%s" % blockstack.RPC_SERVER_PORT try: profile_resp_txt = srv.get_profile("foo.test") - profile_resp = json.loads(profile_json_txt) - assert 'error' not in profile_json + profile_resp = json.loads(profile_resp_txt) + assert 'error' not in profile_resp assert 'profile' in profile_resp profile = profile_resp['profile'] assert 'data' in profile diff --git a/integration_tests/blockstack_integration_tests/scenarios/rpc_register.py b/integration_tests/blockstack_integration_tests/scenarios/rpc_register.py index d46129717..10a8fedd5 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/rpc_register.py +++ b/integration_tests/blockstack_integration_tests/scenarios/rpc_register.py @@ -115,20 +115,33 @@ def check( state_engine ): print "Still in queue:\n%s" % json.dumps(queue_info, indent=4, sort_keys=True) return False - # have an update haash + # have an update hash if 'value_hash' not in name_rec or name_rec.get('value_hash', None) is None: print "No value hash" return False # have a zonefile zonefile = testlib.blockstack_get_zonefile( name_rec['value_hash'] ) - if 'error' in zonefile: - print "zonefile lookup error: %s" % zonefile['error'] + if zonefile is None or 'error' in zonefile: + if zonefile is not None: + print "zonefile lookup error: %s" % zonefile['error'] + else: + print "no zonefile returned" return False # hashes to this zonefile if blockstack_client.hash_zonefile( zonefile ) != name_rec['value_hash']: print "wrong zonefile: %s != %s" % (blockstack_client.hash_zonefile(zonefile), name_rec['value_hash']) return False - + + # verify that the profile is there + profile = testlib.blockstack_get_profile( "foo.test" ) + if profile is None or 'error' in profile: + if profile is None: + print "no profile returned" + else: + print "profile lookup error: %s" % profile['error'] + + return False + return True diff --git a/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_parallel.py b/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_parallel.py index d15af08d1..d555546c9 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_parallel.py +++ b/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_parallel.py @@ -26,6 +26,7 @@ import pybitcoin import time import json import sys +import blockstack_client wallets = [ testlib.Wallet( "5JesPiN68qt44Hc2nT8qmyZ1JDwHebfoh9KQ52Lazb1m1LaKNj9", 100000000000 ), @@ -109,6 +110,30 @@ def check( state_engine ): print "sender is wrong" return False + # have a zonefile + zonefile = testlib.blockstack_get_zonefile( name_rec['value_hash'] ) + if zonefile is None or 'error' in zonefile: + if zonefile is not None: + print "zonefile lookup error: %s" % zonefile['error'] + else: + print "no zonefile returned" + return False + + # hashes to this zonefile + if blockstack_client.hash_zonefile( zonefile ) != name_rec['value_hash']: + print "wrong zonefile: %s != %s" % (blockstack_client.hash_zonefile(zonefile), name_rec['value_hash']) + return False + + # verify that the profile is there + profile = testlib.blockstack_get_profile( "foo_%s.test" % i ) + if profile is None or 'error' in profile: + if profile is None: + print "no profile returned" + else: + print "profile lookup error: %s" % profile['error'] + + return False + # all queues are drained queue_info = testlib.blockstack_client_queue_state() if len(queue_info) > 0: diff --git a/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_sequential.py b/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_sequential.py index fa2eecd15..6cd9167d4 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_sequential.py +++ b/integration_tests/blockstack_integration_tests/scenarios/rpc_register_multi_sequential.py @@ -26,6 +26,7 @@ import pybitcoin import time import json import sys +import blockstack_client wallets = [ testlib.Wallet( "5JesPiN68qt44Hc2nT8qmyZ1JDwHebfoh9KQ52Lazb1m1LaKNj9", 100000000000 ), @@ -110,6 +111,30 @@ def check( state_engine ): print "sender is wrong" return False + # have a zonefile + zonefile = testlib.blockstack_get_zonefile( name_rec['value_hash'] ) + if zonefile is None or 'error' in zonefile: + if zonefile is not None: + print "zonefile lookup error: %s" % zonefile['error'] + else: + print "no zonefile returned" + return False + + # hashes to this zonefile + if blockstack_client.hash_zonefile( zonefile ) != name_rec['value_hash']: + print "wrong zonefile: %s != %s" % (blockstack_client.hash_zonefile(zonefile), name_rec['value_hash']) + return False + + # verify that the profile is there + profile = testlib.blockstack_get_profile( "foo_%s.test" % i ) + if profile is None or 'error' in profile: + if profile is None: + print "no profile returned" + else: + print "profile lookup error: %s" % profile['error'] + + return False + # all queues are drained queue_info = testlib.blockstack_client_queue_state() if len(queue_info) > 0: