diff --git a/docs/protocol.md b/docs/protocol.md index 48280d5e..64605e9c 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -31,42 +31,18 @@ There are multiple ways to measure whether enough validators have approved a dec #### Multiple signatures - MultiSig The most simple solution is by using a *MultiSig* mechanism. This means that each guardian would sign a message -and submit it to a smart contract on-chain with reference to a *decision* that the guardians need to make (e.g. a transfer). -Since a transaction itself is already signed, we can simplify this to using the transaction itself as proof. +and submit it via a P2P gossip network. -Said smart contract will count the number of guardians that have submitted a transaction for a *decision*. -Once the consensus threshold has been reached, the contract will execute the action the guardians have agreed on. +Once the consensus threshold has been reached, a guardian will aggregate all signatures into a VAA and execute/submit it +on the chain. -The issue with this schema is that it requires at least `n=2/3*m+1` transactions for `m` validators. On Ethereum for -example one such transaction would cost `21k+20k+x` gas (base + `SSTORE` \[to track the tx] + additional compute). -With `n` txs and 20 guardians threshold (`2/3m+1`) the cost would be `n*(41k+x)` which is `820k+20x`. - -At a gas price of `50 Gwei` this would mean total tx costs of `0.041 ETH` at `x=0`. At an ETH price of `300$` that -means costs of `12.3$`. - -These prices will require the guardians to charge significant fees. If these fees are not covered by the user, bridge -transactions would stall and time out. - -There are a couple of other issues with this concept: - -1. There is no way for the Solana Bridge program to verify whether the guardians have actually unlocked the tokens on -the foreign chain. -2. Users cannot cover gas costs themselves because transactions are not "portable". I.e. the require serialized nonces. -If a guardian submits a transaction with nonce 20 to the user but in the meantime issues another transaction with the -same nonce, the user tx will be invalid even though the Solana program might successfully verify the tx (as it does not -know the state of ETH). - -There is an alternative way by using portable ECDSA signatures that approve an action i.e. a transfer. The guardians -could submit all of those signatures to the lock proposal and the user or another participant in the network could relay -them to Ethereum. -That way the Solana program can verify that the signatures and signed action are valid, being sure that if there is a -quorum (i.e. enough signatures), the user could use these signatures to trigger the execution of the signed action on -the foreign chain. - -The downside here is that this makes tracking and synchronizing guardian changes highly complex and further increases -gas costs by about `(5k+5k)*n` (`ECRECOVER+GTXDATANONZERO*72`) for the additional `ecrecover` calls that need to be made. -However since all signatures can be aggregate into one tx, we'll save `(n-1)*21k` leading to an effective gas saving of -`~10k*n`. Still, transfers would be considerably expensive applying the aforementioned assumptions. +The downside here is that gas costs increase with larger guardian sets bringing verification costs to + `(5k+5k)*n` (`ECRECOVER+GTXDATANONZERO*72`). + +To prevent lagging and complex gas price handling by validators or relayers, we always submit VAAs to Solana where txs +are negligibly cheap. In the case of a Solana -> ETH transfer. Guardians would publish a signed VAA on Solana and a user +or independently paid relayer would publish said VAA on Ethereum, paying for gas costs. This mechanism is similar to a +check issued by the guardians (a VAA) which can be used on another chain to claim assets. #### Threshold signatures @@ -114,7 +90,7 @@ A great overview can be found [here](https://github.com/Turing-Chain/TSSKit-Thre #### Design choices -For transfers we implement a Schnorr-Threshold signature schema based on the implementation from Chainlink. +For transfers we implement a simple MultiSig schema. We'll create a portable "action blob" with a threshold signature to allow anyone to relay action approvals between chains. We call this structure: **VAA** (Verifiable Action Approval). @@ -159,8 +135,6 @@ set. ID: `0x01` -Size: `32 byte` - Payload: ``` @@ -176,8 +150,6 @@ desynchronization between the any of the chains in the system. ID: `0x10` -Size: `75 byte` - Payload: ``` @@ -195,9 +167,6 @@ uint256 amount #### Transfer of assets Foreign Chain -> Root Chain -If this is the first time the asset is transferred to the root chain, the user inititates a `CreateWrapped` instruction -on the root chain to initialize the wrapped asset. - The user creates a token account for the wrapped asset on the root chain. The user sends a chain native asset to the bridge on the foreign chain using the `Lock` function. @@ -210,7 +179,7 @@ They check for the validity, parse it and will then initiate a threshold signatu produced VAA (`Transfer`) testifying that they have seen a foreign lockup. They will post this VAA on the root chain using the `SubmitVAA` instruction. -This instruction will either mint a new wrapped assetor released tokens from custody. +This instruction will either mint a new wrapped asset or release tokens from custody. Custody is used for Solana-native tokens that have previously been transferred to a foreign chain, minting will be used to create new units of a wrapped foreign-chain asset. @@ -233,19 +202,14 @@ Guardians will pick up the **LockProposal** once it has enough confirmations on full confirmation (i.e. the max lockup, currently 32 slots), but can be changed to a different commitment levels on each guardian's discretion. -They check for the validity of the tx, parse it and will initiate an off-chain threshold signature ceremony which will +They check for the validity of the tx, parse it and will initiate an off-chain signature aggregation ceremony which will output a **VAA** that can be used with a foreign chain smart contract to reclaim an unwrapped local asset or mint a wrapped `spl-token`. This VAA will be posted on Solana by one of the guardians using the `SubmitVAA` instruction and will be stored in the `LockProposal`. -Depending on whether the fees are sufficient for **guardians** or **relayers** to cover the foreign chain fees, they -will also post the VAA on the foreign chain, completing the transfer. - -If no fee or an insufficient fee is specified, the user can pick up the VAA from the `LockProposal` and submit it on the foreign chain themselves. - -VAAs for conducting transfers to a foreign chain are submitted using `FinalizeTransfer`. +The user can then get the VAA from the `LockProposal` and submit it on the foreign chain. ### Fees @@ -254,11 +218,6 @@ TODO \o/ ### Config changes #### Guardian set changes -Since we use a *TSS* (Threshold signature scheme) for VAAs, changes to the guardian list are finalized by setting a -new aggregate public key that's derived from a distributed key generation ("DKG") ceremony of the new guardian set. - -This new public key is set via a VAA with the `UPDATE_GUARDIANS` action that is signed by the previous guardians. - The guardians need to make sure that the sets are synchronized between all chains. If the guardian set is changed, the guardian must also be replaced on all foreign chains. Therefore we conduct these changes via VAAs that are universally valid on all chains. @@ -269,4 +228,4 @@ chains. If all VAAs issued by the previous guardian set would immediately become invalid once a new guardian set takes over, that would lead to some payments being "stuck". Therefore we track a list of previous guardian sets. VAAs issued by old -guardian sets stay valid for one day from the time that the change happens. +guardian sets stay valid for one day from the time that the change happens in the default configuration. diff --git a/docs/solana_program.md b/docs/solana_program.md index f483c7c1..6900379f 100644 --- a/docs/solana_program.md +++ b/docs/solana_program.md @@ -24,6 +24,17 @@ Pokes a `TransferOutProposal` so it is reprocessed by the guardians. | ----- | ------ | ------------ | ------ | --------- | ----- | ------- | | 0 | proposal | TransferOutProposal | | ✅ | ️ | ✅ | +#### VerifySignatures + +Checks secp checks (in the previous instruction) and stores results. + +| Index | Name | Type | signer | writeable | empty | derived | +| ----- | ------ | ------------ | ------ | --------- | ----- | ------- | +| 0 | bridge_p | BridgeProgram | | | ️ | | +| 1 | instructions | Sysvar | | | ️ | ✅ | +| 2 | sig_status | SignatureState | | ✅ | ️ | | +| 3 | guardian_set | GuardianSet | | | ️ | ✅ | + #### TransferOut Burns a wrapped asset `token` from `sender` on the Solana chain. @@ -37,12 +48,13 @@ Parameters: | 0 | bridge_p | BridgeProgram | | | ️ | | | 1 | sys | SystemProgram | | | ️ | | | 2 | token_program | SplToken | | | ️ | | -| 3 | clock | Sysvar | | | ️ | ✅ | -| 4 | token_account | TokenAccount | | ✅ | | | -| 5 | bridge | BridgeConfig | | | | | -| 6 | proposal | TransferOutProposal | | ✅ | ✅ | ✅ | -| 7 | token | WrappedAsset | | ✅ | | ✅ | -| 8 | payer | Account | ✅ | | | | +| 3 | rent | Sysvar | | | ️ | ✅ | +| 4 | clock | Sysvar | | | ️ | ✅ | +| 5 | token_account | TokenAccount | | ✅ | | | +| 6 | bridge | BridgeConfig | | | | | +| 7 | proposal | TransferOutProposal | | ✅ | ✅ | ✅ | +| 8 | token | WrappedAsset | | ✅ | | ✅ | +| 9 | payer | Account | ✅ | | | | #### TransferOutNative @@ -56,13 +68,14 @@ The transfer proposal will be tracked at a new account `proposal` where a VAA wi | 0 | bridge_p | BridgeProgram | | | ️ | | | 1 | sys | SystemProgram | | | ️ | | | 2 | token_program | SplToken | | | ️ | | -| 3 | clock | Sysvar | | | ️ | ✅ | -| 4 | token_account | TokenAccount | | ✅ | | | -| 5 | bridge | BridgeConfig | | | | | -| 6 | proposal | TransferOutProposal | | ✅ | ✅ | ✅ | -| 7 | token | Mint | | ✅ | | | -| 8 | payer | Account | ✅ | | | | -| 9 | custody_account | TokenAccount | | ✅ | opt | ✅ | +| 3 | rent | Sysvar | | | ️ | ✅ | +| 4 | clock | Sysvar | | | ️ | ✅ | +| 5 | token_account | TokenAccount | | ✅ | | | +| 6 | bridge | BridgeConfig | | | | | +| 7 | proposal | TransferOutProposal | | ✅ | ✅ | ✅ | +| 8 | token | Mint | | ✅ | | | +| 9 | payer | Account | ✅ | | | | +| 10 | custody_account | TokenAccount | | ✅ | opt | ✅ | #### EvictTransferOut @@ -88,20 +101,6 @@ Deletes a `ClaimedVAA` after the `VAA_EXPIRATION_TIME` to free up space on chain | 3 | bridge | BridgeConfig | | | | | | 4 | claim | ClaimedVAA | | ✅ | | ✅ | -#### CreateWrappedAsset - -Creates a new `WrappedAsset` to be used to create accounts and later receive transfers on chain. - -| Index | Name | Type | signer | writeable | empty | derived | -| ----- | -------- | ------------------- | ------ | --------- | ----- | ------- | -| 0 | bridge_p | BridgeProgram | | | ️ | | -| 1 | sys | SystemProgram | | | ️ | | -| 2 | token_program | SplToken | | | ️ | | -| 3 | bridge | BridgeConfig | | | | | -| 4 | payer | Account | ✅ | | ️ | | -| 5 | wrapped_mint | WrappedAsset | | | ✅ | ✅ | -| 6 | wrapped_meta_account | WrappedAssetMeta | | ✅ | ✅ | ✅ | - #### SubmitVAA Submits a VAA signed by the guardians to perform an action. @@ -114,11 +113,13 @@ All require: | ----- | ------------ | ------------ | ------ | --------- | ----- | ------- | | 0 | bridge_p | BridgeProgram | | | ️ | | | 1 | sys | SystemProgram | | | ️ | | -| 2 | clock | Sysvar | | | ️ | ✅ | -| 3 | bridge | BridgeConfig | | | | | -| 4 | guardian_set | GuardianSet | | | | | -| 5 | claim | ExecutedVAA | | ✅ | ✅ | ✅ | -| 6 | payer | Account | ✅ | | | | +| 2 | rent | Sysvar | | | ️ | ✅ | +| 3 | clock | Sysvar | | | ️ | ✅ | +| 4 | bridge | BridgeConfig | | | | | +| 5 | guardian_set | GuardianSet | | | | | +| 6 | claim | ExecutedVAA | | ✅ | ✅ | ✅ | +| 7 | sig_info | SigState | | | ✅ | | +| 8 | payer | Account | ✅ | | | | followed by: @@ -126,31 +127,31 @@ followed by: | Index | Name | Type | signer | writeable | empty | derived | | ----- | ------------ | ------------------- | ------ | --------- | ----- | ------- | -| 7 | guardian_set_new | GuardianSet | | ✅ | ✅ | ✅ | +| 9 | guardian_set_new | GuardianSet | | ✅ | ✅ | ✅ | ##### Transfer: Ethereum (native) -> Solana (wrapped) | Index | Name | Type | signer | writeable | empty | derived | | ----- | ------------ | ------------ | ------ | --------- | ----- | ------- | -| 7 | token_program | SplToken | | | ️ | | -| 8 | token | WrappedAsset | | | | ✅ | -| 9 | destination | TokenAccount | | ✅ | | | -| 10 | wrapped_meta | WrappedMeta | | ✅ | opt | ✅ | +| 9 | token_program | SplToken | | | ️ | | +| 10 | token | WrappedAsset | | | | ✅ | +| 11 | destination | TokenAccount | | ✅ | | | +| 12 | wrapped_meta | WrappedMeta | | ✅ | opt | ✅ | ##### Transfer: Ethereum (wrapped) -> Solana (native) | Index | Name | Type | signer | writeable | empty | derived | | ----- | ------------ | ------------ | ------ | --------- | ----- | ------- | -| 7 | token_program | SplToken | | | ️ | | -| 8 | token | Mint | | | | ✅ | -| 9 | destination | TokenAccount | | ✅ | opt | | -| 10 | custody_src | TokenAccount | | ✅ | | ✅ | +| 9 | token_program | SplToken | | | ️ | | +| 10 | token | Mint | | | | ✅ | +| 11 | destination | TokenAccount | | ✅ | opt | | +| 12 | custody_src | TokenAccount | | ✅ | | ✅ | ##### Transfer: Solana (any) -> Ethereum (any) | Index | Name | Type | signer | writeable | empty | derived | | ----- | ------------ | ------------------- | ------ | --------- | ----- | ------- | -| 7 | out_proposal | TransferOutProposal | | ✅ | | ✅ | +| 9 | out_proposal | TransferOutProposal | | ✅ | | ✅ | ## Accounts diff --git a/solana/Cargo.lock b/solana/Cargo.lock index fa458c42..a7eed71f 100644 --- a/solana/Cargo.lock +++ b/solana/Cargo.lock @@ -30,6 +30,7 @@ name = "agent" version = "0.1.0" dependencies = [ "bs58", + "byteorder", "hex", "log", "primitive-types", @@ -42,8 +43,7 @@ dependencies = [ "solana-client", "solana-faucet", "solana-sdk", - "solana-transaction-status", - "spl-token 1.0.8 (git+https://github.com/solana-labs/solana-program-library)", + "spl-token", "thiserror", "tokio 0.2.22", "tonic", @@ -111,20 +111,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25f9db3b38af870bf7e5cc649167533b493928e50744e2c30ae350230b414670" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] name = "async-trait" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caae68055714ff28740f310927e04f2eba76ff580b16fb18ed90073ee71646f7" +checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" @@ -308,24 +308,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" -[[package]] -name = "cbindgen" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "104ca409bbff8293739438c71820a2606111b5f8f81835536dc673dfd807369e" -dependencies = [ - "clap", - "heck", - "log", - "proc-macro2 1.0.19", - "quote 1.0.7", - "serde", - "serde_json", - "syn 1.0.38", - "tempfile", - "toml", -] - [[package]] name = "cc" version = "1.0.49" @@ -382,14 +364,13 @@ dependencies = [ "serde_derive", "serde_json", "solana-account-decoder", - "solana-clap-utils", + "solana-clap-utils 1.3.12", "solana-cli-config", "solana-client", "solana-faucet", - "solana-logger 1.3.3", + "solana-logger 1.3.12", "solana-sdk", - "solana-transaction-status", - "spl-token 1.0.8 (git+https://github.com/solana-labs/solana-program-library)", + "spl-token", "thiserror", "tungstenite 0.11.1", "url", @@ -405,6 +386,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "cloudabi" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" +dependencies = [ + "bitflags", +] + [[package]] name = "console" version = "0.11.3" @@ -467,6 +457,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" +[[package]] +name = "crossbeam-channel" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +dependencies = [ + "crossbeam-utils", + "maybe-uninit", +] + [[package]] name = "crossbeam-deque" version = "0.7.3" @@ -540,10 +540,21 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core", - "subtle 2.2.3", + "subtle 2.3.0", "zeroize", ] +[[package]] +name = "derivative" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +dependencies = [ + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn 1.0.41", +] + [[package]] name = "dialoguer" version = "0.6.2" @@ -602,9 +613,9 @@ checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" [[package]] name = "ed25519" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf038a7b6fd7ef78ad3348b63f3a17550877b0e28f8d68bcc94894d1412158bc" +checksum = "07dfc993ea376e864fe29a4099a61ca0bb994c6d7745a61bf60ddb3d64e05237" dependencies = [ "serde", "signature", @@ -626,9 +637,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encode_unicode" @@ -638,9 +649,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" +checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" dependencies = [ "cfg-if", ] @@ -674,9 +685,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", "synstructure", ] @@ -781,9 +792,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -851,13 +862,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] @@ -887,12 +898,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "autocfg", -] +checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" [[package]] name = "heck" @@ -905,9 +913,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +checksum = "4c30f6d0bc6b00693347368a67d41b58f2fb851215ff1da49e90fe2c5c667151" dependencies = [ "libc", ] @@ -939,6 +947,17 @@ dependencies = [ "digest 0.8.1", ] +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.3", + "hmac", +] + [[package]] name = "http" version = "0.2.1" @@ -966,6 +985,12 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +[[package]] +name = "httpdate" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" + [[package]] name = "humantime" version = "1.3.0" @@ -977,9 +1002,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" +checksum = "2f3afcfae8af5ad0576a31e768415edb627824129e8e5a29b8bfccb2f234e835" dependencies = [ "bytes 0.5.6", "futures-channel", @@ -989,10 +1014,10 @@ dependencies = [ "http", "http-body", "httparse", + "httpdate", "itoa", "pin-project", "socket2", - "time", "tokio 0.2.22", "tower-service", "tracing", @@ -1037,9 +1062,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" +checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" dependencies = [ "autocfg", "hashbrown", @@ -1066,6 +1091,15 @@ dependencies = [ "bytes 0.5.6", ] +[[package]] +name = "instant" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66" +dependencies = [ + "cfg-if", +] + [[package]] name = "iovec" version = "0.1.4" @@ -1116,9 +1150,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.44" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" +checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" dependencies = [ "wasm-bindgen", ] @@ -1163,9 +1197,25 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.74" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" +checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand", + "sha2", + "subtle 2.3.0", + "typenum", +] [[package]] name = "linked-hash-map" @@ -1182,6 +1232,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lock_api" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.11" @@ -1221,9 +1280,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ "autocfg", ] @@ -1246,11 +1305,12 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" dependencies = [ "adler", + "autocfg", ] [[package]] @@ -1297,9 +1357,9 @@ dependencies = [ [[package]] name = "multimap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" +checksum = "1255076139a83bb467426e7f8d0134968a8118844faa755985e077cf31850333" [[package]] name = "native-tls" @@ -1321,9 +1381,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.34" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" +checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" dependencies = [ "cfg-if", "libc", @@ -1356,13 +1416,13 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0396233fb2d5b0ae3f05ff6aba9a09185f7f6e70f87fb01147d545f85364665" +checksum = "6f09b9841adb6b5e1f89ef7087ea636e0fd94b2851f887c1e3eb5d5f8228fab3" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -1394,6 +1454,28 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn 1.0.41", +] + [[package]] name = "number_prefix" version = "0.3.0" @@ -1408,11 +1490,11 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" +checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" dependencies = [ - "parking_lot 0.10.2", + "parking_lot 0.11.0", ] [[package]] @@ -1462,9 +1544,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "1.3.4" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d38aeaffc032ec69faa476b3caaca8d4dd7f3f798137ff30359e5c7869ceb6" +checksum = "7c740e5fbcb6847058b40ac7e5574766c6388f585e184d769910fe0d3a2ca861" dependencies = [ "arrayvec", "bitvec", @@ -1478,7 +1560,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" dependencies = [ - "lock_api", + "lock_api 0.3.4", "parking_lot_core 0.6.2", "rustc_version", ] @@ -1489,10 +1571,21 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api", + "lock_api 0.3.4", "parking_lot_core 0.7.2", ] +[[package]] +name = "parking_lot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" +dependencies = [ + "instant", + "lock_api 0.4.1", + "parking_lot_core 0.8.0", +] + [[package]] name = "parking_lot_core" version = "0.6.2" @@ -1500,7 +1593,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ "cfg-if", - "cloudabi", + "cloudabi 0.0.3", "libc", "redox_syscall", "rustc_version", @@ -1515,7 +1608,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if", - "cloudabi", + "cloudabi 0.0.3", + "libc", + "redox_syscall", + "smallvec 1.4.2", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +dependencies = [ + "cfg-if", + "cloudabi 0.1.0", + "instant", "libc", "redox_syscall", "smallvec 1.4.2", @@ -1563,9 +1671,9 @@ version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -1588,9 +1696,9 @@ checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" [[package]] name = "primitive-types" @@ -1603,6 +1711,15 @@ dependencies = [ "uint", ] +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + [[package]] name = "proc-macro-hack" version = "0.5.18" @@ -1626,9 +1743,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.19" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c" dependencies = [ "unicode-xid 0.2.1", ] @@ -1669,9 +1786,9 @@ checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools 0.8.2", - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -1705,7 +1822,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", ] [[package]] @@ -1767,9 +1884,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" +checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" dependencies = [ "autocfg", "crossbeam-deque", @@ -1779,12 +1896,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.7.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" +checksum = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf" dependencies = [ + "crossbeam-channel", "crossbeam-deque", - "crossbeam-queue", "crossbeam-utils", "lazy_static", "num_cpus", @@ -1798,9 +1915,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_users" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ "getrandom", "redox_syscall", @@ -1836,9 +1953,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" +checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" dependencies = [ "base64 0.12.3", "bytes 0.5.6", @@ -1898,11 +2015,11 @@ dependencies = [ [[package]] name = "rust-argon2" -version = "0.7.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" dependencies = [ - "base64 0.11.0", + "base64 0.12.3", "blake2b_simd", "constant_time_eq", "crossbeam-utils", @@ -1954,9 +2071,9 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -2031,9 +2148,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" +checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" dependencies = [ "serde_derive", ] @@ -2049,13 +2166,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" +checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -2171,9 +2288,9 @@ checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" [[package]] name = "socket2" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44" dependencies = [ "cfg-if", "libc", @@ -2183,9 +2300,8 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170e0bf8226d79ab2bdcb35230ada6af41a0eb5efe384d0e3b8ec4f9cc7ad269" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "Inflector", "base64 0.12.3", @@ -2200,20 +2316,35 @@ dependencies = [ "solana-sdk", "solana-stake-program", "solana-vote-program", - "spl-token 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token", "thiserror", ] [[package]] name = "solana-clap-utils" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f554b181647dbf8b0ddfe1578df396c7c9720641ed962580e7c36aedacb85d75" +checksum = "2af1a135e5d71da59e93b9f01310f312ec831bbd9509685fb089e116f37ec5e2" dependencies = [ "chrono", "clap", "rpassword", - "solana-remote-wallet", + "solana-remote-wallet 1.3.12", + "solana-sdk", + "thiserror", + "tiny-bip39", + "url", +] + +[[package]] +name = "solana-clap-utils" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" +dependencies = [ + "chrono", + "clap", + "rpassword", + "solana-remote-wallet 1.4.0", "solana-sdk", "thiserror", "tiny-bip39", @@ -2222,9 +2353,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0a49cc9480c5950611b15c74e081d3d4ff331bcc6e3bddca72debb6a054d1f" +checksum = "309e2f28dbca8b64ababbcf7ed50c051bf6146a40419f1dcd3197ae75cb7af78" dependencies = [ "dirs", "lazy_static", @@ -2236,9 +2367,8 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0c2d24aa3247e87eb1418efe95baff7d50dd9714cf7cdd41d6fe07a5151155" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "bincode", "bs58", @@ -2262,9 +2392,8 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f48b715b669ba75edb1738352defc68b1b60ab3de5de2eae85d9c78f34bd01c" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "bincode", "chrono", @@ -2277,7 +2406,7 @@ dependencies = [ [[package]] name = "solana-crate-features" version = "1.4.0" -source = "git+https://github.com/solana-labs/solana?branch=master#e2d66cf796484301668c2b45804e31610373a0e9" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "backtrace", "bytes 0.4.12", @@ -2293,16 +2422,16 @@ dependencies = [ "reqwest", "serde", "syn 0.15.44", - "syn 1.0.38", + "syn 1.0.41", "tokio 0.1.22", "winapi 0.3.9", ] [[package]] name = "solana-faucet" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09940d08fe41cd1b9b733eb88fa8925ba0be9010de15d444c38b59b70a912647" +checksum = "e40fdfd4a31d356c3b990c04e6eef4318e00acf09947f6679fc6522d08715e1c" dependencies = [ "bincode", "byteorder", @@ -2311,20 +2440,20 @@ dependencies = [ "log", "serde", "serde_derive", - "solana-clap-utils", - "solana-logger 1.3.3", - "solana-metrics", + "solana-clap-utils 1.3.12", + "solana-logger 1.3.12", + "solana-metrics 1.3.12", "solana-sdk", - "solana-version", + "solana-version 1.3.12", "tokio 0.1.22", "tokio-codec", ] [[package]] name = "solana-logger" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912c9224a8be284f28b49f173b5e3a99fce7c82cfde819f8086adb2a1ac4f2b3" +checksum = "10fa1615c22d1d63230e7aeaf421321c24ea4746e2e4842cc0694adf5916c1b8" dependencies = [ "env_logger", "lazy_static", @@ -2334,7 +2463,7 @@ dependencies = [ [[package]] name = "solana-logger" version = "1.4.0" -source = "git+https://github.com/solana-labs/solana?branch=master#e2d66cf796484301668c2b45804e31610373a0e9" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "env_logger", "lazy_static", @@ -2343,9 +2472,22 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553b78ee6975f361f521e08bd68fbbe2397d532a718acd2739184ccc9151f5a1" +checksum = "384187253d39d3777c543de4c2a8216fb7e353d709711cbfb929a9b227184255" +dependencies = [ + "env_logger", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "env_logger", "gethostname", @@ -2357,9 +2499,8 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fecbf069f3cccf86a23c1ff681cc87f032aee1f2ffb265b39f0625e93fdd192" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "bincode", "bytes 0.4.12", @@ -2370,9 +2511,9 @@ dependencies = [ "serde", "serde_derive", "socket2", - "solana-clap-utils", - "solana-logger 1.3.3", - "solana-version", + "solana-clap-utils 1.4.0", + "solana-logger 1.4.0", + "solana-version 1.4.0", "tokio 0.1.22", "tokio-codec", "url", @@ -2380,16 +2521,35 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "419c020d8c1a7ac86d067195e093ac5c030e1b8547f0d70a391f5e973f58d312" +checksum = "8ac2e1d8efc9f11eef199be1983ca519c31aeae07d543c4494a773c1bb0b0c5f" dependencies = [ "base32", "console 0.11.3", "dialoguer", "hidapi", "log", - "num-derive 0.3.1", + "num-derive 0.3.2", + "num-traits", + "parking_lot 0.10.2", + "semver", + "solana-sdk", + "thiserror", + "url", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" +dependencies = [ + "base32", + "console 0.11.3", + "dialoguer", + "hidapi", + "log", + "num-derive 0.3.2", "num-traits", "parking_lot 0.10.2", "semver", @@ -2401,7 +2561,7 @@ dependencies = [ [[package]] name = "solana-sdk" version = "1.4.0" -source = "git+https://github.com/solana-labs/solana?branch=master#e2d66cf796484301668c2b45804e31610373a0e9" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "assert_matches", "bincode", @@ -2410,14 +2570,16 @@ dependencies = [ "byteorder", "chrono", "curve25519-dalek", + "digest 0.9.0", "ed25519-dalek", "generic-array 0.14.4", "hex", "hmac", "itertools 0.9.0", + "libsecp256k1", "log", "memmap", - "num-derive 0.3.1", + "num-derive 0.3.2", "num-traits", "pbkdf2", "rand", @@ -2429,6 +2591,7 @@ dependencies = [ "serde_derive", "serde_json", "sha2", + "sha3", "solana-crate-features", "solana-logger 1.4.0", "solana-sdk-macro", @@ -2439,68 +2602,67 @@ dependencies = [ [[package]] name = "solana-sdk-macro" version = "1.4.0" -source = "git+https://github.com/solana-labs/solana?branch=master#e2d66cf796484301668c2b45804e31610373a0e9" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "bs58", - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", "rustversion", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] name = "solana-sdk-macro-frozen-abi" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e77bab38b9683d7f0c87e4a860b9b752f81c6b1785d89b49cfd0296846dcb1" +checksum = "d64fed6f7a226c02c48b539cae879c0eef9f64be08986b248d8ad4cec4328945" dependencies = [ "lazy_static", - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", "rustc_version", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] name = "solana-sdk-macro-frozen-abi" version = "1.4.0" -source = "git+https://github.com/solana-labs/solana?branch=master#e2d66cf796484301668c2b45804e31610373a0e9" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "lazy_static", - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", "rustc_version", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] name = "solana-stake-program" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c039393dbcb299e8a5c4cd4f3ea913d15c8ebb8d1efcc09f8e65887a1bb61af" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "bincode", "log", - "num-derive 0.3.1", + "num-derive 0.3.2", "num-traits", "rustc_version", "serde", "serde_derive", "solana-config-program", - "solana-metrics", + "solana-metrics 1.4.0", "solana-sdk", - "solana-sdk-macro-frozen-abi 1.3.3", + "solana-sdk-macro-frozen-abi 1.4.0", "solana-vote-program", "thiserror", ] [[package]] name = "solana-transaction-status" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f536a6157febe5013ee456bc9fdb1eb8840c7371130b536a90704dc29bd2c01b" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "Inflector", + "base64 0.12.3", "bincode", "bs58", "lazy_static", @@ -2512,42 +2674,55 @@ dependencies = [ "solana-stake-program", "solana-vote-program", "spl-memo", - "spl-token 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token", "thiserror", ] [[package]] name = "solana-version" -version = "1.3.3" +version = "1.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "869fa3c53a1c0adb043c9ac317d80f3f09f76e9a436c2b9de81d9edf30dff788" +checksum = "0f640d3fe5a2ff358f8b67a6673e586aa26542bd3266c810340f20fb95b78fa3" dependencies = [ "log", "rustc_version", "serde", "serde_derive", - "solana-logger 1.3.3", + "solana-logger 1.3.12", "solana-sdk", - "solana-sdk-macro-frozen-abi 1.3.3", + "solana-sdk-macro-frozen-abi 1.3.12", +] + +[[package]] +name = "solana-version" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" +dependencies = [ + "log", + "rustc_version", + "serde", + "serde_derive", + "solana-logger 1.4.0", + "solana-sdk", + "solana-sdk-macro-frozen-abi 1.4.0", ] [[package]] name = "solana-vote-program" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd2e0c3a166eaa16bf1957db5e26fc72a5a3dd35cdc3a6e3216ef8b583e7d0f" +version = "1.4.0" +source = "git+https://github.com/solana-labs/solana?branch=master#afd9bfc45f7c467470d060dac892de878c9976c0" dependencies = [ "bincode", "log", - "num-derive 0.3.1", + "num-derive 0.3.2", "num-traits", "rustc_version", "serde", "serde_derive", - "solana-logger 1.3.3", - "solana-metrics", + "solana-logger 1.4.0", + "solana-metrics 1.4.0", "solana-sdk", - "solana-sdk-macro-frozen-abi 1.3.3", + "solana-sdk-macro-frozen-abi 1.4.0", "thiserror", ] @@ -2568,26 +2743,14 @@ dependencies = [ [[package]] name = "spl-token" -version = "1.0.8" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8bee8b59279b46d0627490b544c3bc38e440ff4da9851a34a26ab0a24bfe7d" +checksum = "813ab51fcfeabfc60157e6556b96cf005bab55321508053ade8c9f9bcfe5ce0b" dependencies = [ - "cbindgen", - "num-derive 0.3.1", - "num-traits", - "remove_dir_all", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "spl-token" -version = "1.0.8" -source = "git+https://github.com/solana-labs/solana-program-library#b619da32aea7b2898d1fe2faf4cdc7dba99df164" -dependencies = [ - "cbindgen", - "num-derive 0.3.1", + "arrayref", + "num-derive 0.3.2", "num-traits", + "num_enum", "remove_dir_all", "solana-sdk", "thiserror", @@ -2613,9 +2776,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.2.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" +checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" [[package]] name = "syn" @@ -2630,11 +2793,11 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.38" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" +checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", "unicode-xid 0.2.1", ] @@ -2645,9 +2808,9 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", "unicode-xid 0.2.1", ] @@ -2717,9 +2880,9 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -2733,11 +2896,12 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] @@ -2759,9 +2923,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" +checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" @@ -2867,9 +3031,9 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -2893,9 +3057,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" +checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", "rustls", @@ -3014,9 +3178,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b102a19758191af97cff34c6785dffd6610f68de5ab1c4bb8378638e4ef90" +checksum = "74a5d6e7439ecf910463667080de772a9c7ddf26bc9fb4f3252ac3862e43337d" dependencies = [ "async-stream", "async-trait", @@ -3044,14 +3208,14 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daec8b14e55497072204b53d5c0b1eb0a6ad1cd8301d6d4c079d4aeec35b21e9" +checksum = "19970cf58f3acc820962be74c4021b8bbc8e8a1c4e3a02095d0aa60cde5f3633" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "prost-build", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] @@ -3246,20 +3410,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe233f4227389ab7df5b32649239da7ebe0b281824b4e84b342d04d3fd8c25e" +checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", ] [[package]] name = "tracing-core" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" +checksum = "5bcf46c1f1f06aeea2d6b81f3c863d0930a596c86ad1920d4e5bad6dd1d7119a" dependencies = [ "lazy_static", ] @@ -3453,10 +3617,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] -name = "wasm-bindgen" -version = "0.2.67" +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasm-bindgen" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" dependencies = [ "cfg-if", "serde", @@ -3466,24 +3636,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.67" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" +checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" +checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" dependencies = [ "cfg-if", "js-sys", @@ -3493,9 +3663,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.67" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" +checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" dependencies = [ "quote 1.0.7", "wasm-bindgen-macro-support", @@ -3503,28 +3673,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.67" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" +checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.67" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" +checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" [[package]] name = "web-sys" -version = "0.3.44" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" +checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" dependencies = [ "js-sys", "wasm-bindgen", @@ -3623,7 +3793,7 @@ dependencies = [ "remove_dir_all", "sha3", "solana-sdk", - "spl-token 1.0.8 (git+https://github.com/solana-labs/solana-program-library)", + "spl-token", "thiserror", "zerocopy", ] @@ -3663,28 +3833,28 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb" dependencies = [ - "proc-macro2 1.0.19", - "syn 1.0.38", + "proc-macro2 1.0.21", + "syn 1.0.41", "synstructure", ] [[package]] name = "zeroize" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" +checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" +checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.21", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.41", "synstructure", ] diff --git a/solana/Cargo.toml b/solana/Cargo.toml index 9552736c..f0b34965 100644 --- a/solana/Cargo.toml +++ b/solana/Cargo.toml @@ -3,3 +3,5 @@ members = ["agent", "bridge", "cli"] [patch.crates-io] solana-sdk = { git="https://github.com/solana-labs/solana", branch="master" } +solana-client = { git="https://github.com/solana-labs/solana", branch="master" } +solana-account-decoder = { git="https://github.com/solana-labs/solana", branch="master" } diff --git a/solana/agent/Cargo.lock b/solana/agent/Cargo.lock deleted file mode 100644 index cb126f05..00000000 --- a/solana/agent/Cargo.lock +++ /dev/null @@ -1,1038 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "agent" -version = "0.1.0" -dependencies = [ - "prost", - "prost-types", - "tokio", - "tonic", - "tonic-build", -] - -[[package]] -name = "anyhow" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b" - -[[package]] -name = "async-stream" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22068c0c19514942eefcfd4daf8976ef1aad84e61539f95cd200c35202f80af5" -dependencies = [ - "async-stream-impl", - "futures-core", -] - -[[package]] -name = "async-stream-impl" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f9db3b38af870bf7e5cc649167533b493928e50744e2c30ae350230b414670" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "async-trait" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "either" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" - -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures-channel" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" - -[[package]] -name = "futures-sink" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" - -[[package]] -name = "futures-task" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" - -[[package]] -name = "futures-util" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" -dependencies = [ - "futures-core", - "futures-task", - "pin-project", - "pin-utils", -] - -[[package]] -name = "getrandom" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "h2" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "autocfg", -] - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" -dependencies = [ - "libc", -] - -[[package]] -name = "http" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" - -[[package]] -name = "hyper" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project", - "socket2", - "time", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "indexmap" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" - -[[package]] -name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "memchr" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "mio" -version = "0.6.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "multimap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" - -[[package]] -name = "net2" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "pin-project" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" - -[[package]] -name = "proc-macro2" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "prost" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" -dependencies = [ - "bytes", - "heck", - "itertools", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" -dependencies = [ - "bytes", - "prost", -] - -[[package]] -name = "quote" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom", - "libc", - "rand_chacha", - "rand_core", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "socket2" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi 0.3.9", -] - -[[package]] -name = "syn" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "tempfile" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -dependencies = [ - "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "tokio" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio", - "mio-uds", - "num_cpus", - "pin-project-lite", - "slab", - "tokio-macros", -] - -[[package]] -name = "tokio-macros" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tonic" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b102a19758191af97cff34c6785dffd6610f68de5ab1c4bb8378638e4ef90" -dependencies = [ - "async-stream", - "async-trait", - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "percent-encoding", - "pin-project", - "prost", - "prost-derive", - "tokio", - "tokio-util", - "tower", - "tower-balance", - "tower-load", - "tower-make", - "tower-service", - "tracing", - "tracing-futures", -] - -[[package]] -name = "tonic-build" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daec8b14e55497072204b53d5c0b1eb0a6ad1cd8301d6d4c079d4aeec35b21e9" -dependencies = [ - "proc-macro2", - "prost-build", - "quote", - "syn", -] - -[[package]] -name = "tower" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3169017c090b7a28fce80abaad0ab4f5566423677c9331bb320af7e49cfe62" -dependencies = [ - "futures-core", - "tower-buffer", - "tower-discover", - "tower-layer", - "tower-limit", - "tower-load-shed", - "tower-retry", - "tower-service", - "tower-timeout", - "tower-util", -] - -[[package]] -name = "tower-balance" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a792277613b7052448851efcf98a2c433e6f1d01460832dc60bef676bc275d4c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap", - "pin-project", - "rand", - "slab", - "tokio", - "tower-discover", - "tower-layer", - "tower-load", - "tower-make", - "tower-ready-cache", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-buffer" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4887dc2a65d464c8b9b66e0e4d51c2fd6cf5b3373afc72805b0a60bce00446a" -dependencies = [ - "futures-core", - "pin-project", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-discover" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6b5000c3c54d269cc695dff28136bb33d08cbf1df2c48129e143ab65bf3c2a" -dependencies = [ - "futures-core", - "pin-project", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35d656f2638b288b33495d1053ea74c40dc05ec0b92084dd71ca5566c4ed1dc" - -[[package]] -name = "tower-limit" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c3040c5dbed68abffaa0d4517ac1a454cd741044f33ab0eefab6b8d1361404" -dependencies = [ - "futures-core", - "pin-project", - "tokio", - "tower-layer", - "tower-load", - "tower-service", -] - -[[package]] -name = "tower-load" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc79fc3afd07492b7966d7efa7c6c50f8ed58d768a6075dd7ae6591c5d2017b" -dependencies = [ - "futures-core", - "log", - "pin-project", - "tokio", - "tower-discover", - "tower-service", -] - -[[package]] -name = "tower-load-shed" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f021e23900173dc315feb4b6922510dae3e79c689b74c089112066c11f0ae4e" -dependencies = [ - "futures-core", - "pin-project", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-make" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce50370d644a0364bf4877ffd4f76404156a248d104e2cc234cd391ea5cdc965" -dependencies = [ - "tokio", - "tower-service", -] - -[[package]] -name = "tower-ready-cache" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eabb6620e5481267e2ec832c780b31cad0c15dcb14ed825df5076b26b591e1f" -dependencies = [ - "futures-core", - "futures-util", - "indexmap", - "log", - "tokio", - "tower-service", -] - -[[package]] -name = "tower-retry" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6727956aaa2f8957d4d9232b308fe8e4e65d99db30f42b225646e86c9b6a952" -dependencies = [ - "futures-core", - "pin-project", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-service" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" - -[[package]] -name = "tower-timeout" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "127b8924b357be938823eaaec0608c482d40add25609481027b96198b2e4b31e" -dependencies = [ - "pin-project", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1093c19826d33807c72511e68f73b4a0469a3f22c2bd5f7d5212178b4b89674" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "tower-service", -] - -[[package]] -name = "tracing" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aae59226cf195d8e74d4b34beae1859257efb4e5fed3f147d2dc2c7d372178" -dependencies = [ - "cfg-if", - "log", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0693bf8d6f2bf22c690fc61a9d21ac69efdbb894a17ed596b9af0f01e64b84b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d593f98af59ebc017c0648f0117525db358745a8894a8d684e185ba3f45954f9" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "which" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" -dependencies = [ - "libc", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] diff --git a/solana/agent/Cargo.toml b/solana/agent/Cargo.toml index 0bd247ee..0c55baca 100644 --- a/solana/agent/Cargo.toml +++ b/solana/agent/Cargo.toml @@ -9,23 +9,23 @@ tonic = "0.3.0" tokio = { version = "0.2", features = ["rt-threaded", "time", "stream", "fs", "macros", "uds"] } prost = "0.6" prost-types = "0.6" -solana-sdk = { version = "1.3.3" } -solana-client = { version = "1.3.3" } -solana-faucet = "1.3.3" -solana-transaction-status = "1.3.3" -spl-token = { package = "spl-token", git = "https://github.com/solana-labs/solana-program-library" } +solana-sdk = { version = "1.3.11" } +solana-client = { version = "1.3.11" } +solana-faucet = "1.3.11" +spl-token = "=2.0.3" wormhole-bridge = { path = "../bridge" } -primitive-types = {version ="0.7.2"} +primitive-types = { version = "0.7.2" } hex = "0.4.2" thiserror = "1.0.20" tungstenite = "0.11.1" serde = "1.0.103" -url="2.1.1" -serde_bytes ="0.11.5" -log ="0.4.8" +url = "2.1.1" +serde_bytes = "0.11.5" +log = "0.4.8" serde_derive = "1.0.103" serde_json = "1.0.57" bs58 = "0.3.1" +byteorder = "1.3.4" [build-dependencies] tonic-build = { version = "0.3.0", features = ["prost"] } diff --git a/solana/agent/src/main.rs b/solana/agent/src/main.rs index 0bca2560..47ea5d3a 100644 --- a/solana/agent/src/main.rs +++ b/solana/agent/src/main.rs @@ -1,37 +1,41 @@ use std::env; -use std::fs::File; -use std::mem::size_of; -use std::rc::Rc; -use std::str::FromStr; -use std::sync::mpsc::RecvError; -use std::thread::sleep; -use solana_client::client_error::ClientError; -use solana_client::rpc_client::RpcClient; -use solana_client::rpc_config::RpcSendTransactionConfig; +use std::{io::Write, mem::size_of}; + +use std::str::FromStr; + +use byteorder::{BigEndian, LittleEndian, ReadBytesExt, WriteBytesExt}; +use solana_client::{ + client_error::ClientError, rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig, +}; use solana_sdk::commitment_config::{CommitmentConfig, CommitmentLevel}; -use solana_sdk::fee_calculator::FeeCalculator; + use solana_sdk::instruction::Instruction; -use solana_sdk::program_error::ProgramError; -use solana_sdk::pubkey::Pubkey; -use solana_sdk::signature::{read_keypair_file, write_keypair_file, Keypair, Signer}; -use solana_sdk::transaction::Transaction; -use solana_transaction_status::UiTransactionEncoding; -use spl_token::state::Account; -use tokio::stream::Stream; + +use solana_sdk::{ + pubkey::Pubkey, + signature::{read_keypair_file, write_keypair_file, Keypair, Signature, Signer}, + system_instruction::create_account, + transaction::Transaction, +}; + use tokio::sync::mpsc; -use tokio::time::Duration; + use tonic::{transport::Server, Code, Request, Response, Status}; -use service::agent_server::{Agent, AgentServer}; use service::{ - lockup_event::Event, Empty, LockupEvent, LockupEventNew, LockupEventVaaPosted, - SubmitVaaRequest, SubmitVaaResponse, WatchLockupsRequest, + agent_server::{Agent, AgentServer}, + lockup_event::Event, + Empty, LockupEvent, LockupEventNew, LockupEventVaaPosted, SubmitVaaRequest, SubmitVaaResponse, + WatchLockupsRequest, +}; +use spl_bridge::{ + instruction::{post_vaa, verify_signatures, VerifySigPayload, CHAIN_ID_SOLANA}, + state::{Bridge, GuardianSet, SignatureState, TransferOutProposal}, + vaa::VAA, }; -use spl_bridge::instruction::{post_vaa, CHAIN_ID_SOLANA}; -use spl_bridge::state::{Bridge, TransferOutProposal}; -use crate::monitor::{ProgramNotificationMessage, PubsubClient}; +use crate::monitor::PubsubClient; mod monitor; @@ -47,6 +51,12 @@ pub struct AgentImpl { key: Keypair, } +pub struct SignatureItem { + signature: [u8; 64 + 1], + key: [u8; 20], + index: u8, +} + #[tonic::async_trait] impl Agent for AgentImpl { async fn submit_vaa( @@ -56,42 +66,58 @@ impl Agent for AgentImpl { // Hack to clone keypair let b = self.key.to_bytes(); let key = Keypair::from_bytes(&b).unwrap(); + let bridge = self.bridge.clone(); - let ix = match post_vaa(&self.bridge, &key.pubkey(), request.get_ref().vaa.clone()) { - Ok(v) => v, - Err(e) => { - return Err(Status::new( - Code::InvalidArgument, - format!("could not create instruction: {}", e), - )); - } - }; - - let mut transaction = Transaction::new_with_payer(&[ix], Some(&key.pubkey())); let rpc_url = self.rpc_url.clone(); // we need to spawn an extra thread because tokio does not allow nested runtimes std::thread::spawn(move || { let rpc = RpcClient::new(rpc_url); - let (recent_blockhash, fee_calculator) = match rpc.get_recent_blockhash() { + + let sig_key = solana_sdk::signature::Keypair::new(); + + let mut vaa = match VAA::deserialize(&request.get_ref().vaa) { Ok(v) => v, Err(e) => { return Err(Status::new( - Code::Unavailable, - format!("could not fetch recent blockhash: {}", e), + Code::InvalidArgument, + format!("could not parse VAA: {}", e), )); } }; - transaction.sign(&[&key], recent_blockhash); - match rpc.send_and_confirm_transaction_with_spinner_and_config( - &transaction, - CommitmentConfig { - commitment: CommitmentLevel::Single, - }, - RpcSendTransactionConfig { - skip_preflight: true, - }, + let verify_txs = pack_sig_verification_txs(&rpc, &bridge, &vaa, &key, &sig_key)?; + + // Strip signatures + vaa.signatures = Vec::new(); + let ix = match post_vaa( + &bridge, + &key.pubkey(), + &sig_key.pubkey(), + vaa.serialize().unwrap(), ) { + Ok(v) => v, + Err(e) => { + return Err(Status::new( + Code::InvalidArgument, + format!("could not create post_vaa instruction: {}", e), + )); + } + }; + let mut transaction2 = Transaction::new_with_payer(&[ix], Some(&key.pubkey())); + + for (mut tx, signers) in verify_txs { + match sign_and_send(&rpc, &mut tx, signers) { + Ok(_) => (), + Err(e) => { + return Err(Status::new( + Code::Unavailable, + format!("tx sending failed: {}", e), + )); + } + }; + } + + match sign_and_send(&rpc, &mut transaction2, vec![&key]) { Ok(s) => Ok(Response::new(SubmitVaaResponse { signature: s.to_string(), })), @@ -115,15 +141,15 @@ impl Agent for AgentImpl { async fn watch_lockups( &self, - req: Request, + _req: Request, ) -> Result, Status> { - let (mut tx, mut rx) = mpsc::channel(1); + let (mut tx, rx) = mpsc::channel(1); let url = self.url.clone(); let bridge = self.bridge.clone(); let rpc_url = self.rpc_url.clone(); tokio::spawn(async move { - let rpc = RpcClient::new(rpc_url.to_string()); + let _rpc = RpcClient::new(rpc_url.to_string()); let sub = PubsubClient::program_subscribe(&url, &bridge).unwrap(); // looping and sending our response using stream loop { @@ -225,6 +251,176 @@ impl Agent for AgentImpl { } } +fn pack_sig_verification_txs<'a>( + rpc: &RpcClient, + bridge: &Pubkey, + vaa: &VAA, + sender_keypair: &'a Keypair, + sign_keypair: &'a Keypair, +) -> Result)>, Status> { + // Load guardian set + let bridge_key = Bridge::derive_bridge_id(bridge).unwrap(); + let guardian_key = + Bridge::derive_guardian_set_id(bridge, &bridge_key, vaa.guardian_set_index).unwrap(); + let guardian_account = rpc + .get_account_with_commitment( + &guardian_key, + CommitmentConfig { + commitment: CommitmentLevel::Single, + }, + ) + .unwrap() + .value + .unwrap_or_default(); + let data = guardian_account.data; + let guardian_set: &GuardianSet = Bridge::unpack_immutable(data.as_slice()).unwrap(); + + // Map signatures to guardian set + let mut signature_items: Vec = Vec::new(); + for s in vaa.signatures.iter() { + let mut item = SignatureItem { + signature: [0; 64 + 1], + key: [0; 20], + index: s.index, + }; + + item.signature[0..32].copy_from_slice(&s.r); + item.signature[32..64].copy_from_slice(&s.s); + item.signature[64] = s.v; + item.key = guardian_set.keys[s.index as usize]; + + signature_items.push(item); + } + + let vaa_hash = match vaa.body_hash() { + Ok(v) => v, + Err(e) => { + return Err(Status::new( + Code::InvalidArgument, + format!("could get vaa body hash: {}", e), + )); + } + }; + let vaa_body = match vaa.signature_body() { + Ok(v) => v, + Err(e) => { + return Err(Status::new( + Code::InvalidArgument, + format!("could get vaa body: {}", e), + )); + } + }; + + let mut verify_txs: Vec<(Transaction, Vec<&Keypair>)> = Vec::new(); + for (tx_index, chunk) in signature_items.chunks(6).enumerate() { + let mut secp_payload = Vec::new(); + let mut signature_status = [-1i8; 20]; + + let data_offset = 1 + chunk.len() * 11; + let message_offset = data_offset + chunk.len() * 85; + + // 1 number of signatures + secp_payload.write_u8(chunk.len() as u8); + + let secp_ix_index = if tx_index == 0 { 1u8 } else { 0u8 }; + // Secp signature info description (11 bytes * n) + for (i, s) in chunk.iter().enumerate() { + secp_payload.write_u16::((data_offset + 85 * i) as u16); + secp_payload.write_u8(secp_ix_index); + secp_payload.write_u16::((data_offset + 85 * i + 65) as u16); + secp_payload.write_u8(secp_ix_index); + secp_payload.write_u16::(message_offset as u16); + secp_payload.write_u16::(vaa_body.len() as u16); + secp_payload.write_u8(secp_ix_index); + signature_status[s.index as usize] = i as i8; + } + + // Write signatures and addresses + for s in chunk.iter() { + secp_payload.write(&s.signature); + secp_payload.write(&s.key); + } + + // Write body + secp_payload.write(&vaa_body); + + let secp_ix = Instruction { + program_id: solana_sdk::secp256k1_program::id(), + data: secp_payload, + accounts: vec![], + }; + + let payload = VerifySigPayload { + signers: signature_status, + hash: vaa_hash, + }; + let verify_ix = match verify_signatures( + &bridge, + &sign_keypair.pubkey(), + vaa.guardian_set_index, + &payload, + ) { + Ok(v) => v, + Err(e) => { + return Err(Status::new( + Code::InvalidArgument, + format!("could not create verify instruction: {}", e), + )); + } + }; + + if tx_index == 0 { + // Instruction for creating the signature status account + let min_sig_rent = rpc + .get_minimum_balance_for_rent_exemption(size_of::()) + .unwrap(); + let create_ix = create_account( + &sender_keypair.pubkey(), + &sign_keypair.pubkey(), + min_sig_rent, + size_of::() as u64, + bridge, + ); + + verify_txs.push(( + Transaction::new_with_payer( + &[create_ix, secp_ix, verify_ix], + Some(&sender_keypair.pubkey()), + ), + vec![sender_keypair, sign_keypair], + )) + } else { + verify_txs.push(( + Transaction::new_with_payer(&[secp_ix, verify_ix], Some(&sender_keypair.pubkey())), + vec![sender_keypair], + )) + } + } + + Ok(verify_txs) +} + +fn sign_and_send( + rpc: &RpcClient, + tx: &mut Transaction, + keys: Vec<&Keypair>, +) -> Result { + let (recent_blockhash, _fee_calculator) = rpc.get_recent_blockhash()?; + + tx.sign(&keys, recent_blockhash); + + rpc.send_and_confirm_transaction_with_spinner_and_config( + &tx, + CommitmentConfig { + commitment: CommitmentLevel::Single, + }, + RpcSendTransactionConfig { + skip_preflight: false, + preflight_commitment: Some(CommitmentLevel::SingleGossip), + }, + ) +} + #[tokio::main] async fn main() -> Result<(), Box> { let args: Vec = env::args().collect(); diff --git a/solana/agent/src/monitor.rs b/solana/agent/src/monitor.rs index dc6c293c..33b7962b 100644 --- a/solana/agent/src/monitor.rs +++ b/solana/agent/src/monitor.rs @@ -1,6 +1,6 @@ -use std::str::FromStr; use std::{ marker::PhantomData, + str::FromStr, sync::{ atomic::{AtomicBool, Ordering}, mpsc::{channel, Receiver}, @@ -11,14 +11,16 @@ use std::{ use bs58; use log::*; -use serde::{de::DeserializeOwned, de::Error, Deserialize, Deserializer, Serialize}; +use serde::{ + de::{DeserializeOwned, Error}, + Deserialize, Deserializer, Serialize, +}; use serde_json::{ json, value::Value::{Number, Object}, Map, Value, }; -use solana_sdk::account::Account; -use solana_sdk::account_info::AccountInfo; + use solana_sdk::pubkey::Pubkey; use thiserror::Error; use tungstenite::{client::AutoStream, connect, Message, WebSocket}; diff --git a/solana/bridge/Cargo.lock b/solana/bridge/Cargo.lock deleted file mode 100644 index 8a8c86e2..00000000 --- a/solana/bridge/Cargo.lock +++ /dev/null @@ -1,2340 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "addr2line" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" - -[[package]] -name = "aho-corasick" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "assert_matches" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "autocfg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" - -[[package]] -name = "backtrace" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "serde", -] - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "bincode" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" -dependencies = [ - "byteorder", - "serde", -] - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.3", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding 0.2.0", - "generic-array 0.14.3", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "block-padding" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c98bfd7c112b6399fef97cc0614af1cd375b27a112e552ce60f94c1b5f13cb74" - -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - -[[package]] -name = "bumpalo" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "cbindgen" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "104ca409bbff8293739438c71820a2606111b5f8f81835536dc673dfd807369e" -dependencies = [ - "clap", - "heck", - "log", - "proc-macro2 1.0.19", - "quote 1.0.7", - "serde", - "serde_json", - "syn 1.0.38", - "tempfile", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" -dependencies = [ - "jobserver", - "num_cpus", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "chrono" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" -dependencies = [ - "num-integer", - "num-traits", - "time", -] - -[[package]] -name = "clap" -version = "2.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10040cdf04294b565d9e0319955430099ec3813a64c952b86a41200ad714ae48" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if", - "lazy_static", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-mac" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -dependencies = [ - "generic-array 0.12.3", - "subtle 1.0.0", -] - -[[package]] -name = "curve25519-dalek" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core", - "subtle 2.2.3", - "zeroize", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.3", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.3", -] - -[[package]] -name = "dtoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" - -[[package]] -name = "ed25519" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf038a7b6fd7ef78ad3348b63f3a17550877b0e28f8d68bcc94894d1412158bc" -dependencies = [ - "serde", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand", - "serde", - "sha2", - "zeroize", -] - -[[package]] -name = "either" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" - -[[package]] -name = "encoding_rs" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "synstructure", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "fixed-hash" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" - -[[package]] -name = "futures-channel" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" - -[[package]] -name = "futures-io" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" - -[[package]] -name = "futures-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" -dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "futures-sink" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" - -[[package]] -name = "futures-task" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" -dependencies = [ - "once_cell", -] - -[[package]] -name = "futures-util" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" -dependencies = [ - "futures-core", - "futures-io", - "futures-macro", - "futures-task", - "memchr", - "pin-project", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60fb4bb6bba52f78a471264d9a3b7d026cc0af47b22cd2cffbc0b787ca003e63" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" - -[[package]] -name = "h2" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio 0.2.22", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" -dependencies = [ - "autocfg", -] - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" - -[[package]] -name = "hmac" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" -dependencies = [ - "crypto-mac", - "digest 0.8.1", -] - -[[package]] -name = "http" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -dependencies = [ - "bytes 0.5.6", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "hyper" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project", - "socket2", - "time", - "tokio 0.2.22", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" -dependencies = [ - "bytes 0.5.6", - "futures-util", - "hyper", - "log", - "rustls", - "tokio 0.2.22", - "tokio-rustls", - "webpki", -] - -[[package]] -name = "idna" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipnet" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" - -[[package]] -name = "jobserver" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] - -[[package]] -name = "libc" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "memoffset" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.6.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "net2" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "num-derive" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "num-derive" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0396233fb2d5b0ae3f05ff6aba9a09185f7f6e70f87fb01147d545f85364665" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "num-integer" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" - -[[package]] -name = "once_cell" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api", - "parking_lot_core", - "rustc_version", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "rustc_version", - "smallvec", - "winapi 0.3.9", -] - -[[package]] -name = "pbkdf2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -dependencies = [ - "byteorder", - "crypto-mac", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pin-project" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" - -[[package]] -name = "primitive-types" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8" -dependencies = [ - "fixed-hash", - "uint", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" - -[[package]] -name = "proc-macro-nested" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" -dependencies = [ - "unicode-xid 0.2.1", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -dependencies = [ - "proc-macro2 1.0.19", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom", - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "regex" -version = "1.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", -] - -[[package]] -name = "regex-syntax" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" - -[[package]] -name = "remove_dir_all" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "reqwest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" -dependencies = [ - "base64", - "bytes 0.5.6", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite", - "rustls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio 0.2.22", - "tokio-rustls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" -dependencies = [ - "cc", - "lazy_static", - "libc", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" -dependencies = [ - "base64", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustversion" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "serde_json" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -dependencies = [ - "dtoa", - "itoa", - "serde", - "url", -] - -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "signature" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "socket2" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi 0.3.9", -] - -[[package]] -name = "solana-crate-features" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ce44be0cf411c28919c5d2af9b87dcaf7a631df66494eef1134e12fa8916b6" -dependencies = [ - "backtrace", - "bytes 0.4.12", - "cc", - "curve25519-dalek", - "ed25519-dalek", - "either", - "failure", - "lazy_static", - "libc", - "rand_chacha", - "regex-syntax", - "reqwest", - "serde", - "syn 0.15.44", - "syn 1.0.38", - "tokio 0.1.22", - "winapi 0.3.9", -] - -[[package]] -name = "solana-logger" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c7ac685637629a11a6cd8d41f8b69c99f6deff8cf2a5ffdb1d5f659d81a7a4" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - -[[package]] -name = "solana-sdk" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5502cfd8063437ac2b289b525cff9c271f59f3c267be6e2f6e8256df842d0d96" -dependencies = [ - "assert_matches", - "bincode", - "bs58", - "bv", - "byteorder", - "chrono", - "curve25519-dalek", - "ed25519-dalek", - "generic-array 0.14.3", - "hex", - "hmac", - "itertools", - "log", - "memmap", - "num-derive 0.3.1", - "num-traits", - "pbkdf2", - "rand", - "rand_chacha", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2", - "solana-crate-features", - "solana-logger", - "solana-sdk-macro", - "solana-sdk-macro-frozen-abi", - "thiserror", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ea42a0ab1199059e60b00bebd58156bc6a8c89672fbb78bd474d98c49d330c" -dependencies = [ - "bs58", - "proc-macro2 1.0.19", - "quote 1.0.7", - "rustversion", - "syn 1.0.38", -] - -[[package]] -name = "solana-sdk-macro-frozen-abi" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd83d11379007984161d413872ed8ba1f94c7625967d1a8de6f1e08215eede7" -dependencies = [ - "lazy_static", - "proc-macro2 1.0.19", - "quote 1.0.7", - "rustc_version", - "syn 1.0.38", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spl-token" -version = "1.0.6" -source = "git+https://github.com/solana-labs/solana-program-library#4170c1b3c9940ac3ec992e0e0a4fb81f8d5401a3" -dependencies = [ - "cbindgen", - "num-derive 0.3.1", - "num-traits", - "remove_dir_all", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - -[[package]] -name = "syn" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "unicode-xid 0.2.1", -] - -[[package]] -name = "synstructure" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "unicode-xid 0.2.1", -] - -[[package]] -name = "tempfile" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -dependencies = [ - "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "termcolor" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "thread_local" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "tinyvec" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" - -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures", - "mio", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "memchr", - "mio", - "num_cpus", - "pin-project-lite", - "slab", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures", - "tokio-io", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils", - "futures", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures", - "log", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils", - "futures", - "lazy_static", - "log", - "mio", - "num_cpus", - "parking_lot", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", -] - -[[package]] -name = "tokio-rustls" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" -dependencies = [ - "futures-core", - "rustls", - "tokio 0.2.22", - "webpki", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils", - "futures", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils", - "futures", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures", - "log", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "libc", - "log", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio 0.2.22", -] - -[[package]] -name = "toml" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" -dependencies = [ - "serde", -] - -[[package]] -name = "tower-service" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" - -[[package]] -name = "tracing" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aae59226cf195d8e74d4b34beae1859257efb4e5fed3f147d2dc2c7d372178" -dependencies = [ - "cfg-if", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d593f98af59ebc017c0648f0117525db358745a8894a8d684e185ba3f45954f9" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "typenum" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" - -[[package]] -name = "uint" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "429ffcad8c8c15f874578c7337d156a3727eb4a1c2374c0ae937ad9a9b748c80" -dependencies = [ - "byteorder", - "crunchy", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" - -[[package]] -name = "unicode-width" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -dependencies = [ - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasm-bindgen" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" -dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" -dependencies = [ - "quote 1.0.7", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" - -[[package]] -name = "web-sys" -version = "0.3.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" -dependencies = [ - "webpki", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "wormhole-bridge" -version = "0.1.0" -dependencies = [ - "byteorder", - "hex", - "num-derive 0.2.5", - "num-traits", - "primitive-types", - "rand", - "remove_dir_all", - "sha3", - "solana-sdk", - "spl-token", - "thiserror", - "zerocopy", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "zerocopy" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6580539ad917b7c026220c4b3f2c08d52ce54d6ce0dc491e66002e35388fab46" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb" -dependencies = [ - "proc-macro2 1.0.19", - "syn 1.0.38", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "synstructure", -] diff --git a/solana/bridge/Cargo.toml b/solana/bridge/Cargo.toml index 2b34066f..20605da7 100644 --- a/solana/bridge/Cargo.toml +++ b/solana/bridge/Cargo.toml @@ -19,8 +19,8 @@ default = ["solana-sdk/default", "spl-token/default"] num-derive = "0.2" num-traits = "0.2" remove_dir_all = "=0.5.0" -solana-sdk = { version = "1.3.3", default-features = false, optional = true } -spl-token = { package = "spl-token", git = "https://github.com/solana-labs/solana-program-library", default-features = false, optional = true } +solana-sdk = { version = "1.3.11", default-features = false, optional = true } +spl-token = { version = "=2.0.3", default-features = false, optional = true } thiserror = "1.0" byteorder = "1.3.4" zerocopy = "0.3.0" diff --git a/solana/bridge/src/error.rs b/solana/bridge/src/error.rs index 07cbe185..26b46318 100644 --- a/solana/bridge/src/error.rs +++ b/solana/bridge/src/error.rs @@ -100,6 +100,9 @@ pub enum Error { /// VAA for this transfer has already been submitted #[error("VAAAlreadySubmitted")] VAAAlreadySubmitted, + /// Mismatching guardian set + #[error("GuardianSetMismatch")] + GuardianSetMismatch, } impl From for ProgramError { diff --git a/solana/bridge/src/error_program.rs b/solana/bridge/src/error_program.rs index b25eda28..4ab8f20d 100644 --- a/solana/bridge/src/error_program.rs +++ b/solana/bridge/src/error_program.rs @@ -38,6 +38,7 @@ impl PrintProgramError for Error { Error::VAATooLong => info!("Error: VAATooLong"), Error::CannotWrapNative => info!("Error: CannotWrapNative"), Error::VAAAlreadySubmitted => info!("Error: VAAAlreadySubmitted"), + Error::GuardianSetMismatch => info!("Error: GuardianSetMismatch"), } } } diff --git a/solana/bridge/src/instruction.rs b/solana/bridge/src/instruction.rs index 859709eb..875cf989 100644 --- a/solana/bridge/src/instruction.rs +++ b/solana/bridge/src/instruction.rs @@ -1,10 +1,8 @@ #![allow(clippy::too_many_arguments)] //! Instruction types -use std::io::{Cursor, Read, Write}; use std::mem::size_of; -use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use primitive_types::U256; use solana_sdk::{ instruction::{AccountMeta, Instruction}, @@ -12,11 +10,13 @@ use solana_sdk::{ pubkey::Pubkey, }; -use crate::error::Error; -use crate::error::Error::VAATooLong; -use crate::instruction::BridgeInstruction::{Initialize, PokeProposal, PostVAA, TransferOut}; -use crate::state::{AssetMeta, Bridge, BridgeConfig}; -use crate::vaa::{VAABody, VAA}; +use crate::{ + instruction::BridgeInstruction::{ + Initialize, PokeProposal, PostVAA, TransferOut, VerifySignatures, + }, + state::{AssetMeta, Bridge, BridgeConfig}, + vaa::{VAABody, VAA}, +}; /// chain id of this chain pub const CHAIN_ID_SOLANA: u8 = 1; @@ -75,6 +75,14 @@ pub struct TransferOutPayloadRaw { pub nonce: u32, } +#[derive(Clone, Copy, Debug)] +pub struct VerifySigPayload { + /// hash of the VAA + pub hash: [u8; 32], + /// instruction indices of signers (-1 for missing) + pub signers: [i8; MAX_LEN_GUARDIAN_KEYS], +} + /// Instructions supported by the SwapInfo program. #[repr(C)] pub enum BridgeInstruction { @@ -126,6 +134,9 @@ pub enum BridgeInstruction { /// Pokes a proposal with no valid VAAs attached so guardians reprocess it. PokeProposal(), + + /// Verifies signature instructions + VerifySignatures(VerifySigPayload), } impl BridgeInstruction { @@ -157,16 +168,22 @@ impl BridgeInstruction { PostVAA(payload) } 5 => PokeProposal(), + 6 => { + let payload: &VerifySigPayload = unpack(input)?; + + VerifySignatures(*payload) + } _ => return Err(ProgramError::InvalidInstructionData), }) } /// Serializes a BridgeInstruction into a byte buffer. pub fn serialize(self: Self) -> Result, ProgramError> { - let mut output = vec![0u8; size_of::()]; + let mut output = Vec::with_capacity(size_of::()); match self { Self::Initialize(payload) => { + output.resize(size_of::() + 1, 0); output[0] = 0; #[allow(clippy::cast_ptr_alignment)] let value = unsafe { @@ -175,6 +192,7 @@ impl BridgeInstruction { *value = payload; } Self::TransferOut(payload) => { + output.resize(size_of::() + 1, 0); output[0] = 1; #[allow(clippy::cast_ptr_alignment)] let value = unsafe { @@ -193,21 +211,32 @@ impl BridgeInstruction { }; } Self::PostVAA(payload) => { + output.resize(1, 0); output[0] = 2; #[allow(clippy::cast_ptr_alignment)] - let value = - unsafe { &mut *(&mut output[size_of::()] as *mut u8 as *mut VAAData) }; - *value = payload; + output.extend_from_slice(&payload); } Self::EvictTransferOut() => { + output.resize(1, 0); output[0] = 3; } Self::EvictClaimedVAA() => { + output.resize(1, 0); output[0] = 4; } Self::PokeProposal() => { + output.resize(1, 0); output[0] = 5; } + Self::VerifySignatures(payload) => { + output.resize(size_of::() + 1, 0); + output[0] = 6; + #[allow(clippy::cast_ptr_alignment)] + let value = unsafe { + &mut *(&mut output[size_of::()] as *mut u8 as *mut VerifySigPayload) + }; + *value = payload; + } } Ok(output) } @@ -280,6 +309,7 @@ pub fn transfer_out( AccountMeta::new_readonly(*program_id, false), AccountMeta::new_readonly(solana_sdk::system_program::id(), false), AccountMeta::new_readonly(spl_token::id(), false), + AccountMeta::new_readonly(solana_sdk::sysvar::rent::id(), false), AccountMeta::new_readonly(solana_sdk::sysvar::clock::id(), false), AccountMeta::new(*token_account, false), AccountMeta::new(bridge_key, false), @@ -301,11 +331,40 @@ pub fn transfer_out( }) } +/// Creates a 'VerifySignatures' instruction. +#[cfg(not(target_arch = "bpf"))] +pub fn verify_signatures( + program_id: &Pubkey, + signature_acc: &Pubkey, + guardian_set_id: u32, + p: &VerifySigPayload, +) -> Result { + let data = BridgeInstruction::VerifySignatures(*p).serialize()?; + + let bridge_key = Bridge::derive_bridge_id(program_id)?; + let guardian_set_key = + Bridge::derive_guardian_set_id(program_id, &bridge_key, guardian_set_id)?; + + let accounts = vec![ + AccountMeta::new_readonly(*program_id, false), + AccountMeta::new_readonly(solana_sdk::sysvar::instructions::id(), false), + AccountMeta::new(*signature_acc, false), + AccountMeta::new_readonly(guardian_set_key, false), + ]; + + Ok(Instruction { + program_id: *program_id, + accounts, + data, + }) +} + /// Creates a 'PostVAA' instruction. #[cfg(not(target_arch = "bpf"))] pub fn post_vaa( program_id: &Pubkey, payer: &Pubkey, + signature_key: &Pubkey, v: VAAData, ) -> Result { let mut data = v.clone(); @@ -322,10 +381,12 @@ pub fn post_vaa( let mut accounts = vec![ AccountMeta::new_readonly(*program_id, false), AccountMeta::new_readonly(solana_sdk::system_program::id(), false), + AccountMeta::new_readonly(solana_sdk::sysvar::rent::id(), false), AccountMeta::new_readonly(solana_sdk::sysvar::clock::id(), false), AccountMeta::new(bridge_key, false), AccountMeta::new(guardian_set_key, false), AccountMeta::new(claim_key, false), + AccountMeta::new(*signature_key, false), AccountMeta::new(*payer, true), ]; @@ -390,7 +451,7 @@ pub fn poke_proposal( ) -> Result { let data = BridgeInstruction::PokeProposal().serialize()?; - let mut accounts = vec![AccountMeta::new(*transfer_proposal, false)]; + let accounts = vec![AccountMeta::new(*transfer_proposal, false)]; Ok(Instruction { program_id: *program_id, diff --git a/solana/bridge/src/lib.rs b/solana/bridge/src/lib.rs index db7d555c..af277dd7 100644 --- a/solana/bridge/src/lib.rs +++ b/solana/bridge/src/lib.rs @@ -7,5 +7,4 @@ pub mod error_program; pub mod instruction; pub mod processor; pub mod state; -pub mod syscalls; pub mod vaa; diff --git a/solana/bridge/src/processor.rs b/solana/bridge/src/processor.rs index 3e8e2e20..7bbb14a6 100644 --- a/solana/bridge/src/processor.rs +++ b/solana/bridge/src/processor.rs @@ -1,32 +1,53 @@ //! Program instruction processing logic #![cfg(feature = "program")] -use std::borrow::Borrow; -use std::cell::RefCell; -use std::mem::size_of; -use std::slice::Iter; +use std::{borrow::Borrow, cell::RefCell, io::Write, mem::size_of, slice::Iter}; +use byteorder::ByteOrder; use num_traits::AsPrimitive; use primitive_types::U256; -use solana_sdk::clock::Clock; -use solana_sdk::hash::Hasher; +use sha3::Digest; #[cfg(target_arch = "bpf")] use solana_sdk::program::invoke_signed; -use solana_sdk::rent::Rent; -use solana_sdk::system_instruction::{create_account, SystemInstruction}; -use solana_sdk::sysvar::Sysvar; use solana_sdk::{ - account_info::next_account_info, account_info::AccountInfo, entrypoint::ProgramResult, info, - instruction::Instruction, program_error::ProgramError, pubkey::Pubkey, + account_info::{next_account_info, AccountInfo}, + clock::Clock, + entrypoint::ProgramResult, + hash::Hasher, + info, + instruction::Instruction, + program_error::ProgramError, + pubkey::Pubkey, + rent::Rent, + system_instruction::{create_account, SystemInstruction}, + sysvar::Sysvar, }; -use spl_token::state::Mint; +use spl_token::{pack::Pack, state::Mint}; -use crate::error::Error; -use crate::instruction::BridgeInstruction::*; -use crate::instruction::{BridgeInstruction, TransferOutPayload, VAAData, CHAIN_ID_SOLANA}; -use crate::instruction::{MAX_LEN_GUARDIAN_KEYS, MAX_VAA_SIZE}; -use crate::state::*; -use crate::vaa::{BodyTransfer, BodyUpdateGuardianSet, VAABody, VAA}; +use crate::{ + error::Error, + instruction::{ + BridgeInstruction, BridgeInstruction::*, TransferOutPayload, VAAData, VerifySigPayload, + CHAIN_ID_SOLANA, MAX_LEN_GUARDIAN_KEYS, MAX_VAA_SIZE, + }, + state::*, + vaa::{BodyTransfer, BodyUpdateGuardianSet, VAABody, VAA}, +}; + +/// SigInfo contains metadata about signers in a VerifySignature ix +struct SigInfo { + /// index of the signer in the guardianset + signer_index: u8, + /// index of the signature in the secp instruction + sig_index: u8, +} + +struct SecpInstructionPart<'a> { + address: &'a [u8], + signature: &'a [u8], + msg_offset: u16, + msg_size: u16, +} /// Instruction processing logic impl Bridge { @@ -64,6 +85,11 @@ impl Bridge { Self::process_poke(program_id, accounts) } + VerifySignatures(p) => { + info!("Instruction: VerifySignatures"); + + Self::process_verify_signatures(program_id, accounts, &p) + } _ => panic!(""), } } @@ -155,6 +181,158 @@ impl Bridge { Ok(()) } + /// Processes signature verifications + pub fn process_verify_signatures( + program_id: &Pubkey, + accounts: &[AccountInfo], + payload: &VerifySigPayload, + ) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + next_account_info(account_info_iter)?; // Bridge program + let instruction_accounts = next_account_info(account_info_iter)?; + let sig_info = next_account_info(account_info_iter)?; + let guardian_set_info = next_account_info(account_info_iter)?; + + let guardian_set: GuardianSet = Self::guardian_set_deserialize(guardian_set_info)?; + + let mut sig_state_data = sig_info.data.borrow_mut(); + let mut sig_state: &mut SignatureState = Self::unpack_unchecked(&mut sig_state_data)?; + + if sig_state.is_initialized { + if sig_state.guardian_set_index != guardian_set.index { + return Err(Error::GuardianSetMismatch.into()); + } + if sig_state.hash != payload.hash { + return Err(ProgramError::InvalidArgument); + } + } else { + sig_state.is_initialized = true; + sig_state.guardian_set_index = guardian_set.index; + sig_state.hash = payload.hash; + } + + let sig_infos: Vec = payload + .signers + .iter() + .enumerate() + .filter_map(|(i, p)| { + if *p == -1 { + return None; + } + + return Some(SigInfo { + sig_index: *p as u8, + signer_index: i as u8, + }); + }) + .collect(); + + let current_instruction = solana_sdk::sysvar::instructions::load_current_index( + &instruction_accounts.try_borrow_data()?, + ); + if current_instruction == 0 { + return Err(ProgramError::InvalidInstructionData); + } + + // The previous ix must be a secp verification instruction + let secp_ix_index = (current_instruction - 1) as u8; + let secp_ix = solana_sdk::sysvar::instructions::load_instruction_at( + secp_ix_index as usize, + &instruction_accounts.try_borrow_data()?, + ) + .map_err(|_| ProgramError::InvalidAccountData)?; + + // Check that the instruction is actually for the secp program + if secp_ix.program_id != solana_sdk::secp256k1_program::id() { + return Err(ProgramError::InvalidArgument); + } + + let secp_data_len = secp_ix.data.len(); + if secp_data_len < 2 { + return Err(ProgramError::InvalidAccountData); + } + + let sig_len = secp_ix.data[0]; + let mut index = 1; + + let mut secp_ixs: Vec = Vec::with_capacity(sig_len as usize); + for i in 0..sig_len { + let sig_offset = byteorder::LE::read_u16(&secp_ix.data[index..index + 2]) as usize; + index += 2; + let sig_ix = secp_ix.data[index]; + index += 1; + let address_offset = byteorder::LE::read_u16(&secp_ix.data[index..index + 2]) as usize; + index += 2; + let address_ix = secp_ix.data[index]; + index += 1; + let msg_offset = byteorder::LE::read_u16(&secp_ix.data[index..index + 2]); + index += 2; + let msg_size = byteorder::LE::read_u16(&secp_ix.data[index..index + 2]); + index += 2; + let msg_ix = secp_ix.data[index]; + index += 1; + + if address_ix != secp_ix_index || msg_ix != secp_ix_index || sig_ix != secp_ix_index { + return Err(ProgramError::InvalidArgument); + } + + let address: &[u8] = &secp_ix.data[address_offset..address_offset + 20]; + let signature: &[u8] = &secp_ix.data[sig_offset..sig_offset + 65]; + + // Make sure that all messages are equal + if i > 0 { + if msg_offset != secp_ixs[0].msg_offset || msg_size != secp_ixs[0].msg_size { + return Err(ProgramError::InvalidArgument); + } + } + secp_ixs.push(SecpInstructionPart { + address, + signature, + msg_offset, + msg_size, + }); + } + + if sig_infos.len() != secp_ixs.len() { + return Err(ProgramError::InvalidArgument); + } + + // Check message + let message = &secp_ix.data[secp_ixs[0].msg_offset as usize + ..(secp_ixs[0].msg_offset + secp_ixs[0].msg_size) as usize]; + + let mut h = sha3::Keccak256::default(); + if let Err(_) = h.write(message) { + return Err(ProgramError::InvalidArgument); + }; + let msg_hash: [u8; 32] = h.finalize().into(); + if msg_hash != payload.hash { + return Err(ProgramError::InvalidArgument); + } + + // Check addresses + for s in sig_infos { + if s.signer_index > guardian_set.len_keys { + return Err(ProgramError::InvalidArgument); + } + + if s.sig_index + 1 > sig_len { + return Err(ProgramError::InvalidArgument); + } + + let key = guardian_set.keys[s.signer_index as usize]; + // Check key in ix + if key != secp_ixs[s.sig_index as usize].address { + return Err(ProgramError::InvalidArgument); + } + + sig_state.signatures[s.signer_index as usize] + .copy_from_slice(secp_ixs[s.sig_index as usize].signature); + } + + Ok(()) + } + /// Transfers a wrapped asset out pub fn process_transfer_out( program_id: &Pubkey, @@ -166,6 +344,7 @@ impl Bridge { next_account_info(account_info_iter)?; // Bridge program next_account_info(account_info_iter)?; // System program next_account_info(account_info_iter)?; // Token program + next_account_info(account_info_iter)?; // Rent sysvar let clock_info = next_account_info(account_info_iter)?; let sender_account_info = next_account_info(account_info_iter)?; let bridge_info = next_account_info(account_info_iter)?; @@ -223,6 +402,7 @@ impl Bridge { accounts, &bridge.config.token_program, sender_account_info.key, + mint_info.key, t.amount, )?; @@ -256,6 +436,7 @@ impl Bridge { next_account_info(account_info_iter)?; // Bridge program next_account_info(account_info_iter)?; // System program next_account_info(account_info_iter)?; // Token program + next_account_info(account_info_iter)?; // Rent sysvar let clock_info = next_account_info(account_info_iter)?; let sender_account_info = next_account_info(account_info_iter)?; let bridge_info = next_account_info(account_info_iter)?; @@ -368,10 +549,12 @@ impl Bridge { // Load VAA processing default accounts next_account_info(account_info_iter)?; // Bridge program next_account_info(account_info_iter)?; // System program + next_account_info(account_info_iter)?; // Rent sysvar let clock_info = next_account_info(account_info_iter)?; let bridge_info = next_account_info(account_info_iter)?; let guardian_set_info = next_account_info(account_info_iter)?; let claim_info = next_account_info(account_info_iter)?; + let sig_info = next_account_info(account_info_iter)?; let payer_info = next_account_info(account_info_iter)?; let mut bridge = Bridge::bridge_deserialize(bridge_info)?; @@ -401,9 +584,29 @@ impl Bridge { return Err(Error::GuardianSetExpired.into()); } - // Verify VAA signature - if !vaa.verify(&guardian_set.keys[..guardian_set.len_keys as usize]) { - return Err(Error::InvalidVAASignature.into()); + // Verify sig state + let mut sig_state_data = sig_info.data.borrow_mut(); + let sig_state: &SignatureState = Self::unpack(&mut sig_state_data)?; + + // Verify that signatures were made using the correct set + if sig_state.guardian_set_index != guardian_set.index { + return Err(Error::GuardianSetMismatch.into()); + } + + let hash = vaa.body_hash()?; + if sig_state.hash != hash { + return Err(ProgramError::InvalidAccountData); + } + + // Check quorum + if (sig_state + .signatures + .iter() + .filter(|v| v.iter().filter(|v| **v != 0).count() != 0) + .count() as u8) + < (((guardian_set.len_keys / 4) * 3) + 1) + { + return Err(ProgramError::InvalidArgument); } let payload = vaa.payload.as_ref().ok_or(Error::InvalidVAAAction)?; @@ -428,6 +631,7 @@ impl Bridge { vaa, &v, vaa_data, + sig_info.key, ) } else { Self::process_vaa_transfer( @@ -635,6 +839,7 @@ impl Bridge { vaa: &VAA, b: &BodyTransfer, vaa_data: VAAData, + sig_account: &Pubkey, ) -> ProgramResult { info!("posting VAA"); let proposal_info = next_account_info(account_info_iter)?; @@ -673,6 +878,7 @@ impl Bridge { // Stop byte proposal.vaa[vaa_data.len()] = 0xff; proposal.vaa_time = vaa.timestamp; + proposal.signature_account = *sig_account; Ok(()) } @@ -686,11 +892,13 @@ impl Bridge { accounts: &[AccountInfo], token_program_id: &Pubkey, token_account: &Pubkey, + mint_account: &Pubkey, amount: U256, ) -> Result<(), ProgramError> { let ix = spl_token::instruction::burn( token_program_id, token_account, + mint_account, &Self::derive_bridge_id(program_id)?, &[], amount.as_u64(), @@ -769,7 +977,7 @@ impl Bridge { mint: &Pubkey, payer: &Pubkey, ) -> Result<(), ProgramError> { - Self::check_and_create_account::( + Self::check_and_create_account::<[u8; spl_token::state::Account::LEN]>( program_id, accounts, account, @@ -777,7 +985,6 @@ impl Bridge { token_program, &Self::derive_custody_seeds(bridge, mint), )?; - info!("bababu"); info!(token_program.to_string().as_str()); let ix = spl_token::instruction::initialize_account( token_program, @@ -799,7 +1006,7 @@ impl Bridge { asset: &AssetMeta, decimals: u8, ) -> Result<(), ProgramError> { - Self::check_and_create_account::( + Self::check_and_create_account::<[u8; spl_token::state::Mint::LEN]>( program_id, accounts, mint, @@ -810,9 +1017,8 @@ impl Bridge { let ix = spl_token::instruction::initialize_mint( token_program, mint, + &Self::derive_bridge_id(program_id)?, None, - Some(&Self::derive_bridge_id(program_id)?), - 0, decimals, )?; invoke_signed(&ix, accounts, &[]) diff --git a/solana/bridge/src/state.rs b/solana/bridge/src/state.rs index fc956871..3674f2df 100644 --- a/solana/bridge/src/state.rs +++ b/solana/bridge/src/state.rs @@ -1,18 +1,16 @@ //! Bridge transition types -use std::io::{Cursor, Read, Write}; use std::mem::size_of; -use std::ops::Deref; -use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use primitive_types::U256; -use solana_sdk::pubkey::{PubkeyError, MAX_SEED_LEN}; use solana_sdk::{account_info::AccountInfo, program_error::ProgramError, pubkey::Pubkey}; use zerocopy::AsBytes; -use crate::error::Error; -use crate::instruction::{ForeignAddress, VAAData, MAX_LEN_GUARDIAN_KEYS, MAX_VAA_SIZE}; -use crate::vaa::BodyTransfer; +use crate::{ + error::Error, + instruction::{ForeignAddress, MAX_LEN_GUARDIAN_KEYS, MAX_VAA_SIZE}, + vaa::BodyTransfer, +}; /// fee rate as a ratio #[repr(C)] @@ -73,6 +71,8 @@ pub struct TransferOutProposal { pub lockup_time: u32, /// times the proposal has been poked pub poke_counter: u8, + /// Account where signatures are stored + pub signature_account: Pubkey, /// Is `true` if this structure has been initialized. pub is_initialized: bool, @@ -178,19 +178,42 @@ impl IsInitialized for Bridge { } } +/// Signature state +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SignatureState { + /// signatures of validators + pub signatures: [[u8; 65]; MAX_LEN_GUARDIAN_KEYS], + + /// hash of the data + pub hash: [u8; 32], + + /// index of the guardian set + pub guardian_set_index: u32, + + /// Is `true` if this structure has been initialized. + pub is_initialized: bool, +} + +impl IsInitialized for SignatureState { + fn is_initialized(&self) -> bool { + self.is_initialized + } +} + /// Implementation of serialization functions impl Bridge { /// Deserializes a spl_token `Account`. pub fn token_account_deserialize( info: &AccountInfo, ) -> Result { - Ok(*spl_token::state::unpack(&mut info.data.borrow_mut()) + Ok(spl_token::pack::Pack::unpack(&mut info.data.borrow_mut()) .map_err(|_| Error::ExpectedAccount)?) } /// Deserializes a spl_token `Mint`. pub fn mint_deserialize(info: &AccountInfo) -> Result { - Ok(*spl_token::state::unpack(&mut info.data.borrow_mut()) + Ok(spl_token::pack::Pack::unpack(&mut info.data.borrow_mut()) .map_err(|_| Error::ExpectedToken)?) } diff --git a/solana/bridge/src/syscalls.rs b/solana/bridge/src/syscalls.rs deleted file mode 100644 index b5f7bab2..00000000 --- a/solana/bridge/src/syscalls.rs +++ /dev/null @@ -1,47 +0,0 @@ -use solana_sdk::program_error::ProgramError; - -use crate::error::Error; - -#[repr(C)] -pub struct EcrecoverInput { - pub r: [u8; 32], - pub s: [u8; 32], - pub v: u8, - pub message: [u8; 32], -} - -#[repr(C)] -pub struct EcrecoverOutput { - pub address: [u8; 20], -} - -impl EcrecoverInput { - pub fn new(r: [u8; 32], s: [u8; 32], v: u8, message: [u8; 32]) -> EcrecoverInput { - EcrecoverInput { r, s, v, message } - } -} - -/// Verify an ETH optimized Schnorr signature -/// -/// @param input - Input for signature verification -//#[cfg(target_arch = "bpf")] -#[inline] -pub fn sol_syscall_ecrecover(input: &EcrecoverInput) -> Result { - let mut output = EcrecoverOutput { address: [0; 20] }; - let res = unsafe { - sol_ecrecover( - input as *const _ as *const u8, - (&mut output) as *mut _ as *mut u8, - ) - }; - if res == 1 { - Ok(output) - } else { - Err(Error::InvalidVAASignature) - } -} - -//#[cfg(target_arch = "bpf")] -extern "C" { - fn sol_ecrecover(input: *const u8, output: *mut u8) -> u64; -} diff --git a/solana/bridge/src/vaa.rs b/solana/bridge/src/vaa.rs index 73bf05d4..e0af5ea1 100644 --- a/solana/bridge/src/vaa.rs +++ b/solana/bridge/src/vaa.rs @@ -3,11 +3,9 @@ use std::io::{Cursor, Read, Write}; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use primitive_types::U256; use sha3::Digest; +use solana_sdk::program_error::ProgramError; -use crate::error::Error; -use crate::error::Error::InvalidVAAFormat; -use crate::state::AssetMeta; -use crate::syscalls::{sol_syscall_ecrecover, EcrecoverInput, EcrecoverOutput}; +use crate::{error::Error, state::AssetMeta}; pub type ForeignAddress = [u8; 32]; @@ -42,50 +40,19 @@ impl VAA { }; } - pub fn verify(&self, guardian_keys: &[[u8; 20]]) -> bool { + pub fn body_hash(&self) -> Result<[u8; 32], ProgramError> { let body = match self.signature_body() { Ok(v) => v, Err(_) => { - return false; + return Err(ProgramError::InvalidArgument); } }; let mut h = sha3::Keccak256::default(); if let Err(_) = h.write(body.as_slice()) { - return false; + return Err(ProgramError::InvalidArgument); }; - let hash = h.finalize().into(); - - // Check quorum - if self.signatures.len() < (((guardian_keys.len() / 4) * 3) + 1 as usize) { - return false; - } - - let mut last_index: i16 = -1; - for sig in self.signatures.iter() { - // Prevent multiple sinatures by the same guardian - if sig.index as i16 <= last_index { - return false; - } - last_index = sig.index as i16; - - let ecrecover_input = EcrecoverInput::new(sig.r, sig.s, sig.v, hash); - let res = match sol_syscall_ecrecover(&ecrecover_input) { - Ok(v) => v, - Err(_) => { - return false; - } - }; - - if sig.index >= guardian_keys.len() as u8 { - return false; - } - if res.address != guardian_keys[sig.index as usize] { - return false; - } - } - - true + Ok(h.finalize().into()) } pub fn serialize(&self) -> Result, Error> { @@ -136,7 +103,7 @@ impl VAA { let len_sig = rdr.read_u8()?; let mut sigs: Vec = Vec::with_capacity(len_sig as usize); - for i in 0..len_sig { + for _i in 0..len_sig { let mut sig = Signature::default(); sig.index = rdr.read_u8()?; @@ -302,8 +269,10 @@ mod tests { use hex; use primitive_types::U256; - use crate::state::AssetMeta; - use crate::vaa::{BodyTransfer, BodyUpdateGuardianSet, Signature, VAABody, VAA}; + use crate::{ + state::AssetMeta, + vaa::{BodyTransfer, BodyUpdateGuardianSet, Signature, VAABody, VAA}, + }; #[test] fn serialize_deserialize_vaa_transfer() { diff --git a/solana/cli/Cargo.lock b/solana/cli/Cargo.lock deleted file mode 100644 index f85f0f51..00000000 --- a/solana/cli/Cargo.lock +++ /dev/null @@ -1,3230 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" - -[[package]] -name = "aho-corasick" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" - -[[package]] -name = "assert_matches" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "autocfg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" - -[[package]] -name = "backtrace" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "serde", -] - -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "bincode" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" -dependencies = [ - "byteorder", - "serde", -] - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium", -] - -[[package]] -name = "blake2b_simd" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.3", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding 0.2.0", - "generic-array 0.14.3", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "block-padding" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c98bfd7c112b6399fef97cc0614af1cd375b27a112e552ce60f94c1b5f13cb74" - -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - -[[package]] -name = "bumpalo" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "byte-slice-cast" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "cbindgen" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "104ca409bbff8293739438c71820a2606111b5f8f81835536dc673dfd807369e" -dependencies = [ - "clap", - "heck", - "log", - "proc-macro2 1.0.19", - "quote 1.0.7", - "serde", - "serde_json", - "syn 1.0.38", - "tempfile", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" -dependencies = [ - "jobserver", - "num_cpus", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "chrono" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" -dependencies = [ - "num-integer", - "num-traits", - "serde", - "time", -] - -[[package]] -name = "clap" -version = "2.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10040cdf04294b565d9e0319955430099ec3813a64c952b86a41200ad714ae48" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "cli" -version = "0.1.0" -dependencies = [ - "clap", - "hex", - "log", - "primitive-types", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "solana-clap-utils", - "solana-cli-config", - "solana-client", - "solana-faucet", - "solana-logger", - "solana-sdk", - "solana-transaction-status", - "spl-token 1.0.6 (git+https://github.com/solana-labs/solana-program-library)", - "thiserror", - "tungstenite 0.11.1", - "url", - "wormhole-bridge", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "console" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "termios", - "unicode-width", - "winapi 0.3.9", - "winapi-util", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - -[[package]] -name = "cpuid-bool" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" - -[[package]] -name = "crossbeam-deque" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if", - "lazy_static", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-mac" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -dependencies = [ - "generic-array 0.12.3", - "subtle 1.0.0", -] - -[[package]] -name = "curve25519-dalek" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core", - "subtle 2.2.3", - "zeroize", -] - -[[package]] -name = "dialoguer" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" -dependencies = [ - "console", - "lazy_static", - "tempfile", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.3", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.3", -] - -[[package]] -name = "dirs" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" -dependencies = [ - "cfg-if", - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", -] - -[[package]] -name = "dtoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" - -[[package]] -name = "ed25519" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf038a7b6fd7ef78ad3348b63f3a17550877b0e28f8d68bcc94894d1412158bc" -dependencies = [ - "serde", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand", - "serde", - "sha2", - "zeroize", -] - -[[package]] -name = "either" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "synstructure", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "fixed-hash" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" - -[[package]] -name = "futures-channel" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" - -[[package]] -name = "futures-io" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" - -[[package]] -name = "futures-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" -dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "futures-sink" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" - -[[package]] -name = "futures-task" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" -dependencies = [ - "once_cell", -] - -[[package]] -name = "futures-util" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" -dependencies = [ - "futures-core", - "futures-io", - "futures-macro", - "futures-task", - "memchr", - "pin-project", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60fb4bb6bba52f78a471264d9a3b7d026cc0af47b22cd2cffbc0b787ca003e63" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "gethostname" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "getrandom" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" - -[[package]] -name = "h2" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio 0.2.22", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" -dependencies = [ - "autocfg", -] - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" - -[[package]] -name = "hidapi" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6ffb97f2ec5835ec73bcea5256fc2cd57a13c5958230778ef97f11900ba661" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "hmac" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" -dependencies = [ - "crypto-mac", - "digest 0.8.1", -] - -[[package]] -name = "http" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -dependencies = [ - "bytes 0.5.6", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "hyper" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project", - "socket2", - "time", - "tokio 0.2.22", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" -dependencies = [ - "bytes 0.5.6", - "futures-util", - "hyper", - "log", - "rustls", - "tokio 0.2.22", - "tokio-rustls", - "webpki", -] - -[[package]] -name = "idna" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "indexmap" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "indicatif" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" -dependencies = [ - "console", - "lazy_static", - "number_prefix", - "regex", -] - -[[package]] -name = "input_buffer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" -dependencies = [ - "bytes 0.5.6", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipnet" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" - -[[package]] -name = "jobserver" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonrpc-core" -version = "14.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62" -dependencies = [ - "futures", - "log", - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] - -[[package]] -name = "libc" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" - -[[package]] -name = "linked-hash-map" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "memoffset" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.6.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "native-tls" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "net2" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "nix" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "void", -] - -[[package]] -name = "num-derive" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "num-derive" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0396233fb2d5b0ae3f05ff6aba9a09185f7f6e70f87fb01147d545f85364665" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "num-integer" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "number_prefix" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" - -[[package]] -name = "object" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" - -[[package]] -name = "once_cell" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" -dependencies = [ - "parking_lot 0.10.2", -] - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" - -[[package]] -name = "openssl-sys" -version = "0.9.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parity-scale-codec" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d38aeaffc032ec69faa476b3caaca8d4dd7f3f798137ff30359e5c7869ceb6" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "serde", -] - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api", - "parking_lot_core 0.6.2", - "rustc_version", -] - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api", - "parking_lot_core 0.7.2", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "smallvec 1.4.1", - "winapi 0.3.9", -] - -[[package]] -name = "pbkdf2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -dependencies = [ - "byteorder", - "crypto-mac", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pin-project" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" - -[[package]] -name = "ppv-lite86" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" - -[[package]] -name = "primitive-types" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8" -dependencies = [ - "fixed-hash", - "impl-codec", - "uint", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" - -[[package]] -name = "proc-macro-nested" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" -dependencies = [ - "unicode-xid 0.2.1", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -dependencies = [ - "proc-macro2 1.0.19", -] - -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom", - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rayon" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" -dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_users" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -dependencies = [ - "getrandom", - "redox_syscall", - "rust-argon2", -] - -[[package]] -name = "regex" -version = "1.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", -] - -[[package]] -name = "regex-syntax" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" - -[[package]] -name = "remove_dir_all" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "reqwest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" -dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite", - "rustls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio 0.2.22", - "tokio-rustls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" -dependencies = [ - "cc", - "lazy_static", - "libc", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "rpassword" -version = "4.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "rust-argon2" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" -dependencies = [ - "base64 0.11.0", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" -dependencies = [ - "base64 0.12.3", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustversion" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bdc5e856e51e685846fb6c13a1f5e5432946c2c90501bdc76a1319f19e29da" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "serde_json" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -dependencies = [ - "dtoa", - "itoa", - "serde", - "url", -] - -[[package]] -name = "serde_yaml" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3e2dd40a7cdc18ca80db804b7f461a39bb721160a85c9a1fa30134bf3c02a5" -dependencies = [ - "dtoa", - "linked-hash-map", - "serde", - "yaml-rust", -] - -[[package]] -name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha-1" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpuid-bool", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "signature" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "smallvec" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" - -[[package]] -name = "socket2" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi 0.3.9", -] - -[[package]] -name = "solana-account-decoder" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87caa87fb0a2775180e617610c9878ada40e77d862d32c0aff4a6ed66280d58c" -dependencies = [ - "Inflector", - "bincode", - "bs58", - "lazy_static", - "serde", - "serde_derive", - "serde_json", - "solana-sdk", - "solana-vote-program", - "spl-token 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror", -] - -[[package]] -name = "solana-clap-utils" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e94f2ed64c0b80bb502bd1fe00dc75f06d22addf71971bc634f748376a2c5e" -dependencies = [ - "chrono", - "clap", - "rpassword", - "solana-remote-wallet", - "solana-sdk", - "thiserror", - "tiny-bip39", - "url", -] - -[[package]] -name = "solana-cli-config" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff59e68df0fed618ebac0906739dcf66b0ba425d3d8ac252f71accb1a63fca0" -dependencies = [ - "dirs", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "url", -] - -[[package]] -name = "solana-client" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964ae6b8e4c10c7532f76f579749043ed332ee2ac0fd5ca78b77df74042ff5b0" -dependencies = [ - "bincode", - "bs58", - "indicatif", - "jsonrpc-core", - "log", - "rayon", - "reqwest", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-net-utils", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "thiserror", - "tungstenite 0.10.1", - "url", -] - -[[package]] -name = "solana-config-program" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4460626e2d6de0f2096485010eab0d4a0865d32356299b8bb9c9c93cf99e7b" -dependencies = [ - "bincode", - "chrono", - "log", - "serde", - "serde_derive", - "solana-sdk", -] - -[[package]] -name = "solana-crate-features" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ce44be0cf411c28919c5d2af9b87dcaf7a631df66494eef1134e12fa8916b6" -dependencies = [ - "backtrace", - "bytes 0.4.12", - "cc", - "curve25519-dalek", - "ed25519-dalek", - "either", - "failure", - "lazy_static", - "libc", - "rand_chacha", - "regex-syntax", - "reqwest", - "serde", - "syn 0.15.44", - "syn 1.0.38", - "tokio 0.1.22", - "winapi 0.3.9", -] - -[[package]] -name = "solana-faucet" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b671ff5988c308e85466f6e2253cbe6679d67b7d1a10d60c4c9b2d45e07ae0" -dependencies = [ - "bincode", - "byteorder", - "bytes 0.4.12", - "clap", - "log", - "serde", - "serde_derive", - "solana-clap-utils", - "solana-logger", - "solana-metrics", - "solana-sdk", - "solana-version", - "tokio 0.1.22", - "tokio-codec", -] - -[[package]] -name = "solana-logger" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c7ac685637629a11a6cd8d41f8b69c99f6deff8cf2a5ffdb1d5f659d81a7a4" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - -[[package]] -name = "solana-metrics" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e15c16f8db726d70710b461b27911e9321c653eeed5b1250bebc74bbb110be1" -dependencies = [ - "env_logger", - "gethostname", - "lazy_static", - "log", - "reqwest", - "solana-sdk", -] - -[[package]] -name = "solana-net-utils" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce583800adbcf6bc7dbdc1bcb973cde80c2c1996544f48c1786bb4b72cd5ed9" -dependencies = [ - "bincode", - "bytes 0.4.12", - "clap", - "log", - "nix", - "rand", - "serde", - "serde_derive", - "socket2", - "solana-clap-utils", - "solana-logger", - "solana-version", - "tokio 0.1.22", - "tokio-codec", - "url", -] - -[[package]] -name = "solana-remote-wallet" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0b488009a22dd0c21e7a26bdc2a31e990d0cd8161eb5bcc59e899bb3cbd158" -dependencies = [ - "base32", - "console", - "dialoguer", - "hidapi", - "log", - "num-derive 0.3.1", - "num-traits", - "parking_lot 0.10.2", - "semver", - "solana-sdk", - "thiserror", - "url", -] - -[[package]] -name = "solana-sdk" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5502cfd8063437ac2b289b525cff9c271f59f3c267be6e2f6e8256df842d0d96" -dependencies = [ - "assert_matches", - "bincode", - "bs58", - "bv", - "byteorder", - "chrono", - "curve25519-dalek", - "ed25519-dalek", - "generic-array 0.14.3", - "hex", - "hmac", - "itertools", - "log", - "memmap", - "num-derive 0.3.1", - "num-traits", - "pbkdf2", - "rand", - "rand_chacha", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2", - "solana-crate-features", - "solana-logger", - "solana-sdk-macro", - "solana-sdk-macro-frozen-abi", - "thiserror", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ea42a0ab1199059e60b00bebd58156bc6a8c89672fbb78bd474d98c49d330c" -dependencies = [ - "bs58", - "proc-macro2 1.0.19", - "quote 1.0.7", - "rustversion", - "syn 1.0.38", -] - -[[package]] -name = "solana-sdk-macro-frozen-abi" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd83d11379007984161d413872ed8ba1f94c7625967d1a8de6f1e08215eede7" -dependencies = [ - "lazy_static", - "proc-macro2 1.0.19", - "quote 1.0.7", - "rustc_version", - "syn 1.0.38", -] - -[[package]] -name = "solana-stake-program" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc4f7c409612f5a032f5666aa00af973a91cb63a04c1990a88247d7fe0c3f8b" -dependencies = [ - "bincode", - "log", - "num-derive 0.3.1", - "num-traits", - "rustc_version", - "serde", - "serde_derive", - "solana-config-program", - "solana-metrics", - "solana-sdk", - "solana-sdk-macro-frozen-abi", - "solana-vote-program", - "thiserror", -] - -[[package]] -name = "solana-transaction-status" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c15cafac36d23d432a5fb2bdee4bc8b4dcab353c3a11a2a8472f1184c225ebd" -dependencies = [ - "Inflector", - "bincode", - "bs58", - "lazy_static", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-sdk", - "solana-stake-program", - "solana-vote-program", - "spl-memo", - "spl-token 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror", -] - -[[package]] -name = "solana-version" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9849b17e4a632ae09d1dc6a94bd3adf42b4a21baca2703d190f4c9a23549b0" -dependencies = [ - "log", - "rustc_version", - "serde", - "serde_derive", - "solana-logger", - "solana-sdk", - "solana-sdk-macro-frozen-abi", -] - -[[package]] -name = "solana-vote-program" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd63110b90df800b551d014005a59bd86d2fff5422851bc476f1099d7c30d1" -dependencies = [ - "bincode", - "log", - "num-derive 0.3.1", - "num-traits", - "rustc_version", - "serde", - "serde_derive", - "solana-logger", - "solana-metrics", - "solana-sdk", - "solana-sdk-macro-frozen-abi", - "thiserror", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spl-memo" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b303bab17e0c696de6d7550ba6f05a5a6dbf5c5d1597e68a4592899072e1c07a" -dependencies = [ - "solana-sdk", -] - -[[package]] -name = "spl-token" -version = "1.0.6" -source = "git+https://github.com/solana-labs/solana-program-library#4170c1b3c9940ac3ec992e0e0a4fb81f8d5401a3" -dependencies = [ - "cbindgen", - "num-derive 0.3.1", - "num-traits", - "remove_dir_all", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "spl-token" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c8482ae4aac6bb7d73aef79df5fb403a16a0cfbe200442532cff6b98613383" -dependencies = [ - "cbindgen", - "num-derive 0.2.5", - "num-traits", - "remove_dir_all", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - -[[package]] -name = "syn" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "unicode-xid 0.2.1", -] - -[[package]] -name = "synstructure" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "unicode-xid 0.2.1", -] - -[[package]] -name = "tempfile" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -dependencies = [ - "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "termcolor" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "terminal_size" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a14cd9f8c72704232f0bfc8455c0e861f0ad4eb60cc9ec8a170e231414c1e13" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "termios" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0fcee7b24a25675de40d5bb4de6e41b0df07bc9856295e7e2b3a3600c400c2" -dependencies = [ - "libc", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", -] - -[[package]] -name = "thread_local" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "tiny-bip39" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" -dependencies = [ - "failure", - "hmac", - "once_cell", - "pbkdf2", - "rand", - "rustc-hash", - "sha2", - "unicode-normalization", -] - -[[package]] -name = "tinyvec" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" - -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures", - "mio", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "memchr", - "mio", - "num_cpus", - "pin-project-lite", - "slab", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures", - "tokio-io", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils", - "futures", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures", - "log", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils", - "futures", - "lazy_static", - "log", - "mio", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", -] - -[[package]] -name = "tokio-rustls" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" -dependencies = [ - "futures-core", - "rustls", - "tokio 0.2.22", - "webpki", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils", - "futures", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils", - "futures", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures", - "log", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "libc", - "log", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio 0.2.22", -] - -[[package]] -name = "toml" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" -dependencies = [ - "serde", -] - -[[package]] -name = "tower-service" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" - -[[package]] -name = "tracing" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aae59226cf195d8e74d4b34beae1859257efb4e5fed3f147d2dc2c7d372178" -dependencies = [ - "cfg-if", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d593f98af59ebc017c0648f0117525db358745a8894a8d684e185ba3f45954f9" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "tungstenite" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" -dependencies = [ - "base64 0.11.0", - "byteorder", - "bytes 0.5.6", - "http", - "httparse", - "input_buffer", - "log", - "native-tls", - "rand", - "sha-1 0.8.2", - "url", - "utf-8", -] - -[[package]] -name = "tungstenite" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" -dependencies = [ - "base64 0.12.3", - "byteorder", - "bytes 0.5.6", - "http", - "httparse", - "input_buffer", - "log", - "native-tls", - "rand", - "sha-1 0.9.1", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" - -[[package]] -name = "uint" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "429ffcad8c8c15f874578c7337d156a3727eb4a1c2374c0ae937ad9a9b748c80" -dependencies = [ - "byteorder", - "crunchy", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" - -[[package]] -name = "unicode-width" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -dependencies = [ - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" - -[[package]] -name = "vcpkg" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasm-bindgen" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" -dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" -dependencies = [ - "quote 1.0.7", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" - -[[package]] -name = "web-sys" -version = "0.3.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" -dependencies = [ - "webpki", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "wormhole-bridge" -version = "0.1.0" -dependencies = [ - "byteorder", - "num-derive 0.2.5", - "num-traits", - "primitive-types", - "remove_dir_all", - "sha3", - "solana-sdk", - "spl-token 1.0.6 (git+https://github.com/solana-labs/solana-program-library)", - "thiserror", - "zerocopy", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "yaml-rust" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "zerocopy" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6580539ad917b7c026220c4b3f2c08d52ce54d6ce0dc491e66002e35388fab46" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb" -dependencies = [ - "proc-macro2 1.0.19", - "syn 1.0.38", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.38", - "synstructure", -] diff --git a/solana/cli/Cargo.toml b/solana/cli/Cargo.toml index 0f1ea4f8..d3bd294c 100644 --- a/solana/cli/Cargo.toml +++ b/solana/cli/Cargo.toml @@ -8,15 +8,14 @@ edition = "2018" [dependencies] clap = "2.33.0" -solana-clap-utils = { version = "1.3.3"} -solana-cli-config = { version = "1.3.3" } -solana-logger = { version = "1.3.3" } -solana-sdk = { version = "1.3.3" } -solana-client = { version = "=1.3.3" } -solana-faucet = "1.3.3" -solana-transaction-status = "1.3.3" -solana-account-decoder = { version = "1.3.3" } -spl-token = { package = "spl-token", git = "https://github.com/solana-labs/solana-program-library" } +solana-clap-utils = { version = "1.3.11"} +solana-cli-config = { version = "1.3.11" } +solana-logger = { version = "1.3.11" } +solana-sdk = { version = "1.3.11" } +solana-client = { version = "1.3.11" } +solana-faucet = "1.3.11" +solana-account-decoder = { version = "1.3.11" } +spl-token = "=2.0.3" wormhole-bridge = { path = "../bridge" } primitive-types = {version ="0.7.2"} hex = "0.4.2" diff --git a/solana/cli/src/faucet.rs b/solana/cli/src/faucet.rs index 7aa1e8c6..e4cd38de 100644 --- a/solana/cli/src/faucet.rs +++ b/solana/cli/src/faucet.rs @@ -1,14 +1,15 @@ -use crate::CommmandResult; +use std::{error, net::SocketAddr, thread::sleep, time::Duration}; + use solana_client::rpc_client::RpcClient; use solana_faucet::faucet::request_airdrop_transaction; -use solana_sdk::hash::Hash; -use solana_sdk::pubkey::Pubkey; -use solana_sdk::signature::{Signature, Signer, SignerError}; -use solana_sdk::transaction::Transaction; -use std::error; -use std::net::SocketAddr; -use std::thread::sleep; -use std::time::Duration; +use solana_sdk::{ + hash::Hash, + pubkey::Pubkey, + signature::{Signature, Signer, SignerError}, + transaction::Transaction, +}; + +use crate::CommmandResult; // Quick and dirty Keypair that assumes the client will do retries but not update the // blockhash. If the client updates the blockhash, the signature will be invalid. diff --git a/solana/cli/src/main.rs b/solana/cli/src/main.rs index f50f093a..b756aeeb 100644 --- a/solana/cli/src/main.rs +++ b/solana/cli/src/main.rs @@ -1,7 +1,4 @@ -use std::fmt::Display; -use std::net::{SocketAddr, ToSocketAddrs}; -use std::str::FromStr; -use std::{mem::size_of, process::exit}; +use std::{fmt::Display, mem::size_of, net::ToSocketAddrs, process::exit}; use clap::{ crate_description, crate_name, crate_version, value_t, value_t_or_exit, App, AppSettings, Arg, @@ -10,16 +7,13 @@ use clap::{ use hex; use primitive_types::U256; use solana_account_decoder::{parse_token::TokenAccountType, UiAccountData}; -use solana_clap_utils::input_parsers::value_of; -use solana_clap_utils::input_validators::is_derivation; use solana_clap_utils::{ - input_parsers::{keypair_of, pubkey_of}, + input_parsers::{keypair_of, pubkey_of, value_of}, input_validators::{is_amount, is_keypair, is_pubkey_or_keypair, is_url}, }; -use solana_client::client_error::ClientError; -use solana_client::rpc_config::RpcSendTransactionConfig; -use solana_client::{rpc_client::RpcClient, rpc_request::TokenAccountsFilter}; -use solana_sdk::system_instruction::create_account; +use solana_client::{ + rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig, rpc_request::TokenAccountsFilter, +}; use solana_sdk::{ commitment_config::CommitmentConfig, native_token::*, @@ -32,11 +26,11 @@ use spl_token::{ self, instruction::*, native_mint, + pack::Pack, state::{Account, Mint}, }; -use spl_bridge::instruction::*; -use spl_bridge::state::*; +use spl_bridge::{instruction::*, state::*}; use crate::faucet::request_and_confirm_airdrop; @@ -79,7 +73,8 @@ fn command_deploy_bridge( let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; check_fee_payer_balance( config, - minimum_balance_for_rent_exemption + fee_calculator.calculate_fee(&transaction.message()), + minimum_balance_for_rent_exemption + + fee_calculator.calculate_fee(&transaction.message(), None), )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) @@ -92,7 +87,10 @@ fn command_poke_proposal(config: &Config, bridge: &Pubkey, proposal: &Pubkey) -> let mut transaction = Transaction::new_with_payer(&[ix], Some(&config.fee_payer.pubkey())); let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) } @@ -127,14 +125,14 @@ fn command_lock_tokens( decimals: 0, } } - Err(e) => AssetMeta { + Err(_e) => AssetMeta { address: token.to_bytes(), chain: CHAIN_ID_SOLANA, decimals: 0, }, }; - let mut instructions = vec![ + let instructions = vec![ approve( &spl_token::id(), &account, @@ -169,27 +167,8 @@ fn command_lock_tokens( let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; check_fee_payer_balance( config, - minimum_balance_for_rent_exemption + fee_calculator.calculate_fee(&transaction.message()), - )?; - transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); - Ok(Some(transaction)) -} - -fn command_submit_vaa(config: &Config, bridge: &Pubkey, vaa: &[u8]) -> CommmandResult { - println!("Submitting VAA"); - - let minimum_balance_for_rent_exemption = config - .rpc_client - .get_minimum_balance_for_rent_exemption(size_of::())?; - - let ix = post_vaa(bridge, &config.owner.pubkey(), vaa.to_vec())?; - - let mut transaction = Transaction::new_with_payer(&[ix], Some(&config.fee_payer.pubkey())); - - let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance( - config, - minimum_balance_for_rent_exemption + fee_calculator.calculate_fee(&transaction.message()), + minimum_balance_for_rent_exemption + + fee_calculator.calculate_fee(&transaction.message(), None), )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) @@ -231,7 +210,7 @@ fn command_create_token(config: &Config, decimals: u8) -> CommmandResult { let minimum_balance_for_rent_exemption = config .rpc_client - .get_minimum_balance_for_rent_exemption(size_of::())?; + .get_minimum_balance_for_rent_exemption(Mint::LEN)?; let mut transaction = Transaction::new_with_payer( &[ @@ -239,15 +218,14 @@ fn command_create_token(config: &Config, decimals: u8) -> CommmandResult { &config.fee_payer.pubkey(), &token.pubkey(), minimum_balance_for_rent_exemption, - size_of::() as u64, + Mint::LEN as u64, &spl_token::id(), ), initialize_mint( &spl_token::id(), &token.pubkey(), + &config.owner.pubkey(), None, - Some(&config.owner.pubkey()), - 0, decimals, )?, ], @@ -257,7 +235,8 @@ fn command_create_token(config: &Config, decimals: u8) -> CommmandResult { let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; check_fee_payer_balance( config, - minimum_balance_for_rent_exemption + fee_calculator.calculate_fee(&transaction.message()), + minimum_balance_for_rent_exemption + + fee_calculator.calculate_fee(&transaction.message(), None), )?; transaction.sign( &[&config.fee_payer, &config.owner, &token], @@ -272,7 +251,7 @@ fn command_create_account(config: &Config, token: Pubkey) -> CommmandResult { let minimum_balance_for_rent_exemption = config .rpc_client - .get_minimum_balance_for_rent_exemption(size_of::())?; + .get_minimum_balance_for_rent_exemption(Account::LEN)?; let mut transaction = Transaction::new_with_payer( &[ @@ -280,7 +259,7 @@ fn command_create_account(config: &Config, token: Pubkey) -> CommmandResult { &config.fee_payer.pubkey(), &account.pubkey(), minimum_balance_for_rent_exemption, - size_of::() as u64, + Account::LEN as u64, &spl_token::id(), ), initialize_account( @@ -296,7 +275,8 @@ fn command_create_account(config: &Config, token: Pubkey) -> CommmandResult { let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; check_fee_payer_balance( config, - minimum_balance_for_rent_exemption + fee_calculator.calculate_fee(&transaction.message()), + minimum_balance_for_rent_exemption + + fee_calculator.calculate_fee(&transaction.message(), None), )?; transaction.sign( &[&config.fee_payer, &config.owner, &account], @@ -314,10 +294,11 @@ fn command_assign(config: &Config, account: Pubkey, new_owner: Pubkey) -> Commma ); let mut transaction = Transaction::new_with_payer( - &[set_owner( + &[spl_token::instruction::set_authority( &spl_token::id(), &account, - &new_owner, + Some(&new_owner), + AuthorityType::AccountOwner, &config.owner.pubkey(), &[], )?], @@ -325,7 +306,10 @@ fn command_assign(config: &Config, account: Pubkey, new_owner: Pubkey) -> Commma ); let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) } @@ -361,7 +345,10 @@ fn command_transfer( ); let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) } @@ -373,12 +360,19 @@ fn command_burn(config: &Config, source: Pubkey, ui_amount: f64) -> CommmandResu .rpc_client .get_token_account_balance_with_commitment(&source, config.commitment_config)? .value; - + let source_account = config + .rpc_client + .get_account_with_commitment(&source, config.commitment_config)? + .value + .unwrap_or_default(); + let data = source_account.data.to_vec(); + let mint_pubkey = Account::unpack_from_slice(&data)?.mint; let amount = spl_token::ui_amount_to_amount(ui_amount, source_token_balance.decimals); let mut transaction = Transaction::new_with_payer( &[burn( &spl_token::id(), &source, + &mint_pubkey, &config.owner.pubkey(), &[], amount, @@ -387,7 +381,10 @@ fn command_burn(config: &Config, source: Pubkey, ui_amount: f64) -> CommmandResu ); let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) } @@ -422,7 +419,10 @@ fn command_mint( ); let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) } @@ -453,7 +453,10 @@ fn command_wrap(config: &Config, sol: f64) -> CommmandResult { let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; check_owner_balance(config, lamports)?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign( &[&config.fee_payer, &config.owner, &account], recent_blockhash, @@ -486,7 +489,10 @@ fn command_unwrap(config: &Config, address: Pubkey) -> CommmandResult { ); let (recent_blockhash, fee_calculator) = config.rpc_client.get_recent_blockhash()?; - check_fee_payer_balance(config, fee_calculator.calculate_fee(&transaction.message()))?; + check_fee_payer_balance( + config, + fee_calculator.calculate_fee(&transaction.message(), None), + )?; transaction.sign(&[&config.fee_payer, &config.owner], recent_blockhash); Ok(Some(transaction)) } @@ -1148,12 +1154,6 @@ fn main() { &config, &bridge, account, token, amount, chain, recipient, nonce, ) } - ("postvaa", Some(arg_matches)) => { - let bridge = pubkey_of(arg_matches, "bridge").unwrap(); - let vaa_string: String = value_of(arg_matches, "vaa").unwrap(); - let vaa = hex::decode(vaa_string).unwrap(); - command_submit_vaa(&config, &bridge, vaa.as_slice()) - } ("poke", Some(arg_matches)) => { let bridge = pubkey_of(arg_matches, "bridge").unwrap(); let proposal = pubkey_of(arg_matches, "proposal").unwrap(); @@ -1189,6 +1189,7 @@ fn main() { RpcSendTransactionConfig { // TODO: move to https://github.com/solana-labs/solana/pull/11792 skip_preflight: true, + preflight_commitment: None, }, )?; println!("Signature: {}", signature); diff --git a/solana/rustfmt.toml b/solana/rustfmt.toml new file mode 100644 index 00000000..7d2cf549 --- /dev/null +++ b/solana/rustfmt.toml @@ -0,0 +1 @@ +merge_imports = true diff --git a/third_party/solana/Add_crypto_syscalls.patch b/third_party/solana/Add_crypto_syscalls.patch index 1597559d..3e6e43f4 100644 --- a/third_party/solana/Add_crypto_syscalls.patch +++ b/third_party/solana/Add_crypto_syscalls.patch @@ -1,722 +1,3 @@ -Index: Cargo.lock -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- Cargo.lock (revision c8b40da7abf11c1d880436b0b3ed51261900a986) -+++ Cargo.lock (revision d0901065ee3d9b73483be7d8101ef124a2ee7dda) -@@ -274,12 +274,22 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" - dependencies = [ -- "block-padding", -+ "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.3", - ] - -+[[package]] -+name = "block-buffer" -+version = "0.9.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -+dependencies = [ -+ "block-padding 0.2.1", -+ "generic-array 0.14.3", -+] -+ - [[package]] - name = "block-padding" - version = "0.1.5" -@@ -289,6 +299,12 @@ - "byte-tools", - ] - -+[[package]] -+name = "block-padding" -+version = "0.2.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -+ - [[package]] - name = "bs58" - version = "0.3.1" -@@ -633,6 +649,12 @@ - "lazy_static", - ] - -+[[package]] -+name = "crunchy" -+version = "0.2.2" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -+ - [[package]] - name = "crypto-mac" - version = "0.7.0" -@@ -682,7 +704,7 @@ - checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" - dependencies = [ - "byteorder", -- "digest", -+ "digest 0.8.1", - "rand_core 0.5.1", - "subtle 2.2.2", - "zeroize", -@@ -725,6 +747,15 @@ - "generic-array 0.12.3", - ] - -+[[package]] -+name = "digest" -+version = "0.9.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -+dependencies = [ -+ "generic-array 0.14.3", -+] -+ - [[package]] - name = "dir-diff" - version = "0.3.2" -@@ -1316,7 +1347,18 @@ - checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" - dependencies = [ - "crypto-mac", -- "digest", -+ "digest 0.8.1", -+] -+ -+[[package]] -+name = "hmac-drbg" -+version = "0.2.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" -+dependencies = [ -+ "digest 0.8.1", -+ "generic-array 0.12.3", -+ "hmac", - ] - - [[package]] -@@ -1750,6 +1792,12 @@ - "ws", - ] - -+[[package]] -+name = "keccak" -+version = "0.1.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -+ - [[package]] - name = "kernel32-sys" - version = "0.2.2" -@@ -1818,6 +1866,22 @@ - "libc", - ] - -+[[package]] -+name = "libsecp256k1" -+version = "0.3.5" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" -+dependencies = [ -+ "arrayref", -+ "crunchy", -+ "digest 0.8.1", -+ "hmac-drbg", -+ "rand 0.7.3", -+ "sha2", -+ "subtle 2.2.2", -+ "typenum", -+] -+ - [[package]] - name = "linked-hash-map" - version = "0.5.3" -@@ -2146,6 +2210,12 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -+[[package]] -+name = "opaque-debug" -+version = "0.3.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -+ - [[package]] - name = "openssl" - version = "0.10.29" -@@ -3098,10 +3168,10 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" - dependencies = [ -- "block-buffer", -- "digest", -+ "block-buffer 0.7.3", -+ "digest 0.8.1", - "fake-simd", -- "opaque-debug", -+ "opaque-debug 0.2.3", - ] - - [[package]] -@@ -3116,10 +3186,22 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" - dependencies = [ -- "block-buffer", -- "digest", -+ "block-buffer 0.7.3", -+ "digest 0.8.1", - "fake-simd", -- "opaque-debug", -+ "opaque-debug 0.2.3", -+] -+ -+[[package]] -+name = "sha3" -+version = "0.9.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -+dependencies = [ -+ "block-buffer 0.9.0", -+ "digest 0.9.0", -+ "keccak", -+ "opaque-debug 0.3.0", - ] - - [[package]] -@@ -3376,12 +3458,16 @@ - name = "solana-bpf-loader-program" - version = "1.4.0" - dependencies = [ -+ "arrayref", - "bincode", - "byteorder", -+ "hex", -+ "libsecp256k1", - "num-derive 0.3.0", - "num-traits", - "rand 0.7.3", - "rustversion", -+ "sha3", - "solana-runtime", - "solana-sdk 1.4.0", - "solana_rbpf", -Index: programs/bpf_loader/Cargo.toml -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- programs/bpf_loader/Cargo.toml (revision c8b40da7abf11c1d880436b0b3ed51261900a986) -+++ programs/bpf_loader/Cargo.toml (revision d0901065ee3d9b73483be7d8101ef124a2ee7dda) -@@ -17,6 +17,10 @@ - solana-sdk = { path = "../../sdk", version = "1.4.0" } - solana_rbpf = "=0.1.28" - thiserror = "1.0" -+libsecp256k1 = "0.3.5" -+sha3 = "0.9.1" -+arrayref = "0.3.6" -+hex = "0.4.2" - - [dev-dependencies] - rand = "0.7.3" -Index: programs/bpf_loader/src/crypto.rs -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- programs/bpf_loader/src/crypto.rs (revision d0901065ee3d9b73483be7d8101ef124a2ee7dda) -+++ programs/bpf_loader/src/crypto.rs (revision d0901065ee3d9b73483be7d8101ef124a2ee7dda) -@@ -0,0 +1,171 @@ -+pub extern crate secp256k1; -+ -+use std::io::Write; -+ -+use num_traits::AsPrimitive; -+use secp256k1::curve::{Affine, ECMULT_CONTEXT, ECMULT_GEN_CONTEXT, ECMultGenContext, Field, Jacobian, Scalar}; -+use sha3::Digest; -+ -+use self::secp256k1::{Error, PublicKey}; -+ -+pub enum SchnorrError { -+ InvalidPubKey -+} -+ -+#[repr(C)] -+pub struct EcrecoverInput { -+ pub signature: [u8; 65], -+ pub message: [u8; 32], -+} -+ -+#[repr(C)] -+pub struct EcrecoverOutput { -+ pub address: [u8; 20], -+} -+ -+#[repr(C)] -+pub struct SchnorrifyInput { -+ message: [u8; 32], -+ addr: [u8; 20], -+ signature: [u8; 32], -+ pub_key: [u8; 64], -+} -+ -+impl SchnorrifyInput { -+ pub fn verify(&self) -> bool { -+ let sig = SchnorrSignature { -+ address: self.addr, -+ signature: self.signature, -+ }; -+ -+ let pub_key = SchnorrPublicKey::deserialize(&self.pub_key); -+ -+ match sig.verify_signature(&self.message, &pub_key) { -+ Ok(res) => res, -+ Err(_) => false -+ } -+ } -+} -+ -+pub struct SchnorrPublicKey { -+ x: Field, -+ y: Field, -+} -+ -+pub struct SchnorrSignature { -+ pub address: [u8; 20], -+ pub signature: [u8; 32], -+} -+ -+impl SchnorrPublicKey { -+ pub fn deserialize(d: &[u8; 64]) -> SchnorrPublicKey { -+ let mut x = Field::default(); -+ let mut y = Field::default(); -+ x.set_b32(array_ref![d,0,32]); -+ y.set_b32(array_ref![d,32,32]); -+ x.normalize(); -+ y.normalize(); -+ SchnorrPublicKey { -+ x, -+ y, -+ } -+ } -+} -+ -+impl SchnorrSignature { -+ pub fn verify_signature(&self, msg: &[u8; 32], pub_key: &SchnorrPublicKey) -> Result { -+ let mut af = Affine::default(); -+ af.set_xy(&pub_key.x, &pub_key.y); -+ let mut pubkey_j: Jacobian = Jacobian::default(); -+ pubkey_j.set_ge(&af); -+ -+ // Verify that the pubkey is a curve point -+ let mut elem = Affine::default(); -+ if !elem.set_xo_var(&pub_key.x, pub_key.y.is_odd()) { -+ return Err(SchnorrError::InvalidPubKey); -+ } -+ elem.y.normalize(); -+ -+ // Make sure that the ordinates are equal -+ if elem.y.b32() != pub_key.y.b32() { -+ return Err(SchnorrError::InvalidPubKey); -+ } -+ -+ // Generate the challenge -+ let mut h = sha3::Keccak256::default(); -+ h.write(&pub_key.x.b32()); // pub key x coordinate -+ h.write(&[(pub_key.y.is_odd()).as_()]); // y parity -+ h.write(msg); // msg -+ h.write(&self.address); // nonceTimesGeneratorAddress -+ let challenge = h.finalize(); -+ -+ let mut e = Scalar::default(); -+ e.set_b32(array_ref![challenge,0,32]); -+ -+ let mut s = Scalar::default(); -+ s.set_b32(&self.signature); -+ -+ // Calculate s x G + e x P -+ let mut k: Jacobian = Jacobian::default(); -+ ECMULT_CONTEXT.ecmult(&mut k, &pubkey_j, &e, &s); -+ -+ let r = jacobian_to_normalized_affine(&k); -+ -+ // Generate Ethereum address from calculated point -+ let eth_addr = affine_to_eth_address(&r); -+ -+ // Verify that addr(k) == sig.address -+ Ok(eth_addr == self.address) -+ } -+} -+ -+fn affine_to_eth_address(a: &Affine) -> [u8; 20] { -+ let mut h = sha3::Keccak256::default(); -+ h.write(a.x.b32().as_ref()); // result key x coordinate -+ h.write(a.y.b32().as_ref()); // result key y coordinate -+ -+ let out = h.finalize(); -+ let mut out_addr = [0; 20]; -+ out_addr.copy_from_slice(&out[12..]); -+ -+ out_addr -+} -+ -+fn jacobian_to_normalized_affine(j: &Jacobian) -> Affine { -+ let mut r = Affine::default(); -+ r.set_gej(j); -+ r.x.normalize(); -+ r.y.normalize(); -+ -+ r -+} -+ -+#[cfg(test)] -+mod tests { -+ use std::io::Write; -+ -+ use hex; -+ -+ use crate::crypto::{SchnorrPublicKey, SchnorrSignature}; -+ -+ #[test] -+ fn verify_signature() { -+ let msggg = hex::decode("0194fdc2fa2ffcc041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d0b75").unwrap(); -+ let siggg = hex::decode("ee5884a66454baca985f4453c05394214a75dc38956ea39f12cc429f081aae4b").unwrap(); -+ let addr = hex::decode("9addd8a38fea7e1b94550e5bc249309a633dfa63").unwrap(); -+ let pb = hex::decode("ae92ce7553993f04400c6976f8cd4540ae076bf0131eec8b35ae0ff9fc577a901de834d0f62ae6ecbeec2124595b06bce078b8133b4dda3855cf346feb2b2ca2").unwrap(); -+ -+ let sig = SchnorrSignature { -+ address: *array_ref![addr,0,20], -+ signature: *array_ref![siggg,0,32], -+ }; -+ -+ let pub_key = SchnorrPublicKey::deserialize(array_ref![pb,0,64]); -+ -+ let msg = array_ref![msggg,0,32]; -+ match sig.verify_signature(msg, &pub_key) { -+ Ok(res) => assert!(res, "signature should be valid"), -+ Err(err) => assert!(false, "signature verification failed") -+ } -+ } -+} -Index: programs/bpf_loader/src/lib.rs -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- programs/bpf_loader/src/lib.rs (revision c8b40da7abf11c1d880436b0b3ed51261900a986) -+++ programs/bpf_loader/src/lib.rs (revision 745a97685408ff4249d96333a7885cd214639b70) -@@ -4,6 +4,10 @@ - pub mod deprecated; - pub mod serialization; - pub mod syscalls; -+pub mod crypto; -+ -+#[macro_use] -+extern crate arrayref; - - use crate::{ - bpf_verifier::VerifierError, -@@ -65,7 +69,7 @@ - ) -> Result<(EbpfVm<'a, BPFError>, MemoryRegion), EbpfError> { - let mut vm = EbpfVm::new(None)?; - vm.set_verifier(bpf_verifier::check)?; -- vm.set_max_instruction_count(100_000)?; -+ vm.set_max_instruction_count(1_000_000)?; - vm.set_elf(&prog)?; - - let heap_region = syscalls::register_syscalls(&mut vm, parameter_accounts, invoke_context)?; -Index: programs/bpf_loader/src/syscalls.rs -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- programs/bpf_loader/src/syscalls.rs (revision c8b40da7abf11c1d880436b0b3ed51261900a986) -+++ programs/bpf_loader/src/syscalls.rs (revision d0901065ee3d9b73483be7d8101ef124a2ee7dda) -@@ -1,10 +1,23 @@ --use crate::{alloc, BPFError}; --use alloc::Alloc; -+use std::{ -+ alloc::Layout, -+ cell::{RefCell, RefMut}, -+ convert::TryFrom, -+ mem::{align_of, size_of}, -+ rc::Rc, -+ slice::from_raw_parts_mut, -+ str::{from_utf8, Utf8Error}, -+}; -+ -+use secp256k1::{Error, PublicKey, RecoveryId, Signature}; -+use sha3::Digest; - use solana_rbpf::{ -- ebpf::{EbpfError, SyscallObject, ELF_INSN_DUMP_OFFSET, MM_HEAP_START}, -- memory_region::{translate_addr, MemoryRegion}, -+ ebpf::{EbpfError, ELF_INSN_DUMP_OFFSET, MM_HEAP_START, SyscallObject}, - EbpfVm, -+ memory_region::{MemoryRegion, translate_addr}, - }; -+use thiserror::Error as ThisError; -+ -+use alloc::Alloc; - use solana_runtime::message_processor::MessageProcessor; - use solana_sdk::{ - account::Account, -@@ -18,16 +31,16 @@ - program_error::ProgramError, - pubkey::{Pubkey, PubkeyError}, - }; --use std::{ -- alloc::Layout, -- cell::{RefCell, RefMut}, -- convert::TryFrom, -- mem::{align_of, size_of}, -- rc::Rc, -- slice::from_raw_parts_mut, -- str::{from_utf8, Utf8Error}, --}; --use thiserror::Error as ThisError; -+ -+use crate::{alloc, BPFError}; -+/// Program heap allocators are intended to allocate/free from a given -+/// chunk of memory. The specific allocator implementation is -+/// selectable at build-time. -+/// Only one allocator is currently supported -+ -+/// Simple bump allocator, never frees -+use crate::allocator_bump::BPFAllocator; -+use crate::crypto::{EcrecoverInput, EcrecoverOutput, SchnorrifyInput}; - - /// Error definitions - #[derive(Debug, ThisError)] -@@ -53,20 +66,13 @@ - #[error("Unaligned pointer")] - UnalignedPointer, - } -+ - impl From for EbpfError { - fn from(error: SyscallError) -> Self { - EbpfError::UserError(error.into()) - } - } - --/// Program heap allocators are intended to allocate/free from a given --/// chunk of memory. The specific allocator implementation is --/// selectable at build-time. --/// Only one allocator is currently supported -- --/// Simple bump allocator, never frees --use crate::allocator_bump::BPFAllocator; -- - /// Default program heap size, allocators - /// are expected to enforce this - const DEFAULT_HEAP_SIZE: usize = 32 * 1024; -@@ -114,6 +120,16 @@ - )?; - } - -+ // Signature verification -+ vm.register_syscall_with_context_ex( -+ "sol_verify_ethschnorr", -+ Box::new(SyscallSchorrify {}), -+ )?; -+ vm.register_syscall_with_context_ex( -+ "sol_ecrecover", -+ Box::new(SyscallEcrecover {}), -+ )?; -+ - // Memory allocator - let heap = vec![0_u8; DEFAULT_HEAP_SIZE]; - let heap_region = MemoryRegion::new_from_slice(&heap, MM_HEAP_START); -@@ -255,6 +271,7 @@ - pub struct SyscallLog { - logger: Rc>, - } -+ - impl SyscallObject for SyscallLog { - fn call( - &mut self, -@@ -284,6 +301,7 @@ - pub struct SyscallLogU64 { - logger: Rc>, - } -+ - impl SyscallObject for SyscallLogU64 { - fn call( - &mut self, -@@ -318,6 +336,7 @@ - pub struct SyscallSolAllocFree { - allocator: BPFAllocator, - } -+ - impl SyscallObject for SyscallSolAllocFree { - fn call( - &mut self, -@@ -380,6 +399,87 @@ - Ok(0) - } - -+/// Verify a ETH optimized Schnorr Signature -+pub struct SyscallEcrecover { -+} -+ -+impl SyscallObject for SyscallEcrecover { -+ fn call( -+ &mut self, -+ input: u64, -+ output: u64, -+ _arg3: u64, -+ _arg4: u64, -+ _arg5: u64, -+ ro_regions: &[MemoryRegion], -+ _rw_regions: &[MemoryRegion], -+ ) -> Result> { -+ let input = translate_type!( -+ EcrecoverInput, -+ input, -+ ro_regions -+ )?; -+ -+ let mut output = translate_type_mut!( -+ EcrecoverOutput, -+ output, -+ ro_regions -+ )?; -+ -+ let signature = match secp256k1::Signature::parse_slice(&input.signature[..64]) { -+ Ok(v) => v, -+ Err(_) => { -+ return Ok(0); -+ } -+ }; -+ -+ let recovery_id = match secp256k1::RecoveryId::parse(input.signature[64]) { -+ Ok(v) => v, -+ Err(_) => { return Ok(0); } -+ }; -+ -+ match secp256k1::recover(&secp256k1::Message::parse(&input.message), &signature, -+ &recovery_id) { -+ Ok(v) => { -+ let mut addr = [0u8; 20]; -+ addr.copy_from_slice(&sha3::Keccak256::digest(&v.serialize()[1..])[12..]); -+ output.address = addr; -+ } -+ Err(_) => { -+ return Ok(0); -+ } -+ } -+ -+ Ok(1) -+ } -+} -+ -+/// Verify a ETH optimized Schnorr Signature -+pub struct SyscallSchorrify { -+} -+ -+impl SyscallObject for SyscallSchorrify { -+ fn call( -+ &mut self, -+ addr: u64, -+ _arg2: u64, -+ _arg3: u64, -+ _arg4: u64, -+ _arg5: u64, -+ ro_regions: &[MemoryRegion], -+ _rw_regions: &[MemoryRegion], -+ ) -> Result> { -+ let input = translate_type!( -+ SchnorrifyInput, -+ addr, -+ ro_regions -+ )?; -+ let res = input.verify(); -+ -+ Ok(res as u64) -+ } -+} -+ - // Cross-program invocation syscalls - - struct AccountReferences<'a> { -@@ -422,6 +522,7 @@ - callers_keyed_accounts: &'a [KeyedAccount<'a>], - invoke_context: Rc>, - } -+ - impl<'a> SyscallProcessInstruction<'a> for SyscallProcessInstructionRust<'a> { - fn get_context_mut(&self) -> Result, EbpfError> { - self.invoke_context -@@ -443,7 +544,7 @@ - ix.accounts.len(), - ro_regions - )? -- .to_vec(); -+ .to_vec(); - let data = translate_slice!(u8, ix.data.as_ptr(), ix.data.len(), ro_regions)?.to_vec(); - Ok(Instruction { - program_id: ix.program_id, -@@ -558,6 +659,7 @@ - } - } - } -+ - impl<'a> SyscallObject for SyscallProcessInstructionRust<'a> { - fn call( - &mut self, -@@ -633,6 +735,7 @@ - callers_keyed_accounts: &'a [KeyedAccount<'a>], - invoke_context: Rc>, - } -+ - impl<'a> SyscallProcessInstruction<'a> for SyscallProcessSolInstructionC<'a> { - fn get_context_mut(&self) -> Result, EbpfError> { - self.invoke_context -@@ -770,6 +873,7 @@ - } - } - } -+ - impl<'a> SyscallObject for SyscallProcessSolInstructionC<'a> { - fn call( - &mut self, -@@ -821,10 +925,10 @@ - } - - if account.is_signer && // If message indicates account is signed -- !( // one of the following needs to be true: -- keyed_account.signer_key().is_some() // Signed in the parent instruction -- || signers.contains(&account.pubkey) // Signed by the program -- ) { -+ !( // one of the following needs to be true: -+ keyed_account.signer_key().is_some() // Signed in the parent instruction -+ || signers.contains(&account.pubkey) // Signed by the program -+ ) { - return Err(SyscallError::PrivilegeEscalation.into()); - } - } -@@ -1042,7 +1146,7 @@ - assert_eq!(string, "Gaggablaghblagh!"); - Ok(42) - }) -- .unwrap() -+ .unwrap() - ); - } - -@@ -1074,7 +1178,7 @@ - &[ro_region], - &[rw_region], - ) -- .unwrap(); -+ .unwrap(); - } - - #[test] Index: fetch-spl.sh IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP @@ -754,3 +35,64 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP Ok(TokenAccountType::Account(UiTokenAccount { mint: account.mint.to_string(), owner: account.owner.to_string(), +Index: programs/bpf_loader/src/bpf_verifier.rs +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- programs/bpf_loader/src/bpf_verifier.rs (revision 6563726f227414164c32a0373fa32b0f87fbd4e8) ++++ programs/bpf_loader/src/bpf_verifier.rs (date 1600862128332) +@@ -58,7 +58,7 @@ + if prog.len() % ebpf::INSN_SIZE != 0 { + return Err(VerifierError::ProgramLengthNotMultiple.into()); + } +- if prog.len() > ebpf::PROG_MAX_SIZE { ++ if prog.len() > ebpf::PROG_MAX_SIZE * 2 { + return Err(VerifierError::ProgramTooLarge(prog.len() / ebpf::INSN_SIZE).into()); + } + + +--- core/src/rpc.rs ++++ core/src/rpc.rs +@@ -2210,6 +2210,10 @@ impl RpcSol for RpcSolImpl { + return Err(RpcCustomError::TransactionSignatureVerificationFailure.into()); + } + ++ if let Err(e) = transaction.verify_precompiles() { ++ return Err(RpcCustomError::TransactionPrecompileVerificationFailure(e).into()); ++ } ++ + if meta.health.check() != RpcHealthStatus::Ok { + return Err(RpcCustomError::RpcNodeUnhealthy.into()); + } + +--- core/src/rpc_error.rs ++++ core/src/rpc_error.rs +@@ -7,6 +7,7 @@ const JSON_RPC_SERVER_ERROR_2: i64 = -32002; + const JSON_RPC_SERVER_ERROR_3: i64 = -32003; + const JSON_RPC_SERVER_ERROR_4: i64 = -32004; + const JSON_RPC_SERVER_ERROR_5: i64 = -32005; ++const JSON_RPC_SERVER_ERROR_6: i64 = -32006; + + pub enum RpcCustomError { + BlockCleanedUp { +@@ -22,6 +23,7 @@ pub enum RpcCustomError { + slot: Slot, + }, + RpcNodeUnhealthy, ++ TransactionPrecompileVerificationFailure(solana_sdk::transaction::TransactionError), + } + + impl From for Error { +@@ -58,6 +60,11 @@ impl From for Error { + message: "RPC node is unhealthy".to_string(), + data: None, + }, ++ RpcCustomError::TransactionPrecompileVerificationFailure(e) => Self { ++ code: ErrorCode::ServerError(JSON_RPC_SERVER_ERROR_6), ++ message: format!("Transaction precompile verification failure {:?}", e), ++ data: None, ++ }, + } + } + } diff --git a/third_party/solana/Dockerfile b/third_party/solana/Dockerfile index 6d894c42..cf658a50 100644 --- a/third_party/solana/Dockerfile +++ b/third_party/solana/Dockerfile @@ -11,7 +11,7 @@ RUN rustup component add rustfmt WORKDIR /usr/src/solana RUN git clone https://github.com/solana-labs/solana --branch master && \ - cd solana && git checkout e2d66cf7 + cd solana && git checkout 5dcf3480986a87cc9c80788c1d8ccd8f0cb44a8d ADD *.patch . diff --git a/web/src/components/TransferProposals.tsx b/web/src/components/TransferProposals.tsx index b2fc7fff..97ac3cbc 100644 --- a/web/src/components/TransferProposals.tsx +++ b/web/src/components/TransferProposals.tsx @@ -76,13 +76,24 @@ function TransferProposals() { let executeVAA = async (v: LockupWithStatus) => { let wh = WormholeFactory.connect(BRIDGE_ADDRESS, signer) - let vaa = v.vaa; + let vaa = new Buffer(v.vaa); for (let i = vaa.length; i > 0; i--) { if (vaa[i] == 0xff) { vaa = vaa.slice(0, i) break } } + + let signatures = await b.fetchSignatureStatus(v.signatureAccount); + let sigData = Buffer.of(...signatures.reduce((previousValue, currentValue) => { + previousValue.push(currentValue.index) + previousValue.push(...currentValue.signature) + + return previousValue + }, new Array())) + + vaa = Buffer.concat([vaa.slice(0, 5), Buffer.of(signatures.length), sigData, vaa.slice(6)]) + message.loading({content: "Signing transaction...", key: "eth_tx", duration: 1000},) let tx = await wh.submitVAA(vaa) message.loading({content: "Waiting for transaction to be mined...", key: "eth_tx", duration: 1000}) diff --git a/web/src/config.ts b/web/src/config.ts index 15c14e43..c5eb8188 100644 --- a/web/src/config.ts +++ b/web/src/config.ts @@ -5,12 +5,14 @@ const WRAPPED_MASTER = "e78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab" const SOLANA_BRIDGE_PROGRAM = new PublicKey("Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"); -const TOKEN_PROGRAM = new PublicKey("TokenSVp5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"); +const TOKEN_PROGRAM = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"); +const SOLANA_HOST = "http://localhost:8899"; export { BRIDGE_ADDRESS, TOKEN_PROGRAM, WRAPPED_MASTER, - SOLANA_BRIDGE_PROGRAM + SOLANA_BRIDGE_PROGRAM, + SOLANA_HOST } diff --git a/web/src/providers/ClientContext.ts b/web/src/providers/ClientContext.ts index 5e0a0dc1..205f6f24 100644 --- a/web/src/providers/ClientContext.ts +++ b/web/src/providers/ClientContext.ts @@ -1,5 +1,6 @@ import React from 'react' import * as solanaWeb3 from '@solana/web3.js'; +import {SOLANA_HOST} from "../config"; -const ClientContext = React.createContext(new solanaWeb3.Connection("http://localhost:8899")); +const ClientContext = React.createContext(new solanaWeb3.Connection(SOLANA_HOST)); export default ClientContext diff --git a/web/src/utils/bridge.ts b/web/src/utils/bridge.ts index f49db97d..0b78005b 100644 --- a/web/src/utils/bridge.ts +++ b/web/src/utils/bridge.ts @@ -5,7 +5,7 @@ import assert from "assert"; // @ts-ignore import * as BufferLayout from 'buffer-layout' import {Token} from "@solana/spl-token"; -import {TOKEN_PROGRAM} from "../config"; +import {SOLANA_HOST, TOKEN_PROGRAM} from "../config"; import * as bs58 from "bs58"; export interface AssetMeta { @@ -26,9 +26,15 @@ export interface Lockup { vaa: Uint8Array, vaaTime: number, pokeCounter: number, + signatureAccount: PublicKey, initialized: boolean, } +export interface Signature { + signature: number[], + index: number, +} + export const CHAIN_ID_SOLANA = 1; class SolanaBridge { @@ -95,6 +101,7 @@ class SolanaBridge { {pubkey: this.programID, isSigner: false, isWritable: false}, {pubkey: solanaWeb3.SystemProgram.programId, isSigner: false, isWritable: false}, {pubkey: this.tokenProgram, isSigner: false, isWritable: false}, + {pubkey: solanaWeb3.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false}, {pubkey: solanaWeb3.SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false}, {pubkey: tokenAccount, isSigner: false, isWritable: true}, {pubkey: configKey, isSigner: false, isWritable: false}, @@ -171,11 +178,47 @@ class SolanaBridge { } } + // fetchSignatureStatus fetches the signatures for a VAA + async fetchSignatureStatus( + signatureStatus: PublicKey, + ): Promise { + let signatureInfo = await this.connection.getAccountInfo(signatureStatus); + console.log(signatureStatus.toBase58()) + if (signatureInfo == null || signatureInfo.lamports == 0) { + throw new Error("not found") + } else { + const dataLayout = BufferLayout.struct([ + BufferLayout.blob(20 * 65, 'signaturesRaw'), + ]); + let rawSignatureInfo = dataLayout.decode(signatureInfo?.data); + + let signatures: Signature[] = []; + for (let i = 0; i < 20; i++) { + let data = rawSignatureInfo.signaturesRaw.slice(65 * i, 65 * (i + 1)); + let empty = true; + for (let v of data) { + if (v != 0) { + empty = false; + break + } + } + if (empty) continue; + + signatures.push({ + signature: data, + index: i, + }) + } + + return signatures; + } + } + // fetchAssetMeta fetches the AssetMeta for an SPL token async fetchTransferProposals( tokenAccount: PublicKey, ): Promise { - let accountRes = await fetch("http://localhost:8899", { + let accountRes = await fetch(SOLANA_HOST, { method: "POST", headers: { 'Content-Type': 'application/json' @@ -186,7 +229,7 @@ class SolanaBridge { "method": "getProgramAccounts", "params": [this.programID.toString(), { "commitment": "single", - "filters": [{"dataSize": 1152}, { + "filters": [{"dataSize": 1184}, { "memcmp": { "offset": 33, "bytes": tokenAccount.toString() @@ -210,7 +253,9 @@ class SolanaBridge { BufferLayout.blob(1001, 'vaa'), BufferLayout.seq(BufferLayout.u8(), 3), // 4 byte alignment because a u32 is following BufferLayout.u32('vaaTime'), + BufferLayout.u32('lockupTime'), BufferLayout.u8('pokeCounter'), + BufferLayout.blob(32, 'signatureAccount'), BufferLayout.u8('initialized'), ]); @@ -230,6 +275,7 @@ class SolanaBridge { toChain: parsedAccount.toChain, vaa: parsedAccount.vaa, vaaTime: parsedAccount.vaaTime, + signatureAccount: new PublicKey(parsedAccount.signatureAccount), pokeCounter: parsedAccount.pokeCounter }) }