Commit Graph

23 Commits

Author SHA1 Message Date
Michael Vines 8944f428fe Skip bpf-build while running clippy 2020-11-01 20:48:15 -08:00
Michael Vines b182848f60 Fail build.rs on error 2020-11-01 20:48:15 -08:00
Michael Vines 2b5e9d1286 Drop lifetimes 2020-11-01 20:48:15 -08:00
Michael Vines 9f4e6d8beb Update to solana v1.4.4 2020-11-01 20:48:15 -08:00
Greg Fitzgerald 6906200174
Cleanup themis (#742)
* Cleanup themis

* Speed up seeding fee-payers
* Add utility functions

* Remove BN variant of themis
2020-10-27 16:57:09 -06:00
Michael Vines 211f92e8c6 Groom Cargo.tomls 2020-10-25 07:52:33 +00:00
Michael Vines 80e29ef6b9 Port SPL to solana-program and `cargo build-bpf` 2020-10-24 19:21:38 -07:00
Greg Fitzgerald 94ae65136f Fix markdown 2020-10-23 17:04:43 -06:00
Greg Fitzgerald 9c3b71727a
Add docs to run the demo (#710) 2020-10-23 17:02:53 -06:00
Greg Fitzgerald 5cced4d6d3
Update Ristretto keys (#708) 2020-10-23 15:23:19 -06:00
Justin Starry 9a8fa8e845
Update SDK version to v1.3.17 (#649)
* Update SDK version to v1.3.17

* Fix clients
2020-10-19 18:07:45 +08:00
Greg Fitzgerald 2ec3b3fa4f
Upgrade solana-sdk in themis (#636)
* Upgrade solana-sdk in themis

* Fix build

* Bump Token CLI dependencies
* Remove Cargo.lock files

* Fix BN build

* Upgrade BN client too
2020-10-16 16:28:07 -06:00
Jack May 08d9999f99
add shared-memory program (#611)
* add shared-memory program

* add offset and reduce shared object size
2020-10-14 23:50:57 +00:00
Greg Fitzgerald b4bbe11568
Use ristretto_mul builtin to stay below BPF instruction limit (#575)
* Use ristretto_mul builtin to stay below BPF instruction limit

* Test against a full local validator

There's now three levels of integration test:

* local_e2e uses a native program and tests with a single Bank instance.
  This configuration is simplest to compile and offers the best error
  messages.

* validator_e2e uses a BPF program and tests with a single Validator
instance.
  This configuration allows us to test new validator functionality
  before it's released without having to spin up nodes manually.

* examples/tps.rs uses whatever cluster the Solana CLI points to,
  which may be devnet, testnet, mainnet-beta or a cluster of your
  own.
2020-10-09 16:55:45 -06:00
Jack May a7b121074d Remove skip-no-mangle entirely 2020-10-07 09:13:59 -07:00
Jack May daca3588a6 nit 2020-10-06 11:03:14 -07:00
Jack May c574597d71 solana sdk does not need skip-no-mangle 2020-10-06 11:03:14 -07:00
Greg Fitzgerald b020dd29c1
Add Ristretto version of THEMIS (#566)
* Add Ristretto version of THEMIS

BN BPF instruction counts:
  CalculateAggregate:    83,511
  SubmitProofDecryption: 33,755,027

Ristretto BPF instruction counts:
  CalculateAggregate:    13,049,558
  SubmitProofDecryption: 13,149,232

* Fix CI script
2020-10-05 18:49:38 -06:00
Greg Fitzgerald 3260644b38
Incremental aggregation in Themis (#563)
* Move interactions PublicKey to User constructor

* Permit incremental interaction submissions

* Split InitializePoliciesAccount into two instructions

* Clean up BPF instruction count output

* Update Themis program

* Get submit_interactions() working on testnet

* Fix build
2020-10-02 21:57:54 -06:00
Trent Nelson f4917395be themis-test: Bump proof-decryption ix count to 60M 2020-10-01 11:47:12 -06:00
Trent Nelson a9e5ec45ff CI: Run THEMIS tests 2020-10-01 11:47:12 -06:00
dependabot[bot] 7a90c53557
Bump getrandom from 0.1.14 to 0.1.15 (#559)
Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.1.14 to 0.1.15.
- [Release notes](https://github.com/rust-random/getrandom/releases)
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.1.14...v0.1.15)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-01 08:42:48 +00:00
Greg Fitzgerald acc0c62f9b
Add Themis using the BN curve (#549)
* Add THEMIS Policy Contract

* Add test with 128 ads

* Add instructions

* Allow clients to work concurrently

* pub(crate) utils to find unused code

* Remove serde_json dep

* Drop dependency on primitive_types

* Add a simpler inner_product

* Use elgamal for proof verification

* Migrate to Ristretto

Also, use Serde for instruction serialization

* Add remaining instructions to processor

* Remove rand 0.6 dependency

* Add instruction constructors

* Add e2e test

* Move client test out of BPF build

* Add BPF instruction count test

Shows us that serde makes too many recursive calls and causes
a very high instruction count (Vec<U256> becomes impractical).

* Use Borsh serialization and test calculate_aggregate()

Bump BPF instruction count limits after upgrading compiler

* Test SubmitProofDecryption BPF instruction count

* Remove CompressedRistretto

This drops SubmitProofDecryption instructions by ~2.5M.

Also, box up more RistrettoPoints, because they're huge (120 bytes) and
blow up the BPF stack.

* Add transaction size metrics and update BPF counts

* Switch back to BN

* Add benchmarking

* Use configured keypair path
* Make num_users configurable
* Make testnet benchmark an example, not a test

* Exclude themis client from CI build

Because of Travis failure on itertools dependency
2020-09-30 21:33:29 -06:00