Commit Graph

41 Commits

Author SHA1 Message Date
the-real-adammork
1344144447 Remove Xcode 11 from CircleCI, App-Store requires 12 or up since April 2021 2021-10-26 22:24:26 -07:00
Adam Mork
41a8204020
Update base64 for the Trust Root Cert (#78)
* update the base64 for the trustRoot - isrgrootx1

* update code comment

* use testNet
2021-10-15 16:19:26 -07:00
Adam Mork
d8c50f1600
update mr enclave values (#43) 2021-10-15 16:19:18 -07:00
sugargoat
1c9e75b73e
Update README (#55) 2021-10-15 15:04:16 -07:00
Adam Mork
c71fe53f1d
Fix GRPC error with TLS Certs. Remove hard-coded .http in one unit test. (#74)
Additional fixes required for `v1.2.0-pre0` release

- Fetch submodule => true in podspec
- Change Integration Test network environment
- Fix deprecated GRPC function 
- Remove hard-coded `.http`
2021-09-17 03:29:39 -07:00
Adam Mork
9bc59e1b98
v1.2.0-pre0 - Network Robustness, Fog 1.2.0, Apple Silicon/M1 & Mac Catalyst, LibMobileCoin v1.2.0-pre1 (#73)
# Title

`v1.2.0-pre0` - Network Robustness,  Fog 1.2.0, Apple Silicon/M1 & Mac Catalyst

# Description 

Added a way for implementing apps to pass in there own `HttpRequester` which can be useful for network robustness. Subspec `LibMobileCoin` now supports Apple Silicon/M1 and Mac Catalyst. Code changes to support Fog v1.2.0.

#### `pre1` Changes 

- Uses the `v1.2.0-pre1` version of `LibMobileCoin` which supports a higher version of `GRPC`.
- Added bridging headers
- Updated Gemfile/Makefile to use the latest `cocoapods` version `1.11.2`


#### Future Work

Fix the `docs` steps in the circleci build process. Will require `jazzy` related fixes and testing on Xcode 11.

# Changes

## Network Robustness

Adds a separate `HTTP` networking architecture. An object conforming to `protocol HttpRequester` can be provided to the `NetworkConfig` object when the `MobileCoinClient` is created. Then the `TransportProtocolOption` can be changed from `grpc` to `http`.

> NOTE: This branch will not run because it depends on changes in other submodules that have not yet been merged.

### `HttpRequester`

Implementing apps/frameworks should provide an object conforming to this protocol. Our `RestApiRequester` wraps around an `HttpRequester` to communicate with with our services using `protobuf`s.

```
Sources/Network/HttpConnection/HttpRequester.swift
```

### Attested & Auth Connection Wrappers

`HTTP` versions of the Auth & Attested wrapper classes. These protocol and their default implementations handle the logic paths needed for authentication/attestation and re-authentication/attestation:

> Can become generic

```
Sources/Network/HttpConnection/ArbitraryHttpConnection.swift
Sources/Network/HttpConnection/AttestedHttpConnection.swift
```

### Networking Protocols 

Separate code-paths for `HTTP` versions of the networking protocols:

```
Sources/Network/HttpConnection/HttpCallable/AttestedHttpCallable.swift
Sources/Network/HttpConnection/HttpCallable/AuthHttpCallable.swift
Sources/Network/HttpConnection/HttpCallable/AuthHttpCallableClientWrapper.swift
Sources/Network/HttpConnection/HttpCallable/HttpCallable.swift
```

`HTTP` "interfaces" that closely mimic functionality from `GRPC`. Allows us to re-use more of our existing patterns.

```
Sources/Network/HttpConnection/HTTPInterface/HTTPCallOptions.swift
Sources/Network/HttpConnection/HTTPInterface/HTTPClient.swift
Sources/Network/HttpConnection/HTTPInterface/HTTPClientCall.swift
Sources/Network/HttpConnection/HTTPInterface/HTTPMethod.swift
Sources/Network/HttpConnection/HTTPInterface/HTTPResponse.swift
Sources/Network/HttpConnection/HTTPInterface/HTTPStatus.swift
Sources/Network/HttpConnection/HTTPInterface/HTTPUnaryCall.swift
```

### `HTTP` Connection Implementations

Wrapper classes that interface directly with `protoc-swift` generated `.swift` files for our protobuf models.

```
Sources/Network/HttpConnection/HttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/BlockchainHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/ConsensusHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/FogBlockHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/FogKeyImageHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/FogMerkleProofHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/FogReportHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/FogUntrustedTxOutHttpConnection.swift
Sources/Network/HttpConnection/HttpConnections/FogViewHttpConnection.swift
```

### `HTTP` versions of `protoc-swift` generated models

The GRPC versions of these are generated by `protoc-swift`. The HTTP versions were edited by hand to work with the `HTTP` Connections implementations. 

> **This could be automated preferably with a `protoc-swift` plugin template but also `sed`/`VIM` if needed.**

```
Sources/Network/HttpConnection/HttpConnections/Http Proto Generated/attest.http.swift
Sources/Network/HttpConnection/HttpConnections/Http Proto Generated/consensus_client.http.swift
Sources/Network/HttpConnection/HttpConnections/Http Proto Generated/consensus_common.http.swift
Sources/Network/HttpConnection/HttpConnections/Http Proto Generated/ledger.http.swift
Sources/Network/HttpConnection/HttpConnections/Http Proto Generated/report.http.swift
Sources/Network/HttpConnection/HttpConnections/Http Proto Generated/view.http.swift
```

## Fog Updates 

The latest version of `fog` changes the name of a protobuf `FogLedger_Block` -> `FogLedger_BlockData`.

### Compressed Commitment 

The `TxOut` compressed commitment is no longer sent in the protobuf message because it can be reconstructed with its constituent parts (+ the user's `view_private_key`)

We now reconstruct the commitment in several places whereas before it was being returned from the decoded protobuf message.

Lastly some function signatures into `LibMobileCoin` were updated to adjust to the changes.

## Miscellaneous

New MrEnclave values

Support for Apple Silicon/M1 & Mac Catalyst

## Unit Tests

One unit test was removed. It creates a TxOut and tries to unmask the value with an **incorrect** private view key. The return value should be 'nil' but is noise. It will require a change in the rust code and should be implemented in a future release.

Some objects were re-serialized to match the new TxOut structure.

Credentials are not required for `consensus` so this has been changed in the `NetworkConfig`

Tests can be run with `TransportProtocol == .http` by changing the default value in `NetworkConfig`
2021-09-16 21:15:20 -07:00
Adam Mork
446a1d3cda
Update TERMS-OF-USE.md (#58) 2021-08-17 18:37:23 -07:00
dependabot[bot]
735db8e8d9
Bump fastlane from 2.185.0 to 2.186.0 in /Example (#42) 2021-06-24 03:35:15 +00:00
Kyle Fleming
484f6182a1
Bump version to 1.1.0 (#40) 2021-06-10 12:16:44 -07:00
Kyle Fleming
cbcb232088
[SWIFT-170] Cache minimum transaction fee (#38) 2021-06-10 10:45:30 -07:00
Kyle Fleming
efb9b03460
Update LibMobileCoin to v1.1.0 (#39) 2021-06-10 10:45:13 -07:00
dependabot[bot]
995196ac5c
Bump fastlane from 2.182.0 to 2.185.0 in /Example (#37) 2021-06-10 11:38:17 +00:00
Kyle Fleming
d28396d4cf
Bump version to 1.1.0-pre2 (#31) 2021-05-10 19:51:37 -07:00
Kyle Fleming
f2d864a7e1
[SWIFT-158] Clean up logging (#30) 2021-05-10 19:51:21 -07:00
Kyle Fleming
3886040ce2
[SWIFT-167] Implement use of dynamic fees (#29) 2021-05-10 18:16:29 -07:00
Kyle Fleming
0d0aa8d7e9
Update libmobilecoin-ios-artifacts submodule to v1.1.0-pre2 (#28) 2021-05-10 17:41:24 -07:00
Kyle Fleming
5c3da28f2c
Update LibMobileCoin to v1.1.0-pre2 (#27) 2021-05-10 13:21:52 -07:00
dependabot[bot]
9c07a81ba0
Bump jazzy from 0.13.6 to 0.13.7 (#26) 2021-05-08 03:47:46 +00:00
dependabot[bot]
f8c95d06ad
Bump fastlane from 2.181.0 to 2.182.0 in /Example (#25) 2021-05-07 00:46:37 +00:00
Kyle Fleming
46a14affe7
Perform various cleanup tasks (#24) 2021-05-05 21:20:19 -07:00
dependabot[bot]
bee2fc177f
Bump fastlane from 2.180.1 to 2.181.0 in /Example (#23) 2021-04-21 19:47:28 +00:00
dependabot[bot]
50743a4b84
Bump fastlane from 2.180.0 to 2.180.1 in /Example (#22) 2021-04-11 02:04:08 +00:00
dependabot[bot]
a5f2bd4799
Bump fastlane from 2.179.0 to 2.180.0 in /Example (#21) 2021-04-08 23:07:56 +00:00
Kyle Fleming
8bd5396f14
Bump version to v1.0.0 (#20) 2021-04-05 16:31:18 -07:00
Kyle Fleming
9898fd40b2
Update LibMobileCoin to v1.0.0 (#19) 2021-04-05 16:01:26 -07:00
Kyle Fleming
8ade846a17
Reset version up 1.0.0-rc1 (#18) 2021-04-05 11:44:04 -07:00
Kyle Fleming
74a5c6f3fe
Continued logging cleanup (#17)
Co-authored-by: Eran Rundstein <eran@rundste.in>
2021-04-05 11:06:57 -07:00
Kyle Fleming
9cd66525a0
Fix off-by-1 bug when preparing a transaction (#16) 2021-04-05 10:33:53 -07:00
Kyle Fleming
135894700e
Continued work on improving logging (#15) 2021-04-02 05:24:05 -07:00
Kyle Fleming
8bfc418195
Add better TestNet support in integration tests (#14) 2021-04-02 04:56:52 -07:00
Kyle Fleming
68288252a9
[SWIFT-165] Update LibMobileCoin to 1.0.1-pre4, add key derivation (#13) 2021-04-01 03:33:24 -07:00
Kyle Fleming
dde923cb6e
Clean up logging and redact LibMobileCoin and Protobuf errors (#12) 2021-04-01 02:02:33 -07:00
Kyle Fleming
b690db1326
Clean up network config in integration tests and add MainNet (#11) 2021-04-01 01:41:24 -07:00
Kyle Fleming
79a4d1c57c
[SWIFT-161] Track last received user event when querying Fog View (#10) 2021-03-31 20:34:42 -07:00
Kyle Fleming
7c6295a3d6
[SWIFT-160] Add support for separate consensus and fog auth creds (#9) 2021-03-30 21:33:17 -07:00
Kyle Fleming
01c27be4d2
[SWIFT-163] Don't set auth credentials on report server connections (#8) 2021-03-30 12:07:28 -07:00
dependabot[bot]
cc0ac8f496
Bump fastlane from 2.178.0 to 2.179.0 in /Example (#7) 2021-03-29 18:11:55 +00:00
Kyle Fleming
deedb518af
Remove trailing whitespace (#6) 2021-03-18 19:44:54 -07:00
Brian Corbin
68a78301be
Logging Addition (#4)
* logging changes

* Addressing comments

Adjusted the log level of failure related logs to be "warning", and fixed the sensitivity level of some things to hide sensitive info and show non-sensitive info.

* Adding missed comment things
2021-03-18 21:36:10 -04:00
Kyle Fleming
7232cb7050
Fix SwiftLint warnings (#5) 2021-03-16 12:32:15 -07:00
Kyle Fleming
b4ac1178be Big bang 2021-03-15 22:58:02 -10:00