Commit Graph

269 Commits

Author SHA1 Message Date
StephenButtolph 69065c50b5 Changed sk indexing, bumped version 2020-05-10 19:26:39 -04:00
StephenButtolph 56deaf7c9d Merge branch 'master' into get-address-api 2020-05-10 18:37:12 -04:00
StephenButtolph ed7ea5856e Cleaned address bytes 2020-05-10 18:37:09 -04:00
StephenButtolph d082579393 finished race cleanup in the avm tests 2020-05-10 17:12:03 -04:00
StephenButtolph 8dd5f21847 clean up locking in the AVM / platformVM tests 2020-05-10 17:03:12 -04:00
Stephen Buttolph b1533fd05d
Merge branch 'master' into vms-avm-shutdown-locking 2020-05-10 15:43:10 -04:00
StephenButtolph ac27d66c02 Fixed platformvm locking 2020-05-10 15:26:41 -04:00
Dan Laine 1a6986f1ba lower log levels more. Lowercase 1st letter of logs. 2020-05-09 19:20:45 -04:00
Stephen Buttolph 4bb2325c51
Merge branch 'master' into vms-avm-shutdown-locking 2020-05-08 13:37:25 -04:00
StephenButtolph 3130eb13bf Hid the Symbolic UTXO, from the json serialization, as it is an implementation detail 2020-05-07 17:36:27 -04:00
StephenButtolph 966e28d928 Added UTXOIDs to the getBalance call to enable atomic reads 2020-05-07 17:31:50 -04:00
Dan Laine 79e493e314 change log levels so they print less 2020-05-07 16:36:18 -04:00
Stephen Buttolph ebdee1a03d
Merge branch 'master' into get-tx 2020-05-07 14:31:53 -04:00
StephenButtolph 522c946115 Added GetTx method to the AVM endpoint 2020-05-07 14:30:14 -04:00
Stephen Buttolph b6d4cab519
Merge branch 'master' into gossip 2020-05-07 12:28:14 -04:00
bb-2 d8a8617e3b move the argument validity checks to the top of the methods 2020-05-07 11:21:26 -04:00
bb-2 41e3ccbded prevent runtime error in user.getKey by checking for nil shortID's in request args 2020-05-07 08:21:45 -04:00
Dan Laine 89f64028fc change method name to listAddresses, per Collin's request 2020-05-06 15:40:36 -04:00
bb-2 d35834c4e5 move avm cache puts after error checking and catch err on status unmarshalling 2020-05-06 08:49:44 -04:00
Stephen Buttolph 2e2e033562
Merge branch 'master' into gossip 2020-05-05 14:26:25 -04:00
Stephen Buttolph 6fa1f12210
Merge branch 'master' into api-error-checking 2020-05-05 14:10:57 -04:00
Stephen Buttolph 1834c6db7b
Merge branch 'master' into gossip 2020-05-05 14:01:43 -04:00
bb-2 c3b3b14872 Moving the cache put statements in SetStatus and SetIDs to be after the error checking 2020-05-05 08:10:22 -04:00
Dan Laine 5d115a0b62 %v --> %w 2020-05-04 17:16:00 -04:00
Dan Laine a721c188a5 use asset alias in response 2020-05-04 17:06:07 -04:00
Dan Laine d727166f4f change response format for getAllBalances 2020-05-04 14:44:35 -04:00
Dan Laine f34efce29f Merge branch 'list-assets' of github.com:ava-labs/gecko into list-assets 2020-05-04 13:59:33 -04:00
StephenButtolph dfbb17aaed Added gossip params to tests 2020-05-04 13:59:25 -04:00
Dan Laine cbb20b2faa return 'AVA' rather than its asset id 2020-05-04 13:59:10 -04:00
Dan Laine f104b5f115 add sanity checks to platform API method arguments 2020-05-03 18:16:25 -04:00
Stephen Buttolph daa96cfc8e
Merge branch 'master' into list-assets 2020-05-03 02:56:52 -04:00
Dan Laine 9d4ed06087 add getAddresses API method on avm 2020-05-02 17:53:28 -04:00
StephenButtolph 4c3fce408e Added user tests 2020-05-02 14:05:57 -04:00
StephenButtolph acb96c8184 check for nil account IDs in get user 2020-05-02 13:22:11 -04:00
Dan Laine 10aa724d30 don't try to sort balances since maps aren't sorted by key. simplify balance calculation since zero value of uint64 is 0. 2020-05-01 13:28:38 -04:00
Dan Laine a0bd9cdcfb Merge branch 'master' into list-assets 2020-05-01 12:55:16 -04:00
StephenButtolph 7c11e91a53 Removed debug logging 2020-05-01 00:21:17 -04:00
StephenButtolph e7f593f3f7 Removed broken parent caching 2020-04-30 16:22:19 -04:00
Stephen Buttolph 34af9fb7f7
Merge branch 'master' into platformvm-proposal-accept 2020-04-28 19:35:13 -04:00
Alex Willmer db56cccd4c
Merge branch 'master' into vms-avm-shutdown-locking 2020-04-28 22:16:25 +01:00
StephenButtolph 83c5bf39ae Added handling for if bootstrapping partially accepted a block pair 2020-04-28 15:53:36 -04:00
StephenButtolph 9580a3bf0f Fixed platform vm writeback of ProposalBlocks 2020-04-28 12:31:04 -04:00
Stephen Buttolph b04b84d4c9
Merge branch 'master' into minor-fixes 2020-04-27 13:06:12 -04:00
Anil Dasari 5440369118 static analyis fixes 2020-04-24 14:47:19 -07:00
Anil Dasari 88228ac1d6 error check 2020-04-24 13:42:36 -07:00
Anil Dasari 737087f0ca error check and go fmt 2020-04-24 13:31:12 -07:00
StephenButtolph bbe250c529 endtime -> endTime 2020-04-24 16:24:10 -04:00
Anil Dasari 628856992f added warn log incase of addroute failure 2020-04-24 13:23:07 -07:00
Anil Dasari b1ea742cf2 minor fixes 2020-04-24 13:01:42 -07:00
Alex Willmer 9f1aa5bbd2 vms: Ensure all spdagvm.VM instances in tests get shutdown 2020-04-21 01:41:12 +01:00
Alex Willmer 2e02f6863e vms: Fix deadlock when stopping timers during spdagvm.VM.Shutdown()
refs #66
2020-04-21 01:40:46 +01:00
Alex Willmer 996ea99fb1 vms: Ensure all spchainvm.VM instances in tests get shutdown 2020-04-21 01:34:22 +01:00
Alex Willmer a769c2017e vms: Fix deadlock when stopping timers during spchainvm.VM.Shutdown()
refs #66
2020-04-21 01:31:33 +01:00
Alex Willmer 243811f1e8 vms: Note 2 potential FIXMEs in avm.VM tests
This is not an exhaustive list.
2020-04-21 01:30:31 +01:00
Alex Willmer fb38cc8f25 vms: Ensure all platform.VM instances in tests get shutdown 2020-04-21 01:29:41 +01:00
Alex Willmer e3844c1d6c vms: Fix deadlock when stopping timers during platformvm.VM.Shutdown()
refs #66
2020-04-21 01:26:37 +01:00
Alex Willmer 826a1cc06d vms: Note potential FIXMEs in avm.VM tests 2020-04-19 14:40:30 +01:00
Alex Willmer 2eb8add469 vms: Ensure all avm.VM instances in tests get shutdown
I suspect these could be simplified/made more uniform, but I don't think
I fully understand the locking semantics.
2020-04-19 14:23:03 +01:00
Alex Willmer de3fd2915b vms: Fix deadlock when stopping timers during avm.VM.Shutdown()
refs #66
2020-04-19 13:54:56 +01:00
Alex Willmer f89bcdc40c vms: Use GenesisVM to initialise avm.Service tests 2020-04-19 13:49:53 +01:00
Alex Willmer 0f6cad33b1 vms: Add test for avm.VM.Format 2020-04-18 18:43:14 +01:00
Stephen Buttolph bf3741e60b
Merge branch 'master' into cascade-release 2020-04-17 12:24:29 -04:00
StephenButtolph c3230b9e46 Resolve nil pointer error on the rpcchainvm 2020-04-17 10:39:08 -04:00
StephenButtolph 8b86d15850 resolve proto conflicts 2020-04-17 09:47:19 -04:00
StephenButtolph d4996b5a3a Reduced log level of missing parent block 2020-04-17 04:20:24 -04:00
Stephen Buttolph be90dc71be
Merge branch 'master' into vms-avm-service-test 2020-04-17 02:51:01 -04:00
StephenButtolph 2f0b10530d Support websockets over the grpc 2020-04-17 02:03:17 -04:00
Stephen Buttolph 5797347e6a
Merge branch 'master' into vms-avm-service-test 2020-04-16 20:35:21 -04:00
Alex Willmer cadbd234e6 Merge branch 'vms-avm-service-test' of github.com:moreati/gecko into vms-avm-service-test 2020-04-16 20:28:05 +01:00
Alex Willmer 91f4c85bb2 vms: Remove resolved locking TODO
The question was answered in
https://github.com/ava-labs/gecko/pull/59#discussion_r406597250

> In general, the lock needs to be held whenever a VM function is called
> by the consensus engine. Depending on the locking specified in
> CreateHandlers locks may be held when an RPC is called as well.

> For the AVM specifically, the lock is assumed to be held both when an
> RPC is called and when any function is called, except for the ws API.
2020-04-16 20:26:18 +01:00
Stephen Buttolph 42baab2881
Move Geth to a plugin connected at runtime
* removed coreth + geth dependency for the C-chain, still have nat + crypto dependencies

* Added first past of nat traversal

* Removed go-eth dependency for secp256k1

* renamed db files to not repeat the package title

* Added rpcdb, untested

* Added rpcdb tests

* removed defer from loop

* cleaned up tests

* Started working on the rpc chain VM

* First pass of vm plugin support

* Added http over grpc

* added beta support for http handlers

* updated vms for the rpcvms

* Added error returns for factories

* Added EVM back to the genesis

* Added the EVM factory

* Added EVM aliasing, fixed nil pointer bugs during shutdown

* Added plugin folder

* Removed plugins folder, add default params for the plugin dir

* Added http RPC test

* Added cascade evm genesis

* Removed debug line

* removed more debug lines

* Cleaned up import statement

* Changed default plugin dir to ./plugins

* build evm plugin auto in the build script
2020-04-16 11:39:20 -04:00
Stephen Buttolph 67c17835fb
Merge branch 'master' into vms-avm-service-test 2020-04-15 16:15:19 -04:00
Alex Willmer 689177e113 vms: Reword timeout warning, include a link to discussion 2020-04-15 20:27:12 +01:00
Stephen Buttolph 77f7dea6fb
Merge branch 'master' into vms-avm-codecSetup 2020-04-13 14:28:57 -04:00
Alex Willmer cd23540e4e vms: Add test of avm.Tx.SemanticVerify with nil transaction 2020-04-13 11:19:21 +01:00
Alex Willmer 163eec2dd3 vms: Standardize on setupCodec() in avm tests 2020-04-13 11:03:31 +01:00
Alex Willmer b8e1094309 vms: Add tests for avm.Service.GetUTXOs 2020-04-13 09:40:12 +01:00
Alex Willmer 795d3ffd3c vms: Standardise on GenesisVM() in test suite, where possible
Note that GenesisVM now leaves the Context locked. It is the
resposibility of the caller to unlock it.
2020-04-13 09:28:54 +01:00
Alex Willmer 9c44546dee Merge branch 'master' into vms-avm-service-test 2020-04-12 22:12:33 +01:00
Dan Laine 53b29745b6 rename method to GetAllBalances; change return type to map 2020-04-10 16:05:11 -04:00
Dan Laine 9420e02268 getBlock returns timestamp with quotes 2020-04-10 15:39:46 -04:00
Dan Laine bfe72ecf1c add ListAssets API method 2020-04-10 14:48:38 -04:00
Alex Willmer 208195bf34 vms: add test for Service.GetTxStatus() 2020-04-09 00:58:30 +01:00
Alex Willmer 70e571b77c vms: add test for Service.IssueTx() 2020-04-09 00:57:43 +01:00
Alex Willmer 1161455b37 vms: Factor NewTx() out of TestIssueTx() 2020-04-09 00:55:21 +01:00
Alex Willmer e71a91d3bd vms: Facter service setup out of AVM service tests 2020-04-09 00:44:00 +01:00
Alex Willmer 86e66cf075 vms: Add TestSerializeOfNoSerializeField 2020-04-09 00:32:32 +01:00
Alex Willmer bdb5153f2d vms: Add test for uint16 serialization 2020-04-09 00:31:50 +01:00
StephenButtolph 4a1fadbdc4 Added number of concurrent repolls to the benchmark 2020-04-07 22:53:41 -04:00
StephenButtolph 2d980c00b9 Changed order of ControlSigs and PayerSig for consistency with other txs 2020-04-06 17:51:23 -04:00
Stephen Buttolph 48caf79644
Merge pull request #49 from danlaine/update-swap-api
Update import/export API, properly weight bootstrapping validators by stake
2020-04-06 14:22:51 -04:00
StephenButtolph daa7abdba5 Update addresses TODOs 2020-04-04 17:07:05 -04:00
StephenButtolph ff03ea957c Removed unused code 2020-04-04 16:40:01 -04:00
StephenButtolph 438326b11a Every node should validate the DefaultSubnet 2020-04-03 20:11:08 -04:00
StephenButtolph e69449e20b Fixed variable cap genesis creation 2020-04-03 16:38:39 -04:00
StephenButtolph dce704e8f0 Fixed non-determinism in genesis creation 2020-04-03 15:50:29 -04:00
Stephen Buttolph efebd5816b
Merge branch 'master' into cascade 2020-04-03 01:09:19 -04:00
StephenButtolph 0f94bdf24b Removed broken + invalid test 2020-04-03 01:00:19 -04:00
Dan Laine bd2f36a066 rename accountID arg to address 2020-04-02 15:50:29 -04:00
Dan Laine dc9550c453 rename import/export API methods, add comments 2020-04-02 10:43:06 -04:00
Dan Laine 1c3f0070f3 simplify avm export / platform import api 2020-04-02 09:39:40 -04:00
StephenButtolph 11ebe7c6b1 properly weight bootstrapping validators by stake 2020-04-01 21:20:31 -04:00
StephenButtolph a26f76de91 Allow fees to be paid with the imported balance in the ImportTx 2020-04-01 12:53:33 -04:00
Stephen Buttolph c43d77da30
Merge pull request #22 from ava-labs/x-mint
Fixed mint signing
2020-03-31 15:34:23 -04:00
StephenButtolph fc093b2e9f Fixed mint signing 2020-03-31 15:14:31 -04:00
Dan Laine 23d2427ce7 forbid new blockchains from being validated by default subnet 2020-03-31 14:12:23 -04:00
StephenButtolph d63375e83a updated json for new fxs 2020-03-31 01:09:49 -04:00
StephenButtolph 9d4be014e9 merged 2020-03-30 22:10:31 -04:00
StephenButtolph 4d34dc042d merged 2020-03-30 22:06:29 -04:00
StephenButtolph 3056998643 enforced unneeded signature requirement 2020-03-30 21:28:19 -04:00
StephenButtolph 009d78e301 merged 2020-03-30 21:22:22 -04:00
StephenButtolph 7810cd56b9 merged 2020-03-30 21:16:32 -04:00
Stephen Buttolph c1357a9eba
Merge branch 'master' into custom-genesis 2020-03-30 21:06:10 -04:00
StephenButtolph 2fa86ef49c fixed locking bug in tests 2020-03-30 20:22:07 -04:00
Dan Laine d9480e5a24 Merge branch 'custom-genesis' of github.com:ava-labs/gecko-internal into custom-genesis 2020-03-30 19:16:31 -04:00
StephenButtolph b41d6ef95a cleaned up imports 2020-03-30 18:15:16 -04:00
StephenButtolph d72bdbcada Added property test 2020-03-30 18:14:03 -04:00
StephenButtolph 00332620a6 Implemented Properties 2020-03-30 17:46:18 -04:00
StephenButtolph a2c0ad56f7 Implemented NFTs 2020-03-30 16:23:06 -04:00
Dan Laine 468c47739d made changes requested in PR review 2020-03-30 09:14:12 -04:00
StephenButtolph ffcdfafaf6 Implemented fx operations 2020-03-30 01:08:45 -04:00
StephenButtolph 93ff9d906b merged 2020-03-29 14:46:18 -04:00
StephenButtolph a0b999950d removed json dump in unit test 2020-03-27 16:56:43 -04:00
StephenButtolph 4b36f9d041 Added proper json marshalling of UniqueTxs in the AVM 2020-03-27 16:54:47 -04:00
Stephen Buttolph 10779d168d
Merge branch 'master' into custom-genesis 2020-03-27 12:11:19 -04:00
StephenButtolph 6d9683dc99 Fixed minor atomic commit bugs 2020-03-27 03:39:35 -04:00
StephenButtolph 48f9a52ed8 Merge branch 'master' into atomic 2020-03-27 02:42:59 -04:00
StephenButtolph 65393729d2 Finished first pass of APIs 2020-03-27 02:42:16 -04:00
StephenButtolph 9da52e70c0 Add address tracking to atomic utxos 2020-03-26 23:11:23 -04:00
StephenButtolph a7f2a887ca Updated Export Tx to support change addresses 2020-03-26 22:01:22 -04:00
StephenButtolph 87ea21c63f linked atomic swaps to main 2020-03-26 18:04:41 -04:00
Dan Laine c1abff8c3d fix bug where unmarshalling into improper type causes panic. Add test for this 2020-03-26 15:14:45 -04:00
StephenButtolph 3efccbf354 finished first pass of atomic swaps 2020-03-26 11:27:47 -04:00
StephenButtolph 93ed25f878 wip 2020-03-25 23:48:21 -04:00
StephenButtolph a6a92510af Added UTXO check in platform VM 2020-03-25 12:35:13 -04:00
StephenButtolph 552e63f2eb Added export Tx to the AVM 2020-03-24 12:39:25 -04:00
Stephen Buttolph 01fe74ec6b wip 2020-03-23 16:40:37 -04:00
StephenButtolph 805b0d5530 wip importTx 2020-03-23 11:41:02 -04:00
StephenButtolph f151ab841a Added flow checker 2020-03-20 20:57:12 -04:00
StephenButtolph aee9d03921 Cleanup + introduction of side effects 2020-03-20 20:56:43 -04:00
StephenButtolph 638cce84ce AVM code cleanup 2020-03-19 18:36:10 -04:00
Dan Laine 633e72394f fix bug where no chains other than platform created if staking disabled 2020-03-19 17:59:12 -04:00
Dan Laine fb5f6a9d5d change validatedBy to take in an ID rather than alias 2020-03-19 15:00:12 -04:00
Dan Laine 7c410e01b8 automatically use secp256k1 fx when creating AVM instances 2020-03-19 13:14:40 -04:00
StephenButtolph 16182937a4 merged 2020-03-18 17:22:07 -04:00
Dan Laine bc4aae7b6d getBlockchains includes human-readable name in response 2020-03-18 15:26:41 -04:00
Dan Laine 121edab33c add missing json tags 2020-03-18 15:18:00 -04:00
Dan Laine 6c2b969b29 Merge remote-tracking branch 'origin' into custom-genesis 2020-03-18 14:03:28 -04:00
Dan Laine 5c231c8acf add utility methods to platform API. Forbid creation of blockchains validated by Default Subnet 2020-03-18 13:55:36 -04:00
Dan Laine 46441dca6b remove test 2020-03-18 12:23:14 -04:00