Compare commits
17 Commits
document-r
...
v0.17.1
Author | SHA1 | Date | |
---|---|---|---|
beb8e89bf4 | |||
54ff4529b1 | |||
0942cbd89b | |||
88bbaf7add | |||
d1447b5e52 | |||
c00bb42ecd | |||
1a0003fbcc | |||
a584ce6472 | |||
63d1f029a9 | |||
24ebf70016 | |||
d18dc94209 | |||
8242fd19eb | |||
469e91cd8d | |||
4889c2a29c | |||
3c6115c94a | |||
70b15317a9 | |||
a834e9ae10 |
514
Cargo.lock
generated
514
Cargo.lock
generated
@ -79,14 +79,6 @@ name = "ascii"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "ascii-canvas"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "assert_cmd"
|
||||
version = "0.11.1"
|
||||
@ -815,11 +807,6 @@ dependencies = [
|
||||
"syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diff"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "difference"
|
||||
version = "2.0.0"
|
||||
@ -871,17 +858,6 @@ dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "docopt"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.4"
|
||||
@ -939,14 +915,6 @@ dependencies = [
|
||||
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ena"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encode_unicode"
|
||||
version = "0.3.5"
|
||||
@ -1633,30 +1601,6 @@ dependencies = [
|
||||
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lalrpop"
|
||||
version = "0.16.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ena 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lalrpop-util 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lalrpop-util"
|
||||
version = "0.16.3"
|
||||
@ -1953,11 +1897,6 @@ dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "new_debug_unreachable"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "nibble_vec"
|
||||
version = "0.0.4"
|
||||
@ -2315,11 +2254,6 @@ name = "ppv-lite86"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "precomputed-hash"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "predicates"
|
||||
version = "1.0.1"
|
||||
@ -3159,10 +3093,8 @@ dependencies = [
|
||||
"solana-budget-program 0.17.0",
|
||||
"solana-chacha-sys 0.17.0",
|
||||
"solana-client 0.17.0",
|
||||
"solana-config-program 0.17.0",
|
||||
"solana-drone 0.17.0",
|
||||
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-exchange-program 0.17.0",
|
||||
"solana-kvstore 0.17.0",
|
||||
"solana-logger 0.17.0",
|
||||
"solana-measure 0.17.0",
|
||||
@ -3172,11 +3104,9 @@ dependencies = [
|
||||
"solana-runtime 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
"solana-stake-api 0.17.0",
|
||||
"solana-stake-program 0.17.0",
|
||||
"solana-storage-api 0.17.0",
|
||||
"solana-storage-program 0.17.0",
|
||||
"solana-vote-api 0.17.0",
|
||||
"solana-vote-program 0.17.0",
|
||||
"solana-vote-signer 0.17.0",
|
||||
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -3230,6 +3160,7 @@ dependencies = [
|
||||
name = "solana-bench-tps"
|
||||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -3240,8 +3171,12 @@ dependencies = [
|
||||
"solana 0.17.0",
|
||||
"solana-client 0.17.0",
|
||||
"solana-drone 0.17.0",
|
||||
"solana-librapay-api 0.17.0",
|
||||
"solana-logger 0.17.0",
|
||||
"solana-measure 0.17.0",
|
||||
"solana-metrics 0.17.0",
|
||||
"solana-move-loader-api 0.17.0",
|
||||
"solana-move-loader-program 0.17.0",
|
||||
"solana-netutil 0.17.0",
|
||||
"solana-runtime 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
@ -3436,6 +3371,18 @@ dependencies = [
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.17.0",
|
||||
"solana-genesis-programs 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
"solana-stake-api 0.17.0",
|
||||
"solana-storage-api 0.17.0",
|
||||
"solana-vote-api 0.17.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-genesis-programs"
|
||||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"hashbrown 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-bpf-loader-api 0.17.0",
|
||||
"solana-bpf-loader-program 0.17.0",
|
||||
"solana-budget-api 0.17.0",
|
||||
@ -3444,6 +3391,8 @@ dependencies = [
|
||||
"solana-config-program 0.17.0",
|
||||
"solana-exchange-api 0.17.0",
|
||||
"solana-exchange-program 0.17.0",
|
||||
"solana-move-loader-api 0.17.0",
|
||||
"solana-move-loader-program 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
"solana-stake-api 0.17.0",
|
||||
"solana-stake-program 0.17.0",
|
||||
@ -3542,6 +3491,20 @@ dependencies = [
|
||||
"solana-sdk 0.17.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-librapay-api"
|
||||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.17.0",
|
||||
"solana-move-loader-api 0.17.0",
|
||||
"solana-runtime 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
"solana_libra_language_e2e_tests 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-logger"
|
||||
version = "0.17.0"
|
||||
@ -3594,16 +3557,16 @@ dependencies = [
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_compiler 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_language_e2e_tests 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_state_view 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_stdlib 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_cache_map 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_runtime 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_compiler 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_language_e2e_tests 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_state_view 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_stdlib 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_cache_map 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_runtime 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3675,7 +3638,6 @@ dependencies = [
|
||||
"solana-logger 0.17.0",
|
||||
"solana-measure 0.17.0",
|
||||
"solana-metrics 0.17.0",
|
||||
"solana-noop-program 0.17.0",
|
||||
"solana-sdk 0.17.0",
|
||||
"solana-stake-api 0.17.0",
|
||||
"solana-stake-program 0.17.0",
|
||||
@ -3931,45 +3893,45 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_bytecode_verifier"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"mirai-annotations 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_canonical_serialization"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_compiler"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_stdlib 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_stdlib 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_config"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -3977,19 +3939,19 @@ dependencies = [
|
||||
"parity-multiaddr 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_logger 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_logger 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_crypto"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4007,9 +3969,9 @@ dependencies = [
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto-derive 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto-derive 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"threshold_crypto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4017,8 +3979,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_crypto-derive"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4026,81 +3988,80 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_failure_ext"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_macros 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_macros 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_failure_macros"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_ir_to_bytecode"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"codespan 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"codespan-reporting 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lalrpop-util 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_ir_to_bytecode_syntax 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_ir_to_bytecode_syntax 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_ir_to_bytecode_syntax"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"codespan 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"codespan-reporting 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lalrpop 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lalrpop-util 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_language_e2e_tests"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proptest-derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_canonical_serialization 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_compiler 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_config 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_logger 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proptest_helpers 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_state_view 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_stdlib 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_genesis 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_runtime 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_canonical_serialization 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_compiler 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_config 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_logger 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proptest_helpers 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_state_view 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_stdlib 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_genesis 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_runtime 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_logger"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4118,15 +4079,15 @@ dependencies = [
|
||||
"slog-envlogger 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slog-scope 4.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slog-term 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_metrics"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"grpcio 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4135,27 +4096,27 @@ dependencies = [
|
||||
"prometheus 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_logger 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_logger 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_move_ir_natives"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitcoin_hashes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_nextgen_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_nextgen_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_nextgen_crypto"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4174,10 +4135,10 @@ dependencies = [
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto-derive 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto-derive 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"threshold_crypto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4185,8 +4146,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_proptest_helpers"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4195,18 +4156,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_proto_conv"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv_derive 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv_derive 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_proto_conv_derive"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4215,28 +4176,28 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_state_view"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_stdlib"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_types"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bech32 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4252,20 +4213,20 @@ dependencies = [
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_canonical_serialization 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_logger 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_nextgen_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proptest_helpers 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_canonical_serialization 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_logger 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_nextgen_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proptest_helpers 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_vm"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4273,16 +4234,16 @@ dependencies = [
|
||||
"mirai-annotations 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proptest-derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proptest_helpers 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proptest_helpers 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_vm_cache_map"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"chashmap 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"typed-arena 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4290,31 +4251,31 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_vm_genesis"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_config 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_state_view 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_stdlib 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_cache_map 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_runtime 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_config 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_ir_to_bytecode 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_state_view 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_stdlib 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_cache_map 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_runtime 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana_libra_vm_runtime"
|
||||
version = "0.0.0-sol13"
|
||||
source = "git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2#bb473eb35cde9974e8890db1b62528c51bf2dfe7"
|
||||
version = "0.0.0-sol15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -4322,18 +4283,18 @@ dependencies = [
|
||||
"proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rental 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_canonical_serialization 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_config 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_logger 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_metrics 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_move_ir_natives 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_state_view 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_vm_cache_map 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)",
|
||||
"solana_libra_bytecode_verifier 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_canonical_serialization 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_config 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_logger 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_metrics 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_move_ir_natives 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_state_view 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana_libra_vm_cache_map 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -4384,47 +4345,11 @@ dependencies = [
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "string_cache_codegen"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "string_cache_shared"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "structopt"
|
||||
version = "0.2.18"
|
||||
@ -4541,15 +4466,6 @@ dependencies = [
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "term"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "term"
|
||||
version = "0.5.2"
|
||||
@ -5202,7 +5118,6 @@ dependencies = [
|
||||
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
|
||||
"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba"
|
||||
"checksum ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50"
|
||||
"checksum ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b385d69402821a1c254533a011a312531cbcc0e3e24f19bbb4747a5a2daf37e2"
|
||||
"checksum assert_cmd 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2dc477793bd82ec39799b6f6b3df64938532fdf2ab0d49ef817eac65856a5a1e"
|
||||
"checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5"
|
||||
"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
|
||||
@ -5285,20 +5200,17 @@ dependencies = [
|
||||
"checksum curve25519-dalek 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5d4b820e8711c211745880150f5fac78ab07d6e3851d8ce9f5a02cedc199174c"
|
||||
"checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97"
|
||||
"checksum derive_deref 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11554fdb0aa42363a442e0c4278f51c9621e20c1ce3bac51d79e60646f3b8b8f"
|
||||
"checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a"
|
||||
"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
|
||||
"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90"
|
||||
"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
|
||||
"checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
|
||||
"checksum dirs 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1c4ef5a8b902d393339e2a2c7fe573af92ce7e0ee5a3ff827b4c9ad7e07e4fa1"
|
||||
"checksum dirs-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "937756392ec77d1f2dd9dc3ac9d69867d109a2121479d72c364e42f4cab21e2d"
|
||||
"checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969"
|
||||
"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e"
|
||||
"checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86"
|
||||
"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b"
|
||||
"checksum elf 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4841de15dbe0e49b9b62a417589299e3be0d557e0900d36acb87e6dae47197f5"
|
||||
"checksum elfkit 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "02f182eda16a7360c80a2f8638d0726e9d5478173058f1505c42536ca666ecd2"
|
||||
"checksum ena 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f56c93cc076508c549d9bb747f79aa9b4eb098be7b8cad8830c3137ef52d1e00"
|
||||
"checksum encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90b2c9496c001e8cb61827acdefad780795c42264c137744cae6f7d9e3450abd"
|
||||
"checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed"
|
||||
"checksum endian-type 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
|
||||
@ -5373,7 +5285,6 @@ dependencies = [
|
||||
"checksum jsonrpc-ws-server 12.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "698fee4fcaf09a5927b7e39dd8a8136a102b343cebacaa351fc4def01a050a5b"
|
||||
"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum lalrpop 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2e80bee40b22bca46665b4ef1f3cd88ed0fb043c971407eac17a0712c02572"
|
||||
"checksum lalrpop-util 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)" = "33b27d8490dbe1f9704b0088d61e8d46edc10d5673a8829836c6ded26a9912c7"
|
||||
"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
|
||||
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
|
||||
@ -5410,7 +5321,6 @@ dependencies = [
|
||||
"checksum mirai-annotations 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d15444fc4fbe11acaf6683f49e1d4be94bfd6d96799673e9b8417dd7ba9b6ea9"
|
||||
"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e"
|
||||
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
|
||||
"checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30"
|
||||
"checksum nibble_vec 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c8d77f3db4bce033f4d04db08079b2ef1c3d02b44e86f25d08886fafa7756ffa"
|
||||
"checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce"
|
||||
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
|
||||
@ -5451,7 +5361,6 @@ dependencies = [
|
||||
"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0"
|
||||
"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af"
|
||||
"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b"
|
||||
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||
"checksum predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53e09015b0d3f5a0ec2d4428f7559bb7b3fff341b4e159fedd1d57fac8b939ff"
|
||||
"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178"
|
||||
"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124"
|
||||
@ -5540,42 +5449,38 @@ dependencies = [
|
||||
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
||||
"checksum socket2 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df028e0e632c2a1823d920ad74895e7f9128e6438cbc4bc6fd1f180e644767b9"
|
||||
"checksum solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1c21f9d5aa62959872194dfd086feb4e8efec1c2589d27e6a0339904759e99fc"
|
||||
"checksum solana_libra_bytecode_verifier 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_canonical_serialization 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_compiler 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_config 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_crypto-derive 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_failure_ext 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_failure_macros 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_ir_to_bytecode 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_ir_to_bytecode_syntax 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_language_e2e_tests 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_logger 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_metrics 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_move_ir_natives 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_nextgen_crypto 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_proptest_helpers 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_proto_conv 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_proto_conv_derive 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_state_view 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_stdlib 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_types 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_vm 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_vm_cache_map 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_vm_genesis 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_vm_runtime 0.0.0-sol13 (git+https://github.com/solana-labs/libra?tag=v0.0.0-sol13.2)" = "<none>"
|
||||
"checksum solana_libra_bytecode_verifier 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "cdbd247ba148f48626f84f6c902270974b871ada749bd0c8a8df8325c2f443f7"
|
||||
"checksum solana_libra_canonical_serialization 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "6e048a56ee25eb44fa3c10ffa32ef970b1ed235d0cf297c9b982bc1370a91915"
|
||||
"checksum solana_libra_compiler 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "122680634c26d48b47e8fd84710f18c5d06fb263f6cbfd2429e508e9263b5b94"
|
||||
"checksum solana_libra_config 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "f3e1f1e36b86eba9b3eee921d5f5a35ed000932bd135889f75baf7012b9b072c"
|
||||
"checksum solana_libra_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "e034f00e11e54683ccd2b35cf70b21b42f49f6d6e7ffb742ed317a1d7a6a747d"
|
||||
"checksum solana_libra_crypto-derive 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "8a73e01f1b8003fe23b541444ea6c4666edfdbd585bfc5834776c38f934c9261"
|
||||
"checksum solana_libra_failure_ext 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "f746f50c7fc974eb154ff2a0016ca142f5cd9298af74cdd875b07e15235c0b0a"
|
||||
"checksum solana_libra_failure_macros 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "3080ec410a120187c5184e85713ec6796bdff9297d23317d84d7d75b068d7d8d"
|
||||
"checksum solana_libra_ir_to_bytecode 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "683468c3e738bf4f7775b04107121297e4a0da5708dd2262db02b4a5f5c58477"
|
||||
"checksum solana_libra_ir_to_bytecode_syntax 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "2fced1204a50746ffca2ebf7716c2d0e69b11e2a65781dffad96c2f56366a2fa"
|
||||
"checksum solana_libra_language_e2e_tests 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "5419058e181091b82ea4fe8bed5407ee718bfc61d87fccb8afc821d477bc66f9"
|
||||
"checksum solana_libra_logger 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "ca510fe50f83785013bf4101b43833f3748b5e5b57d625bfa066301067405d1e"
|
||||
"checksum solana_libra_metrics 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "8b308d761ff5a4aeadb9b3a4bb9633fad1697be64bbec00d80f477b4a3981e5e"
|
||||
"checksum solana_libra_move_ir_natives 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "c4dc75fd4eccb74fb5b0617817b5b8d9db560625440f83f0ad42c01714f2eac6"
|
||||
"checksum solana_libra_nextgen_crypto 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "2d08c6e256b8774b620d9b3d31b96c507f3585786a5f631acb329635e47ecba1"
|
||||
"checksum solana_libra_proptest_helpers 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "e6ca5297a53d9f0778ab95303eb795e1d625a557626e3ce91661cbcfe3e20ecf"
|
||||
"checksum solana_libra_proto_conv 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "9486271bc6a8f89a56b503a4c73085fd20958b8d9d0bcac9294299478039ac5f"
|
||||
"checksum solana_libra_proto_conv_derive 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "d93691537cc87685e3d0e0c6da5b0972454bf0f9e6fcec544e59d3071c396281"
|
||||
"checksum solana_libra_state_view 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "2817ffe86d237a656e243b0e8db2450a0cfe9988633a6d3d11b46aa1e41ecfaa"
|
||||
"checksum solana_libra_stdlib 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "e723bac501b04923b2e2748757ab25b97fb5cca8a225ba2110fc37de1aa9fc3c"
|
||||
"checksum solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a0da726df0dd4c9772e4a8cb2cba806ec4b1cf6154af0172a6b6292992fe9da"
|
||||
"checksum solana_libra_vm 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "f77b064a6512b9962755208f90b2a750e44f6ee3a9f709746640fe1af9d465db"
|
||||
"checksum solana_libra_vm_cache_map 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "7f8ad9ba68164d231a5057632cf48a1bc2bd35af296d797bdfc7606ae5f85d2b"
|
||||
"checksum solana_libra_vm_genesis 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "a195626ecac8cf32fc83df08950c1c5ce7a99ef94a531306ad3adfd1f09303f8"
|
||||
"checksum solana_libra_vm_runtime 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)" = "62401cabf7d9208bd7c9edc08a6f571401a7a1d0c94fde44dc60edbd4300e442"
|
||||
"checksum solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b6145a3a0104925b0be63e817f7b5814fac6aa29a328bbc1d637ffd33022d748"
|
||||
"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2"
|
||||
"checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f"
|
||||
"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55"
|
||||
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
||||
"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d"
|
||||
"checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423"
|
||||
"checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da"
|
||||
"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
|
||||
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
"checksum strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "032c03039aae92b350aad2e3779c352e104d919cb192ba2fabbd7b831ce4f0f6"
|
||||
"checksum structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7"
|
||||
"checksum structopt-derive 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107"
|
||||
"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
|
||||
@ -5589,7 +5494,6 @@ dependencies = [
|
||||
"checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3"
|
||||
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
||||
"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
|
||||
"checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
|
||||
"checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42"
|
||||
"checksum termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83"
|
||||
"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e"
|
||||
|
@ -10,6 +10,7 @@ members = [
|
||||
"drone",
|
||||
"validator",
|
||||
"genesis",
|
||||
"genesis_programs",
|
||||
"gossip",
|
||||
"install",
|
||||
"keygen",
|
||||
@ -32,6 +33,7 @@ members = [
|
||||
"programs/failure_program",
|
||||
"programs/move_loader_api",
|
||||
"programs/move_loader_program",
|
||||
"programs/librapay_api",
|
||||
"programs/noop_program",
|
||||
"programs/stake_api",
|
||||
"programs/stake_program",
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-exchange"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -24,16 +24,16 @@ serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
serde_yaml = "0.8.9"
|
||||
# solana-runtime = { path = "../solana/runtime"}
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-drone = { path = "../drone", version = "0.17.0" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.17.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-drone = { path = "../drone", version = "0.17.1" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.17.1" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
untrusted = "0.7.0"
|
||||
ws = "0.8.1"
|
||||
|
||||
|
@ -2,16 +2,16 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-streamer"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
|
||||
[features]
|
||||
cuda = ["solana/cuda"]
|
||||
|
@ -2,12 +2,13 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-tps"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
bincode = "1.1.4"
|
||||
clap = "2.33.0"
|
||||
log = "0.4.7"
|
||||
rayon = "1.1.0"
|
||||
@ -15,14 +16,18 @@ serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
serde_yaml = "0.8.9"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-drone = { path = "../drone", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-drone = { path = "../drone", version = "0.17.1" }
|
||||
solana-librapay-api = { path = "../programs/librapay_api", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-measure = { path = "../measure", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.17.1" }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.17.1" }
|
||||
|
||||
[features]
|
||||
cuda = ["solana/cuda"]
|
||||
|
@ -1,13 +1,17 @@
|
||||
use solana_metrics;
|
||||
|
||||
use bincode;
|
||||
use log::*;
|
||||
use rayon::prelude::*;
|
||||
use solana::gen_keys::GenKeys;
|
||||
use solana_client::perf_utils::{sample_txs, SampleStats};
|
||||
use solana_drone::drone::request_airdrop_transaction;
|
||||
use solana_librapay_api::{create_genesis, upload_mint_program, upload_payment_program};
|
||||
use solana_measure::measure::Measure;
|
||||
use solana_metrics::datapoint_info;
|
||||
use solana_sdk::client::Client;
|
||||
use solana_sdk::hash::Hash;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_instruction;
|
||||
use solana_sdk::system_transaction;
|
||||
@ -24,6 +28,8 @@ use std::thread::Builder;
|
||||
use std::time::Duration;
|
||||
use std::time::Instant;
|
||||
|
||||
use solana_librapay_api::librapay_transaction;
|
||||
|
||||
pub const MAX_SPENDS_PER_TX: u64 = 4;
|
||||
pub const NUM_LAMPORTS_PER_ACCOUNT: u64 = 128;
|
||||
|
||||
@ -43,6 +49,7 @@ pub struct Config {
|
||||
pub duration: Duration,
|
||||
pub tx_count: usize,
|
||||
pub sustained: bool,
|
||||
pub use_move: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
@ -54,15 +61,19 @@ impl Default for Config {
|
||||
duration: Duration::new(std::u64::MAX, 0),
|
||||
tx_count: 500_000,
|
||||
sustained: false,
|
||||
use_move: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type LibraKeys = (Keypair, Pubkey, Pubkey, Vec<Keypair>);
|
||||
|
||||
pub fn do_bench_tps<T>(
|
||||
clients: Vec<T>,
|
||||
config: Config,
|
||||
gen_keypairs: Vec<Keypair>,
|
||||
keypair0_balance: u64,
|
||||
libra_args: Option<LibraKeys>,
|
||||
) -> u64
|
||||
where
|
||||
T: 'static + Client + Send + Sync,
|
||||
@ -74,6 +85,7 @@ where
|
||||
duration,
|
||||
tx_count,
|
||||
sustained,
|
||||
..
|
||||
} = config;
|
||||
|
||||
let clients: Vec<_> = clients.into_iter().map(Arc::new).collect();
|
||||
@ -165,6 +177,7 @@ where
|
||||
&keypairs[len..],
|
||||
threads,
|
||||
reclaim_lamports_back_to_source_account,
|
||||
&libra_args,
|
||||
);
|
||||
// In sustained mode overlap the transfers with generation
|
||||
// this has higher average performance but lower peak performance
|
||||
@ -221,6 +234,74 @@ fn metrics_submit_lamport_balance(lamport_balance: u64) {
|
||||
);
|
||||
}
|
||||
|
||||
fn generate_move_txs(
|
||||
source: &[Keypair],
|
||||
dest: &[Keypair],
|
||||
reclaim: bool,
|
||||
move_keypairs: &[Keypair],
|
||||
libra_pay_program_id: &Pubkey,
|
||||
libra_mint_id: &Pubkey,
|
||||
blockhash: &Hash,
|
||||
) -> Vec<(Transaction, u64)> {
|
||||
let count = move_keypairs.len() / 2;
|
||||
let source_move = &move_keypairs[..count];
|
||||
let dest_move = &move_keypairs[count..];
|
||||
let pairs: Vec<_> = if !reclaim {
|
||||
source_move
|
||||
.iter()
|
||||
.zip(dest_move.iter())
|
||||
.zip(source.iter())
|
||||
.collect()
|
||||
} else {
|
||||
dest_move
|
||||
.iter()
|
||||
.zip(source_move.iter())
|
||||
.zip(dest.iter())
|
||||
.collect()
|
||||
};
|
||||
|
||||
pairs
|
||||
.par_iter()
|
||||
.map(|((from, to), payer)| {
|
||||
(
|
||||
librapay_transaction::transfer(
|
||||
libra_pay_program_id,
|
||||
libra_mint_id,
|
||||
&payer,
|
||||
&from,
|
||||
&to.pubkey(),
|
||||
1,
|
||||
*blockhash,
|
||||
),
|
||||
timestamp(),
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn generate_system_txs(
|
||||
source: &[Keypair],
|
||||
dest: &[Keypair],
|
||||
reclaim: bool,
|
||||
blockhash: &Hash,
|
||||
) -> Vec<(Transaction, u64)> {
|
||||
let pairs: Vec<_> = if !reclaim {
|
||||
source.iter().zip(dest.iter()).collect()
|
||||
} else {
|
||||
dest.iter().zip(source.iter()).collect()
|
||||
};
|
||||
|
||||
pairs
|
||||
.par_iter()
|
||||
.map(|(from, to)| {
|
||||
(
|
||||
system_transaction::create_user_account(from, &to.pubkey(), 1, *blockhash),
|
||||
timestamp(),
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn generate_txs(
|
||||
shared_txs: &SharedTransactions,
|
||||
blockhash: &Hash,
|
||||
@ -228,25 +309,31 @@ fn generate_txs(
|
||||
dest: &[Keypair],
|
||||
threads: usize,
|
||||
reclaim: bool,
|
||||
libra_args: &Option<LibraKeys>,
|
||||
) {
|
||||
let tx_count = source.len();
|
||||
println!("Signing transactions... {} (reclaim={})", tx_count, reclaim);
|
||||
let signing_start = Instant::now();
|
||||
|
||||
let pairs: Vec<_> = if !reclaim {
|
||||
source.iter().zip(dest.iter()).collect()
|
||||
let transactions = if let Some((
|
||||
libra_genesis_keypair,
|
||||
libra_pay_program_id,
|
||||
_libra_mint_program_id,
|
||||
libra_keys,
|
||||
)) = libra_args
|
||||
{
|
||||
generate_move_txs(
|
||||
source,
|
||||
dest,
|
||||
reclaim,
|
||||
&libra_keys,
|
||||
libra_pay_program_id,
|
||||
&libra_genesis_keypair.pubkey(),
|
||||
blockhash,
|
||||
)
|
||||
} else {
|
||||
dest.iter().zip(source.iter()).collect()
|
||||
generate_system_txs(source, dest, reclaim, blockhash)
|
||||
};
|
||||
let transactions: Vec<_> = pairs
|
||||
.par_iter()
|
||||
.map(|(id, keypair)| {
|
||||
(
|
||||
system_transaction::create_user_account(id, &keypair.pubkey(), 1, *blockhash),
|
||||
timestamp(),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
let duration = signing_start.elapsed();
|
||||
let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
|
||||
@ -392,13 +479,10 @@ pub fn fund_keys<T: Client>(
|
||||
let mut to_fund_txs: Vec<_> = chunk
|
||||
.par_iter()
|
||||
.map(|(k, m)| {
|
||||
(
|
||||
k.clone(),
|
||||
Transaction::new_unsigned_instructions(system_instruction::transfer_many(
|
||||
&k.pubkey(),
|
||||
&m,
|
||||
)),
|
||||
)
|
||||
let tx = Transaction::new_unsigned_instructions(
|
||||
system_instruction::transfer_many(&k.pubkey(), &m),
|
||||
);
|
||||
(k.clone(), tx)
|
||||
})
|
||||
.collect();
|
||||
|
||||
@ -602,15 +686,156 @@ pub fn generate_keypairs(seed_keypair: &Keypair, count: u64) -> (Vec<Keypair>, u
|
||||
(rnd.gen_n_keypairs(total_keys), extra)
|
||||
}
|
||||
|
||||
fn fund_move_keys<T: Client>(
|
||||
client: &T,
|
||||
funding_key: &Keypair,
|
||||
keypairs: &[Keypair],
|
||||
total: u64,
|
||||
libra_pay_program_id: &Pubkey,
|
||||
libra_mint_program_id: &Pubkey,
|
||||
libra_mint_key: &Keypair,
|
||||
) {
|
||||
let (mut blockhash, _fee_calculator) = client.get_recent_blockhash().unwrap();
|
||||
|
||||
info!("creating the libra funding account..");
|
||||
let libra_funding_key = Keypair::new();
|
||||
let tx = librapay_transaction::create_account(
|
||||
funding_key,
|
||||
&libra_funding_key.pubkey(),
|
||||
1,
|
||||
blockhash,
|
||||
);
|
||||
let sig = client
|
||||
.async_send_transaction(tx)
|
||||
.expect("create_account in generate_and_fund_keypairs");
|
||||
client.poll_for_signature(&sig).unwrap();
|
||||
|
||||
info!("minting to funding keypair");
|
||||
let tx = librapay_transaction::mint_tokens(
|
||||
&libra_mint_program_id,
|
||||
funding_key,
|
||||
libra_mint_key,
|
||||
&libra_funding_key.pubkey(),
|
||||
total,
|
||||
blockhash,
|
||||
);
|
||||
let sig = client
|
||||
.async_send_transaction(tx)
|
||||
.expect("create_account in generate_and_fund_keypairs");
|
||||
client.poll_for_signature(&sig).unwrap();
|
||||
|
||||
info!("creating move accounts.. {}", keypairs.len());
|
||||
let create_len = 8;
|
||||
let mut funding_time = Measure::start("funding_time");
|
||||
for (i, keys) in keypairs.chunks(create_len).enumerate() {
|
||||
if client.get_balance(&keys[0].pubkey()).unwrap_or(0) > 0 {
|
||||
// already created these accounts.
|
||||
break;
|
||||
}
|
||||
|
||||
let mut tx_send = Measure::start("poll");
|
||||
|
||||
let pubkeys: Vec<_> = keys.iter().map(|k| k.pubkey()).collect();
|
||||
let tx = librapay_transaction::create_accounts(funding_key, &pubkeys, 1, blockhash);
|
||||
let ser_size = bincode::serialized_size(&tx).unwrap();
|
||||
let sig = client
|
||||
.async_send_transaction(tx)
|
||||
.expect("create_account in generate_and_fund_keypairs");
|
||||
tx_send.stop();
|
||||
let mut poll = Measure::start("poll");
|
||||
client.poll_for_signature(&sig).unwrap();
|
||||
poll.stop();
|
||||
if i % 10 == 0 {
|
||||
blockhash = client.get_recent_blockhash().unwrap().0;
|
||||
info!(
|
||||
"size: {} created {} accounts of {} sig: {}us send: {}us",
|
||||
ser_size,
|
||||
i,
|
||||
(keypairs.len() / create_len),
|
||||
poll.as_us(),
|
||||
tx_send.as_us()
|
||||
);
|
||||
}
|
||||
}
|
||||
funding_time.stop();
|
||||
info!("funding accounts {}ms", funding_time.as_ms());
|
||||
let mut sigs = vec![];
|
||||
let tx_count = keypairs.len();
|
||||
let amount = total / (tx_count as u64);
|
||||
for (i, key) in keypairs[..tx_count].iter().enumerate() {
|
||||
let tx = librapay_transaction::transfer(
|
||||
libra_pay_program_id,
|
||||
&libra_mint_key.pubkey(),
|
||||
funding_key,
|
||||
&libra_funding_key,
|
||||
&key.pubkey(),
|
||||
amount,
|
||||
blockhash,
|
||||
);
|
||||
|
||||
let sig = client
|
||||
.async_send_transaction(tx.clone())
|
||||
.expect("create_account in generate_and_fund_keypairs");
|
||||
|
||||
let mut poll_time = Measure::start("poll_start");
|
||||
let poll_status = client.poll_for_signature(&sig);
|
||||
poll_time.stop();
|
||||
info!(
|
||||
"i: {} poll: {:?} time: {}ms",
|
||||
i,
|
||||
poll_status,
|
||||
poll_time.as_ms()
|
||||
);
|
||||
|
||||
sigs.push((sig, key));
|
||||
|
||||
if i % 50 == 0 {
|
||||
blockhash = client.get_recent_blockhash().unwrap().0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i, (sig, key)) in sigs.iter().enumerate() {
|
||||
let mut times = 0;
|
||||
loop {
|
||||
match client.poll_for_signature(&sig) {
|
||||
Ok(_) => {
|
||||
break;
|
||||
}
|
||||
Err(e) => {
|
||||
info!("e :{:?} waiting times: {} sig: {}", e, times, sig);
|
||||
times += 1;
|
||||
sleep(Duration::from_secs(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
times = 0;
|
||||
loop {
|
||||
let balance = librapay_transaction::get_libra_balance(client, &key.pubkey()).unwrap();
|
||||
if balance < amount {
|
||||
info!("i: {} balance: {} times: {}", i, balance, times);
|
||||
times += 1;
|
||||
sleep(Duration::from_secs(1));
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if i % 10 == 0 {
|
||||
info!("funding {} of {}", i, tx_count);
|
||||
}
|
||||
}
|
||||
info!("done..");
|
||||
}
|
||||
|
||||
pub fn generate_and_fund_keypairs<T: Client>(
|
||||
client: &T,
|
||||
drone_addr: Option<SocketAddr>,
|
||||
funding_pubkey: &Keypair,
|
||||
funding_key: &Keypair,
|
||||
tx_count: usize,
|
||||
lamports_per_account: u64,
|
||||
) -> Result<(Vec<Keypair>, u64)> {
|
||||
use_move: bool,
|
||||
) -> Result<(Vec<Keypair>, Option<LibraKeys>, u64)> {
|
||||
info!("Creating {} keypairs...", tx_count * 2);
|
||||
let (mut keypairs, extra) = generate_keypairs(funding_pubkey, tx_count as u64 * 2);
|
||||
let (mut keypairs, extra) = generate_keypairs(funding_key, tx_count as u64 * 2);
|
||||
info!("Get lamports...");
|
||||
|
||||
// Sample the first keypair, see if it has lamports, if so then resume.
|
||||
@ -619,19 +844,60 @@ pub fn generate_and_fund_keypairs<T: Client>(
|
||||
.get_balance(&keypairs[tx_count * 2 - 1].pubkey())
|
||||
.unwrap_or(0);
|
||||
|
||||
let mut move_keypairs_ret = None;
|
||||
|
||||
if lamports_per_account > last_keypair_balance {
|
||||
let (_, fee_calculator) = client.get_recent_blockhash().unwrap();
|
||||
let (_blockhash, fee_calculator) = client.get_recent_blockhash().unwrap();
|
||||
let account_desired_balance =
|
||||
lamports_per_account - last_keypair_balance + fee_calculator.max_lamports_per_signature;
|
||||
let extra_fees = extra * fee_calculator.max_lamports_per_signature;
|
||||
let total = account_desired_balance * (1 + keypairs.len() as u64) + extra_fees;
|
||||
if client.get_balance(&funding_pubkey.pubkey()).unwrap_or(0) < total {
|
||||
airdrop_lamports(client, &drone_addr.unwrap(), funding_pubkey, total)?;
|
||||
let mut total = account_desired_balance * (1 + keypairs.len() as u64) + extra_fees;
|
||||
if use_move {
|
||||
total *= 2;
|
||||
}
|
||||
info!("adding more lamports {}", account_desired_balance);
|
||||
|
||||
println!("Previous key balance: {} max_fee: {} lamports_per_account: {} extra: {} desired_balance: {} total: {}",
|
||||
last_keypair_balance, fee_calculator.max_lamports_per_signature, lamports_per_account, extra,
|
||||
account_desired_balance, total
|
||||
);
|
||||
|
||||
if client.get_balance(&funding_key.pubkey()).unwrap_or(0) < total {
|
||||
airdrop_lamports(client, &drone_addr.unwrap(), funding_key, total)?;
|
||||
}
|
||||
|
||||
if use_move {
|
||||
let libra_genesis_keypair = create_genesis(&funding_key, client, 1_000_000);
|
||||
let libra_mint_program_id = upload_mint_program(&funding_key, client);
|
||||
let libra_pay_program_id = upload_payment_program(&funding_key, client);
|
||||
|
||||
// Generate another set of keypairs for move accounts.
|
||||
// Still fund the solana ones which will be used for fees.
|
||||
let seed = [0u8; 32];
|
||||
let mut rnd = GenKeys::new(seed);
|
||||
let move_keypairs = rnd.gen_n_keypairs(tx_count as u64 * 2);
|
||||
fund_move_keys(
|
||||
client,
|
||||
funding_key,
|
||||
&move_keypairs,
|
||||
total / 2,
|
||||
&libra_pay_program_id,
|
||||
&libra_mint_program_id,
|
||||
&libra_genesis_keypair,
|
||||
);
|
||||
move_keypairs_ret = Some((
|
||||
libra_genesis_keypair,
|
||||
libra_pay_program_id,
|
||||
libra_mint_program_id,
|
||||
move_keypairs,
|
||||
));
|
||||
|
||||
// Give solana keys half and move keys half the lamports.
|
||||
total /= 2;
|
||||
}
|
||||
|
||||
fund_keys(
|
||||
client,
|
||||
funding_pubkey,
|
||||
funding_key,
|
||||
&keypairs,
|
||||
total,
|
||||
fee_calculator.max_lamports_per_signature,
|
||||
@ -642,11 +908,12 @@ pub fn generate_and_fund_keypairs<T: Client>(
|
||||
// 'generate_keypairs' generates extra keys to be able to have size-aligned funding batches for fund_keys.
|
||||
keypairs.truncate(2 * tx_count);
|
||||
|
||||
Ok((keypairs, last_keypair_balance))
|
||||
Ok((keypairs, move_keypairs_ret, last_keypair_balance))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use super::*;
|
||||
use solana::cluster_info::FULLNODE_PORT_RANGE;
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
@ -675,47 +942,68 @@ mod tests {
|
||||
assert_eq!(should_switch_directions(20, 101), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bench_tps_local_cluster() {
|
||||
fn test_bench_tps_local_cluster(config: Config) {
|
||||
solana_logger::setup();
|
||||
const NUM_NODES: usize = 1;
|
||||
let cluster = LocalCluster::new(&ClusterConfig {
|
||||
node_stakes: vec![999_990; NUM_NODES],
|
||||
cluster_lamports: 2_000_000,
|
||||
cluster_lamports: 200_000_000,
|
||||
validator_configs: vec![ValidatorConfig::default(); NUM_NODES],
|
||||
native_instruction_processors: vec![solana_move_loader_program!()],
|
||||
..ClusterConfig::default()
|
||||
});
|
||||
|
||||
let drone_keypair = Keypair::new();
|
||||
cluster.transfer(&cluster.funding_keypair, &drone_keypair.pubkey(), 1_000_000);
|
||||
|
||||
let (addr_sender, addr_receiver) = channel();
|
||||
run_local_drone(drone_keypair, addr_sender, None);
|
||||
let drone_addr = addr_receiver.recv_timeout(Duration::from_secs(2)).unwrap();
|
||||
|
||||
let mut config = Config::default();
|
||||
config.tx_count = 100;
|
||||
config.duration = Duration::from_secs(5);
|
||||
cluster.transfer(
|
||||
&cluster.funding_keypair,
|
||||
&drone_keypair.pubkey(),
|
||||
100_000_000,
|
||||
);
|
||||
|
||||
let client = create_client(
|
||||
(cluster.entry_point_info.rpc, cluster.entry_point_info.tpu),
|
||||
FULLNODE_PORT_RANGE,
|
||||
);
|
||||
|
||||
let (addr_sender, addr_receiver) = channel();
|
||||
run_local_drone(drone_keypair, addr_sender, None);
|
||||
let drone_addr = addr_receiver.recv_timeout(Duration::from_secs(2)).unwrap();
|
||||
|
||||
let lamports_per_account = 100;
|
||||
let (keypairs, _keypair_balance) = generate_and_fund_keypairs(
|
||||
|
||||
let (keypairs, move_keypairs, _keypair_balance) = generate_and_fund_keypairs(
|
||||
&client,
|
||||
Some(drone_addr),
|
||||
&config.id,
|
||||
config.tx_count,
|
||||
lamports_per_account,
|
||||
config.use_move,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let total = do_bench_tps(vec![client], config, keypairs, 0);
|
||||
let total = do_bench_tps(vec![client], config, keypairs, 0, move_keypairs);
|
||||
assert!(total > 100);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bench_tps_local_cluster_solana() {
|
||||
let mut config = Config::default();
|
||||
config.tx_count = 100;
|
||||
config.duration = Duration::from_secs(10);
|
||||
|
||||
test_bench_tps_local_cluster(config);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bench_tps_local_cluster_move() {
|
||||
let mut config = Config::default();
|
||||
config.tx_count = 100;
|
||||
config.duration = Duration::from_secs(20);
|
||||
config.use_move = true;
|
||||
|
||||
test_bench_tps_local_cluster(config);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bench_tps_bank_client() {
|
||||
let (genesis_block, id) = create_genesis_block(10_000);
|
||||
@ -727,10 +1015,11 @@ mod tests {
|
||||
config.tx_count = 10;
|
||||
config.duration = Duration::from_secs(5);
|
||||
|
||||
let (keypairs, _keypair_balance) =
|
||||
generate_and_fund_keypairs(&clients[0], None, &config.id, config.tx_count, 20).unwrap();
|
||||
let (keypairs, _move_keypairs, _keypair_balance) =
|
||||
generate_and_fund_keypairs(&clients[0], None, &config.id, config.tx_count, 20, false)
|
||||
.unwrap();
|
||||
|
||||
do_bench_tps(clients, config, keypairs, 0);
|
||||
do_bench_tps(clients, config, keypairs, 0, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -741,8 +1030,8 @@ mod tests {
|
||||
let tx_count = 10;
|
||||
let lamports = 20;
|
||||
|
||||
let (keypairs, _keypair_balance) =
|
||||
generate_and_fund_keypairs(&client, None, &id, tx_count, lamports).unwrap();
|
||||
let (keypairs, _move_keypairs, _keypair_balance) =
|
||||
generate_and_fund_keypairs(&client, None, &id, tx_count, lamports, false).unwrap();
|
||||
|
||||
for kp in &keypairs {
|
||||
assert_eq!(client.get_balance(&kp.pubkey()).unwrap(), lamports);
|
||||
@ -759,8 +1048,8 @@ mod tests {
|
||||
let tx_count = 10;
|
||||
let lamports = 20;
|
||||
|
||||
let (keypairs, _keypair_balance) =
|
||||
generate_and_fund_keypairs(&client, None, &id, tx_count, lamports).unwrap();
|
||||
let (keypairs, _move_keypairs, _keypair_balance) =
|
||||
generate_and_fund_keypairs(&client, None, &id, tx_count, lamports, false).unwrap();
|
||||
|
||||
let max_fee = client
|
||||
.get_recent_blockhash()
|
||||
|
@ -22,6 +22,7 @@ pub struct Config {
|
||||
pub write_to_client_file: bool,
|
||||
pub read_from_client_file: bool,
|
||||
pub target_lamports_per_signature: u64,
|
||||
pub use_move: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
@ -40,6 +41,7 @@ impl Default for Config {
|
||||
write_to_client_file: false,
|
||||
read_from_client_file: false,
|
||||
target_lamports_per_signature: FeeCalculator::default().target_lamports_per_signature,
|
||||
use_move: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -100,6 +102,11 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
|
||||
.long("sustained")
|
||||
.help("Use sustained performance mode vs. peak mode. This overlaps the tx generation with transfers."),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("use-move")
|
||||
.long("use-move")
|
||||
.help("Use Move language transactions to perform transfers."),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("tx_count")
|
||||
.long("tx_count")
|
||||
@ -211,5 +218,7 @@ pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
|
||||
args.target_lamports_per_signature = v.to_string().parse().expect("can't parse lamports");
|
||||
}
|
||||
|
||||
args.use_move = matches.is_present("use-move");
|
||||
|
||||
args
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate solana_move_loader_program;
|
||||
|
||||
mod bench;
|
||||
mod cli;
|
||||
|
||||
@ -37,6 +41,7 @@ fn main() {
|
||||
write_to_client_file,
|
||||
read_from_client_file,
|
||||
target_lamports_per_signature,
|
||||
use_move,
|
||||
} = cli_config;
|
||||
|
||||
if write_to_client_file {
|
||||
@ -78,7 +83,7 @@ fn main() {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
let (keypairs, keypair_balance) = if read_from_client_file {
|
||||
let (keypairs, move_keypairs, keypair_balance) = if read_from_client_file && !use_move {
|
||||
let path = Path::new(&client_ids_and_stake_file);
|
||||
let file = File::open(path).unwrap();
|
||||
|
||||
@ -95,7 +100,7 @@ fn main() {
|
||||
// This prevents the amount of storage needed for bench-tps accounts from creeping up
|
||||
// across multiple runs.
|
||||
keypairs.sort_by(|x, y| x.pubkey().to_string().cmp(&y.pubkey().to_string()));
|
||||
(keypairs, last_balance)
|
||||
(keypairs, None, last_balance)
|
||||
} else {
|
||||
generate_and_fund_keypairs(
|
||||
&client,
|
||||
@ -103,6 +108,7 @@ fn main() {
|
||||
&id,
|
||||
tx_count,
|
||||
NUM_LAMPORTS_PER_ACCOUNT,
|
||||
use_move,
|
||||
)
|
||||
.unwrap_or_else(|e| {
|
||||
eprintln!("Error could not fund keys: {:?}", e);
|
||||
@ -117,7 +123,14 @@ fn main() {
|
||||
duration,
|
||||
tx_count,
|
||||
sustained,
|
||||
use_move,
|
||||
};
|
||||
|
||||
do_bench_tps(vec![client], config, keypairs, keypair_balance);
|
||||
do_bench_tps(
|
||||
vec![client],
|
||||
config,
|
||||
keypairs,
|
||||
keypair_balance,
|
||||
move_keypairs,
|
||||
);
|
||||
}
|
||||
|
@ -59,10 +59,8 @@
|
||||
- [Economic Design MVP](ed_mvp.md)
|
||||
- [References](ed_references.md)
|
||||
- [Cluster Test Framework](cluster-test-framework.md)
|
||||
- [Credit-only Accounts](credit-only-credit-debit-accounts.md)
|
||||
- [Validator](validator-proposal.md)
|
||||
- [Simple Payment and State Verification](simple-payment-and-state-verification.md)
|
||||
- [Embedding the Move Langauge](embedding-move.md)
|
||||
- [Cross-Program Invocation](cross-program-invocation.md)
|
||||
|
||||
- [Implemented Design Proposals](implemented-proposals.md)
|
||||
@ -77,3 +75,5 @@
|
||||
- [Reliable Vote Transmission](reliable-vote-transmission.md)
|
||||
- [Repair Service](repair-service.md)
|
||||
- [Testing Programs](testing-programs.md)
|
||||
- [Credit-only Accounts](credit-only-credit-debit-accounts.md)
|
||||
- [Embedding the Move Langauge](embedding-move.md)
|
||||
|
@ -74,7 +74,7 @@ The `solana-install` tool can be used to easily install and upgrade the cluster
|
||||
software on Linux x86_64 and mac OS systems.
|
||||
|
||||
```bash
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.5/install/solana-install-init.sh | sh -s
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.17.0/install/solana-install-init.sh | sh -s
|
||||
```
|
||||
|
||||
Alternatively build the `solana-install` program from source and run the
|
||||
|
@ -53,8 +53,7 @@ software.
|
||||
|
||||
##### Linux and mac OS
|
||||
```bash
|
||||
$ export SOLANA_RELEASE=v0.16.0 # skip this line to install the latest release
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.0/install/solana-install-init.sh | sh -s
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.17.0/install/solana-install-init.sh | sh -s
|
||||
```
|
||||
|
||||
Alternatively build the `solana-install` program from source and run the
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-chacha-sys"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana chacha-sys"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
steps:
|
||||
- command: "sdk/docker-solana/build.sh"
|
||||
timeout_in_minutes: 40
|
||||
timeout_in_minutes: 60
|
||||
name: "publish docker"
|
||||
- command: "ci/publish-crate.sh"
|
||||
timeout_in_minutes: 90
|
||||
@ -10,7 +10,7 @@ steps:
|
||||
timeout_in_minutes: 5
|
||||
name: "publish bpf sdk"
|
||||
- command: "ci/publish-tarball.sh"
|
||||
timeout_in_minutes: 45
|
||||
timeout_in_minutes: 60
|
||||
name: "publish tarball"
|
||||
- command: "ci/publish-book.sh"
|
||||
timeout_in_minutes: 15
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-client"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Client"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -19,10 +19,10 @@ reqwest = "0.9.19"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
jsonrpc-core = "12.1.0"
|
||||
jsonrpc-http-server = "12.1.0"
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "../README.md"
|
||||
@ -46,29 +46,25 @@ rocksdb = "0.11.0"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.17.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.17.0" }
|
||||
solana-chacha-sys = { path = "../chacha-sys", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-config-program = { path = "../programs/config_program", version = "0.17.0" }
|
||||
solana-drone = { path = "../drone", version = "0.17.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.17.1" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.17.1" }
|
||||
solana-chacha-sys = { path = "../chacha-sys", version = "0.17.1" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-drone = { path = "../drone", version = "0.17.1" }
|
||||
solana-ed25519-dalek = "0.2.0"
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.17.0" }
|
||||
solana-kvstore = { path = "../kvstore", version = "0.17.0", optional = true }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-merkle-tree = { path = "../merkle-tree", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-measure = { path = "../measure", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.0" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.17.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.0" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.0" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.17.0" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.17.0" }
|
||||
solana-kvstore = { path = "../kvstore", version = "0.17.1", optional = true }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-merkle-tree = { path = "../merkle-tree", version = "0.17.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-measure = { path = "../measure", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.1" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.1" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.17.1" }
|
||||
sys-info = "0.5.7"
|
||||
tokio = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
|
@ -155,15 +155,15 @@ impl LocalCluster {
|
||||
genesis_block
|
||||
.native_instruction_processors
|
||||
.extend_from_slice(&config.native_instruction_processors);
|
||||
genesis_block
|
||||
.native_instruction_processors
|
||||
.push(solana_storage_program!());
|
||||
|
||||
let storage_keypair = Keypair::new();
|
||||
genesis_block.accounts.push((
|
||||
storage_keypair.pubkey(),
|
||||
storage_contract::create_validator_storage_account(leader_pubkey, 1),
|
||||
));
|
||||
genesis_block
|
||||
.native_instruction_processors
|
||||
.push(solana_storage_program!());
|
||||
|
||||
let (leader_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
||||
let leader_contact_info = leader_node.info.clone();
|
||||
|
@ -150,13 +150,23 @@ pub(crate) mod tests {
|
||||
|
||||
// First epoch has the bootstrap leader
|
||||
expected.insert(voting_keypair.pubkey(), leader_stake.stake(0));
|
||||
let expected = Some(expected);
|
||||
assert_eq!(vote_account_stakes_at_epoch(&bank, 0), expected);
|
||||
assert_eq!(
|
||||
vote_account_stakes_at_epoch(&bank, 0),
|
||||
Some(expected.clone())
|
||||
);
|
||||
|
||||
// Second epoch carries same information
|
||||
let bank = new_from_parent(&Arc::new(bank), 1);
|
||||
assert_eq!(vote_account_stakes_at_epoch(&bank, 0), expected);
|
||||
assert_eq!(vote_account_stakes_at_epoch(&bank, 1), expected);
|
||||
assert_eq!(
|
||||
vote_account_stakes_at_epoch(&bank, 0),
|
||||
Some(expected.clone())
|
||||
);
|
||||
|
||||
expected.insert(voting_keypair.pubkey(), leader_stake.stake(1));
|
||||
assert_eq!(
|
||||
vote_account_stakes_at_epoch(&bank, 1),
|
||||
Some(expected.clone())
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn setup_vote_and_stake_accounts(
|
||||
@ -223,7 +233,7 @@ pub(crate) mod tests {
|
||||
..
|
||||
} = create_genesis_block(10_000);
|
||||
|
||||
let bank = Bank::new(&genesis_block);
|
||||
let mut bank = Bank::new(&genesis_block);
|
||||
let vote_pubkey = Pubkey::new_rand();
|
||||
|
||||
// Give the validator some stake but don't setup a staking account
|
||||
@ -244,24 +254,21 @@ pub(crate) mod tests {
|
||||
|
||||
let other_stake = Stake {
|
||||
stake,
|
||||
activated: bank.get_stakers_epoch(bank.slot()),
|
||||
..Stake::default()
|
||||
};
|
||||
|
||||
// soonest slot that could be a new epoch is 1
|
||||
let mut slot = 1;
|
||||
let mut epoch = bank.get_stakers_epoch(0);
|
||||
// find the first slot in the next stakers_epoch
|
||||
while bank.get_stakers_epoch(slot) == epoch {
|
||||
slot += 1;
|
||||
let epoch = bank.get_stakers_epoch(bank.slot());
|
||||
// find the first slot in the next staker's epoch
|
||||
while bank.epoch() <= epoch {
|
||||
let slot = bank.slot() + 1;
|
||||
bank = new_from_parent(&Arc::new(bank), slot);
|
||||
}
|
||||
epoch = bank.get_stakers_epoch(slot);
|
||||
|
||||
let bank = new_from_parent(&Arc::new(bank), slot);
|
||||
|
||||
let result: Vec<_> = epoch_stakes_and_lockouts(&bank, 0);
|
||||
assert_eq!(result, vec![(leader_stake.stake(0), None)]);
|
||||
|
||||
let mut result: Vec<_> = epoch_stakes_and_lockouts(&bank, epoch);
|
||||
let mut result: Vec<_> = epoch_stakes_and_lockouts(&bank, bank.epoch());
|
||||
result.sort();
|
||||
let mut expected = vec![
|
||||
(leader_stake.stake(bank.epoch()), None),
|
||||
|
@ -21,6 +21,7 @@ use std::time::Duration;
|
||||
#[serial]
|
||||
fn test_ledger_cleanup_service() {
|
||||
solana_logger::setup();
|
||||
error!("test_ledger_cleanup_service");
|
||||
let num_nodes = 3;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.max_ledger_slots = Some(100);
|
||||
@ -59,6 +60,7 @@ fn test_ledger_cleanup_service() {
|
||||
#[serial]
|
||||
fn test_spend_and_verify_all_nodes_1() {
|
||||
solana_logger::setup();
|
||||
error!("test_spend_and_verify_all_nodes_1");
|
||||
let num_nodes = 1;
|
||||
let local = LocalCluster::new_with_equal_stakes(num_nodes, 10_000, 100);
|
||||
cluster_tests::spend_and_verify_all_nodes(
|
||||
@ -73,6 +75,7 @@ fn test_spend_and_verify_all_nodes_1() {
|
||||
#[serial]
|
||||
fn test_spend_and_verify_all_nodes_2() {
|
||||
solana_logger::setup();
|
||||
error!("test_spend_and_verify_all_nodes_2");
|
||||
let num_nodes = 2;
|
||||
let local = LocalCluster::new_with_equal_stakes(num_nodes, 10_000, 100);
|
||||
cluster_tests::spend_and_verify_all_nodes(
|
||||
@ -87,6 +90,7 @@ fn test_spend_and_verify_all_nodes_2() {
|
||||
#[serial]
|
||||
fn test_spend_and_verify_all_nodes_3() {
|
||||
solana_logger::setup();
|
||||
error!("test_spend_and_verify_all_nodes_3");
|
||||
let num_nodes = 3;
|
||||
let local = LocalCluster::new_with_equal_stakes(num_nodes, 10_000, 100);
|
||||
cluster_tests::spend_and_verify_all_nodes(
|
||||
@ -122,6 +126,7 @@ fn test_spend_and_verify_all_nodes_env_num_nodes() {
|
||||
#[should_panic]
|
||||
fn test_fullnode_exit_default_config_should_panic() {
|
||||
solana_logger::setup();
|
||||
error!("test_fullnode_exit_default_config_should_panic");
|
||||
let num_nodes = 2;
|
||||
let local = LocalCluster::new_with_equal_stakes(num_nodes, 10_000, 100);
|
||||
cluster_tests::fullnode_exit(&local.entry_point_info, num_nodes);
|
||||
@ -131,6 +136,7 @@ fn test_fullnode_exit_default_config_should_panic() {
|
||||
#[serial]
|
||||
fn test_fullnode_exit_2() {
|
||||
solana_logger::setup();
|
||||
error!("test_fullnode_exit_2");
|
||||
let num_nodes = 2;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.rpc_config.enable_fullnode_exit = true;
|
||||
@ -145,10 +151,13 @@ fn test_fullnode_exit_2() {
|
||||
}
|
||||
|
||||
// Cluster needs a supermajority to remain, so the minimum size for this test is 4
|
||||
#[allow(unused_attributes)]
|
||||
#[test]
|
||||
#[serial]
|
||||
#[ignore]
|
||||
fn test_leader_failure_4() {
|
||||
solana_logger::setup();
|
||||
error!("test_leader_failure_4");
|
||||
let num_nodes = 4;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.rpc_config.enable_fullnode_exit = true;
|
||||
@ -170,6 +179,7 @@ fn test_leader_failure_4() {
|
||||
#[serial]
|
||||
fn test_two_unbalanced_stakes() {
|
||||
solana_logger::setup();
|
||||
error!("test_two_unbalanced_stakes");
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
let num_ticks_per_second = 100;
|
||||
let num_ticks_per_slot = 10;
|
||||
@ -231,6 +241,8 @@ fn test_forwarding() {
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_restart_node() {
|
||||
solana_logger::setup();
|
||||
error!("test_restart_node");
|
||||
let slots_per_epoch = MINIMUM_SLOTS_PER_EPOCH as u64;
|
||||
let ticks_per_slot = 16;
|
||||
let mut cluster = LocalCluster::new(&ClusterConfig {
|
||||
@ -273,14 +285,18 @@ fn test_listener_startup() {
|
||||
assert_eq!(cluster_nodes.len(), 4);
|
||||
}
|
||||
|
||||
#[allow(unused_attributes)]
|
||||
#[test]
|
||||
#[serial]
|
||||
#[ignore]
|
||||
fn test_fail_entry_verification_leader() {
|
||||
test_faulty_node(BroadcastStageType::FailEntryVerification);
|
||||
}
|
||||
|
||||
#[allow(unused_attributes)]
|
||||
#[test]
|
||||
#[serial]
|
||||
#[ignore]
|
||||
fn test_bad_blob_size_leader() {
|
||||
test_faulty_node(BroadcastStageType::BroadcastBadBlobSizes);
|
||||
}
|
||||
@ -344,10 +360,13 @@ fn test_faulty_node(faulty_node_type: BroadcastStageType) {
|
||||
);
|
||||
}
|
||||
|
||||
#[allow(unused_attributes)]
|
||||
#[test]
|
||||
#[serial]
|
||||
#[ignore]
|
||||
fn test_repairman_catchup() {
|
||||
solana_logger::setup();
|
||||
error!("test_repairman_catchup");
|
||||
run_repairman_catchup(3);
|
||||
}
|
||||
|
||||
|
@ -79,8 +79,10 @@ fn test_replicator_startup_1_node() {
|
||||
run_replicator_startup_basic(1, 1);
|
||||
}
|
||||
|
||||
#[allow(unused_attributes)]
|
||||
#[test]
|
||||
#[serial]
|
||||
#[ignore]
|
||||
fn test_replicator_startup_2_nodes() {
|
||||
run_replicator_startup_basic(2, 1);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-drone"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Drone"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -20,9 +20,9 @@ clap = "2.33"
|
||||
log = "0.4.7"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
tokio = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-genesis"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -15,24 +15,12 @@ serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
serde_yaml = "0.8.9"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.17.0" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.17.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.17.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.17.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.17.0" }
|
||||
solana-config-program = { path = "../programs/config_program", version = "0.17.0" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.17.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.0" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.17.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.0" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.17.0" }
|
||||
solana-token-api = { path = "../programs/token_api", version = "0.17.0" }
|
||||
solana-token-program = { path = "../programs/token_program", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.0" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
hashbrown = "0.3.0"
|
||||
|
@ -1,20 +1,4 @@
|
||||
//! A command-line executable for generating the chain's genesis block.
|
||||
#[macro_use]
|
||||
extern crate solana_bpf_loader_program;
|
||||
#[macro_use]
|
||||
extern crate solana_vote_program;
|
||||
#[macro_use]
|
||||
extern crate solana_stake_program;
|
||||
#[macro_use]
|
||||
extern crate solana_budget_program;
|
||||
#[macro_use]
|
||||
extern crate solana_token_program;
|
||||
#[macro_use]
|
||||
extern crate solana_config_program;
|
||||
#[macro_use]
|
||||
extern crate solana_exchange_program;
|
||||
#[macro_use]
|
||||
extern crate solana_storage_program;
|
||||
|
||||
use clap::{crate_description, crate_name, crate_version, value_t_or_exit, App, Arg};
|
||||
use solana::blocktree::create_new_ledger;
|
||||
@ -298,16 +282,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
),
|
||||
),
|
||||
])
|
||||
.native_instruction_processors(&[
|
||||
solana_bpf_loader_program!(),
|
||||
solana_vote_program!(),
|
||||
solana_stake_program!(),
|
||||
solana_budget_program!(),
|
||||
solana_token_program!(),
|
||||
solana_config_program!(),
|
||||
solana_exchange_program!(),
|
||||
solana_storage_program!(),
|
||||
])
|
||||
.native_instruction_processors(&solana_genesis_programs::get())
|
||||
.ticks_per_slot(value_t_or_exit!(matches, "ticks_per_slot", u64))
|
||||
.slots_per_epoch(value_t_or_exit!(matches, "slots_per_epoch", u64));
|
||||
|
||||
@ -366,7 +341,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use hashbrown::HashSet;
|
||||
use solana_sdk::genesis_block::Builder;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use std::collections::HashMap;
|
||||
@ -374,24 +348,6 @@ mod tests {
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
|
||||
#[test]
|
||||
fn test_program_id_uniqueness() {
|
||||
let mut unique = HashSet::new();
|
||||
let ids = vec![
|
||||
solana_sdk::system_program::id(),
|
||||
solana_sdk::native_loader::id(),
|
||||
solana_sdk::bpf_loader::id(),
|
||||
solana_budget_api::id(),
|
||||
solana_storage_api::id(),
|
||||
solana_token_api::id(),
|
||||
solana_vote_api::id(),
|
||||
solana_stake_api::id(),
|
||||
solana_config_api::id(),
|
||||
solana_exchange_api::id(),
|
||||
];
|
||||
assert!(ids.into_iter().all(move |id| unique.insert(id)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_append_primordial_accounts_to_genesis() {
|
||||
// Test invalid file returns error
|
||||
|
2
genesis_programs/.gitignore
vendored
Normal file
2
genesis_programs/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/target/
|
||||
/farf/
|
35
genesis_programs/Cargo.toml
Normal file
35
genesis_programs/Cargo.toml
Normal file
@ -0,0 +1,35 @@
|
||||
[package]
|
||||
name = "solana-genesis-programs"
|
||||
version = "0.17.1"
|
||||
description = "Solana genesis programs"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hashbrown = "0.2.0"
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.17.1" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.17.1" }
|
||||
solana-budget-api= { path = "../programs/budget_api", version = "0.17.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.17.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.17.1" }
|
||||
solana-config-program = { path = "../programs/config_program", version = "0.17.1" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.17.1" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.17.1" }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.17.1" }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.1" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.17.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.1" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.17.1" }
|
||||
solana-token-api = { path = "../programs/token_api", version = "0.17.1" }
|
||||
solana-token-program = { path = "../programs/token_program", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.1" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
name = "solana_genesis_programs"
|
58
genesis_programs/src/lib.rs
Normal file
58
genesis_programs/src/lib.rs
Normal file
@ -0,0 +1,58 @@
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
||||
#[macro_use]
|
||||
extern crate solana_bpf_loader_program;
|
||||
#[macro_use]
|
||||
extern crate solana_budget_program;
|
||||
#[macro_use]
|
||||
extern crate solana_config_program;
|
||||
#[macro_use]
|
||||
extern crate solana_exchange_program;
|
||||
#[macro_use]
|
||||
extern crate solana_move_loader_program;
|
||||
#[macro_use]
|
||||
extern crate solana_stake_program;
|
||||
#[macro_use]
|
||||
extern crate solana_storage_program;
|
||||
#[macro_use]
|
||||
extern crate solana_token_program;
|
||||
#[macro_use]
|
||||
extern crate solana_vote_program;
|
||||
|
||||
pub fn get() -> Vec<(String, Pubkey)> {
|
||||
vec![
|
||||
solana_bpf_loader_program!(),
|
||||
solana_budget_program!(),
|
||||
solana_config_program!(),
|
||||
solana_exchange_program!(),
|
||||
solana_move_loader_program!(),
|
||||
solana_stake_program!(),
|
||||
solana_storage_program!(),
|
||||
solana_token_program!(),
|
||||
solana_vote_program!(),
|
||||
]
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use hashbrown::HashSet;
|
||||
|
||||
#[test]
|
||||
fn test_id_uniqueness() {
|
||||
let mut unique = HashSet::new();
|
||||
let ids = vec![
|
||||
solana_budget_api::id(),
|
||||
solana_config_api::id(),
|
||||
solana_exchange_api::id(),
|
||||
solana_move_loader_api::id(),
|
||||
solana_sdk::bpf_loader::id(),
|
||||
solana_sdk::native_loader::id(),
|
||||
solana_sdk::system_program::id(),
|
||||
solana_stake_api::id(),
|
||||
solana_storage_api::id(),
|
||||
solana_token_api::id(),
|
||||
solana_vote_api::id(),
|
||||
];
|
||||
assert!(ids.into_iter().all(move |id| unique.insert(id)));
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-gossip"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -11,10 +11,10 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
env_logger = "0.6.2"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-install"
|
||||
description = "The solana cluster software installer"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -32,10 +32,10 @@ serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_yaml = "0.8.9"
|
||||
sha2 = "0.8.0"
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
tar = "0.4.26"
|
||||
tempdir = "0.3.7"
|
||||
url = "2.0.0"
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::config::Config;
|
||||
use crate::config::{Config, ExplicitRelease};
|
||||
use crate::stop_process::stop_process;
|
||||
use crate::update_manifest::{SignedUpdateManifest, UpdateManifest};
|
||||
use chrono::{Local, TimeZone};
|
||||
@ -492,7 +492,7 @@ pub fn init(
|
||||
json_rpc_url: &str,
|
||||
update_manifest_pubkey: &Pubkey,
|
||||
no_modify_path: bool,
|
||||
release_semver: Option<&str>,
|
||||
explicit_release: Option<ExplicitRelease>,
|
||||
) -> Result<(), String> {
|
||||
let config = {
|
||||
// Write new config file only if different, so that running |solana-install init|
|
||||
@ -503,7 +503,7 @@ pub fn init(
|
||||
data_dir,
|
||||
json_rpc_url,
|
||||
update_manifest_pubkey,
|
||||
release_semver,
|
||||
explicit_release,
|
||||
);
|
||||
if current_config != config {
|
||||
config.save(config_file)?;
|
||||
@ -525,7 +525,7 @@ pub fn init(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn github_download_url(release_semver: &str) -> String {
|
||||
fn github_release_download_url(release_semver: &str) -> String {
|
||||
format!(
|
||||
"https://github.com/solana-labs/solana/releases/download/v{}/solana-release-{}.tar.bz2",
|
||||
release_semver,
|
||||
@ -533,6 +533,14 @@ fn github_download_url(release_semver: &str) -> String {
|
||||
)
|
||||
}
|
||||
|
||||
fn release_channel_download_url(release_channel: &str) -> String {
|
||||
format!(
|
||||
"http://release.solana.com/{}/solana-release-{}.tar.bz2",
|
||||
release_channel,
|
||||
crate::build_env::TARGET
|
||||
)
|
||||
}
|
||||
|
||||
pub fn info(config_file: &str, local_info_only: bool) -> Result<Option<UpdateManifest>, String> {
|
||||
let config = Config::load(config_file)?;
|
||||
|
||||
@ -541,12 +549,24 @@ pub fn info(config_file: &str, local_info_only: bool) -> Result<Option<UpdateMan
|
||||
"Active release directory:",
|
||||
&config.active_release_dir().to_str().unwrap_or("?"),
|
||||
);
|
||||
if let Some(release_semver) = &config.release_semver {
|
||||
println_name_value(&format!("{}Release version:", BULLET), &release_semver);
|
||||
println_name_value(
|
||||
&format!("{}Release URL:", BULLET),
|
||||
&github_download_url(release_semver),
|
||||
);
|
||||
|
||||
if let Some(explicit_release) = &config.explicit_release {
|
||||
match explicit_release {
|
||||
ExplicitRelease::Semver(release_semver) => {
|
||||
println_name_value(&format!("{}Release version:", BULLET), &release_semver);
|
||||
println_name_value(
|
||||
&format!("{}Release URL:", BULLET),
|
||||
&github_release_download_url(release_semver),
|
||||
);
|
||||
}
|
||||
ExplicitRelease::Channel(release_channel) => {
|
||||
println_name_value(&format!("{}Release channel:", BULLET), &release_channel);
|
||||
println_name_value(
|
||||
&format!("{}Release URL:", BULLET),
|
||||
&release_channel_download_url(release_channel),
|
||||
);
|
||||
}
|
||||
}
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
@ -696,13 +716,27 @@ pub fn update(config_file: &str) -> Result<bool, String> {
|
||||
let mut config = Config::load(config_file)?;
|
||||
let update_manifest = info(config_file, false)?;
|
||||
|
||||
let release_dir = if let Some(release_semver) = &config.release_semver {
|
||||
let download_url = github_download_url(release_semver);
|
||||
let release_dir = config.release_dir(&release_semver);
|
||||
let ok_dir = release_dir.join(".ok");
|
||||
if ok_dir.exists() {
|
||||
return Ok(false);
|
||||
}
|
||||
let release_dir = if let Some(explicit_release) = &config.explicit_release {
|
||||
let (download_url, release_dir) = match explicit_release {
|
||||
ExplicitRelease::Semver(release_semver) => {
|
||||
let download_url = github_release_download_url(release_semver);
|
||||
let release_dir = config.release_dir(&release_semver);
|
||||
if release_dir.join(".ok").exists() {
|
||||
// If this release_semver has already been successfully downloaded, no update
|
||||
// needed
|
||||
return Ok(false);
|
||||
}
|
||||
(download_url, release_dir)
|
||||
}
|
||||
ExplicitRelease::Channel(release_channel) => {
|
||||
let download_url = release_channel_download_url(release_channel);
|
||||
let release_dir = config.release_dir(&release_channel);
|
||||
// Note: There's currently no mechanism to check for an updated binary for a release
|
||||
// channel so a download always occurs.
|
||||
(download_url, release_dir)
|
||||
}
|
||||
};
|
||||
|
||||
let (_temp_dir, temp_archive, _temp_archive_sha256) =
|
||||
download_to_temp_archive(&download_url, None)
|
||||
.map_err(|err| format!("Unable to download {}: {}", download_url, err))?;
|
||||
@ -712,7 +746,7 @@ pub fn update(config_file: &str) -> Result<bool, String> {
|
||||
temp_archive, release_dir, err
|
||||
)
|
||||
})?;
|
||||
let _ = fs::create_dir_all(ok_dir);
|
||||
let _ = fs::create_dir_all(release_dir.join(".ok"));
|
||||
|
||||
release_dir
|
||||
} else {
|
||||
@ -843,7 +877,7 @@ pub fn run(
|
||||
}
|
||||
};
|
||||
|
||||
if now.elapsed().as_secs() > config.update_poll_secs {
|
||||
if config.explicit_release.is_none() && now.elapsed().as_secs() > config.update_poll_secs {
|
||||
match update(config_file) {
|
||||
Ok(true) => {
|
||||
// Update successful, kill current process so it will be restart
|
||||
|
@ -5,13 +5,19 @@ use std::fs::{create_dir_all, File};
|
||||
use std::io::{self, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
pub enum ExplicitRelease {
|
||||
Semver(String),
|
||||
Channel(String),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Debug, PartialEq)]
|
||||
pub struct Config {
|
||||
pub json_rpc_url: String,
|
||||
pub update_manifest_pubkey: Pubkey,
|
||||
pub current_update_manifest: Option<UpdateManifest>,
|
||||
pub update_poll_secs: u64,
|
||||
pub release_semver: Option<String>,
|
||||
pub explicit_release: Option<ExplicitRelease>,
|
||||
releases_dir: PathBuf,
|
||||
active_release_dir: PathBuf,
|
||||
}
|
||||
@ -21,14 +27,14 @@ impl Config {
|
||||
data_dir: &str,
|
||||
json_rpc_url: &str,
|
||||
update_manifest_pubkey: &Pubkey,
|
||||
release_semver: Option<&str>,
|
||||
explicit_release: Option<ExplicitRelease>,
|
||||
) -> Self {
|
||||
Self {
|
||||
json_rpc_url: json_rpc_url.to_string(),
|
||||
update_manifest_pubkey: *update_manifest_pubkey,
|
||||
current_update_manifest: None,
|
||||
update_poll_secs: 60, // check for updates once a minute
|
||||
release_semver: release_semver.map(|s| s.to_string()),
|
||||
explicit_release,
|
||||
releases_dir: PathBuf::from(data_dir).join("releases"),
|
||||
active_release_dir: PathBuf::from(data_dir).join("active_release"),
|
||||
}
|
||||
|
@ -33,13 +33,20 @@ fn is_pubkey(string: String) -> Result<(), String> {
|
||||
}
|
||||
}
|
||||
|
||||
fn is_semver(string: String) -> Result<(), String> {
|
||||
match semver::Version::parse(&string) {
|
||||
fn is_semver(semver: &str) -> Result<(), String> {
|
||||
match semver::Version::parse(&semver) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => Err(format!("{:?}", err)),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_release_channel(channel: &str) -> Result<(), String> {
|
||||
match channel {
|
||||
"edge" | "beta" | "stable" => Ok(()),
|
||||
_ => Err(format!("Invalid release channel {}", channel)),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() -> Result<(), String> {
|
||||
solana_logger::setup();
|
||||
|
||||
@ -107,12 +114,12 @@ pub fn main() -> Result<(), String> {
|
||||
}
|
||||
})
|
||||
.arg(
|
||||
Arg::with_name("release_semver")
|
||||
.value_name("release-semver")
|
||||
Arg::with_name("explicit_release")
|
||||
.value_name("release")
|
||||
.index(1)
|
||||
.conflicts_with_all(&["json_rpc_url", "update_manifest_pubkey"])
|
||||
.validator(is_semver)
|
||||
.help("The exact version to install. Updates will not be available if this argument is used"),
|
||||
.validator(|string| is_semver(&string).or_else(|_| is_release_channel(&string)))
|
||||
.help("The exact version to install. Either a semver or release channel name"),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
@ -206,7 +213,9 @@ pub fn main() -> Result<(), String> {
|
||||
.unwrap();
|
||||
let data_dir = matches.value_of("data_dir").unwrap();
|
||||
let no_modify_path = matches.is_present("no_modify_path");
|
||||
let release_semver = matches.value_of("release_semver");
|
||||
let explicit_release = matches
|
||||
.value_of("explicit_release")
|
||||
.map(ToString::to_string);
|
||||
|
||||
command::init(
|
||||
config_file,
|
||||
@ -214,7 +223,13 @@ pub fn main() -> Result<(), String> {
|
||||
json_rpc_url,
|
||||
&update_manifest_pubkey,
|
||||
no_modify_path,
|
||||
release_semver,
|
||||
explicit_release.map(|explicit_release| {
|
||||
if is_semver(&explicit_release).is_ok() {
|
||||
config::ExplicitRelease::Semver(explicit_release)
|
||||
} else {
|
||||
config::ExplicitRelease::Channel(explicit_release)
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
("info", Some(matches)) => {
|
||||
@ -310,11 +325,11 @@ pub fn main_init() -> Result<(), String> {
|
||||
}
|
||||
})
|
||||
.arg(
|
||||
Arg::with_name("release_semver")
|
||||
.value_name("release-semver")
|
||||
Arg::with_name("explicit_release")
|
||||
.value_name("release")
|
||||
.index(1)
|
||||
.conflicts_with_all(&["json_rpc_url", "update_manifest_pubkey"])
|
||||
.validator(is_semver)
|
||||
.validator(|string| is_semver(&string).or_else(|_| is_release_channel(&string)))
|
||||
.help("The exact version to install. Updates will not be available if this argument is used"),
|
||||
)
|
||||
.get_matches();
|
||||
@ -329,7 +344,9 @@ pub fn main_init() -> Result<(), String> {
|
||||
.unwrap();
|
||||
let data_dir = matches.value_of("data_dir").unwrap();
|
||||
let no_modify_path = matches.is_present("no_modify_path");
|
||||
let release_semver = matches.value_of("release_semver");
|
||||
let explicit_release = matches
|
||||
.value_of("explicit_release")
|
||||
.map(ToString::to_string);
|
||||
|
||||
command::init(
|
||||
config_file,
|
||||
@ -337,6 +354,12 @@ pub fn main_init() -> Result<(), String> {
|
||||
json_rpc_url,
|
||||
&update_manifest_pubkey,
|
||||
no_modify_path,
|
||||
release_semver,
|
||||
explicit_release.map(|explicit_release| {
|
||||
if is_semver(&explicit_release).is_ok() {
|
||||
config::ExplicitRelease::Semver(explicit_release)
|
||||
} else {
|
||||
config::ExplicitRelease::Channel(explicit_release)
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-keygen"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana key generation utility"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -15,7 +15,7 @@ cuda = []
|
||||
[dependencies]
|
||||
clap = "2.33"
|
||||
dirs = "2.0.1"
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[[bin]]
|
||||
name = "solana-keygen"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana-kvstore"
|
||||
description = "Embedded Key-Value store for solana"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
homepage = "https://solana.com/"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-ledger-tool"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -15,10 +15,10 @@ serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
serde_yaml = "0.8.9"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_cmd = "0.11"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-logger"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Logger"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana-measure"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "../README.md"
|
||||
@ -11,4 +11,4 @@ license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-merkle-tree"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Merkle Tree"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -9,7 +9,7 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
hex = "0.3.2"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-metrics"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Metrics"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,7 +14,7 @@ influx_db_client = "0.3.6"
|
||||
lazy_static = "1.3.0"
|
||||
log = "0.4.7"
|
||||
reqwest = "0.9.19"
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
sys-info = "0.5.7"
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-netutil"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Network Utilities"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -15,7 +15,7 @@ log = "0.4.7"
|
||||
nix = "0.14.1"
|
||||
rand = "0.6.1"
|
||||
socket2 = "0.3.9"
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
tokio = "0.1"
|
||||
|
||||
[lib]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana-bpf-programs"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "README.md"
|
||||
@ -22,10 +22,10 @@ walkdir = "2"
|
||||
bincode = "1.1.4"
|
||||
byteorder = "1.3.2"
|
||||
elf = "0.0.10"
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.17.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana_rbpf = "=0.1.13"
|
||||
|
||||
[[bench]]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-128bit"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF iter program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,12 +12,12 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.17.1" }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/rust-test", version = "0.17.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/rust-test", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-128bit-dep"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF many-args-dep program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/rust-test", version = "0.17.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/rust-test", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-alloc"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF alloc program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-dep-crate"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF dep-crate program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,8 +13,8 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
byteorder = { version = "1", default-features = false }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-external-spend"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF external spend program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-iter"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF iter program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-many-args"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF many-args program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,9 +12,9 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-many-args-dep"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF many-args-dep program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/rust-test", version = "0.17.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/rust-test", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-noop"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF noop program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-panic"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF iter program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-tick-height"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF noop program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,8 +13,8 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
byteorder = { version = "1", default-features = false }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.0" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.0" }
|
||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.17.1" }
|
||||
solana-sdk-bpf-no-std = { path = "../../../../sdk/bpf/rust/rust-no-std", version = "0.17.1" }
|
||||
|
||||
[workspace]
|
||||
members = []
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bpf-loader-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,8 +14,8 @@ byteorder = "1.3.2"
|
||||
libc = "0.2.58"
|
||||
log = "0.4.7"
|
||||
serde = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana_rbpf = "=0.1.13"
|
||||
|
||||
[lib]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bpf-loader-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-budget-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Budget program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -16,10 +16,10 @@ num-derive = "0.2"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-budget-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana budget program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-budget-api = { path = "../budget_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-budget-api = { path = "../budget_api", version = "0.17.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-config-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "config program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,11 +13,11 @@ bincode = "1.1.4"
|
||||
log = "0.4.7"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-config-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "config program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-config-api = { path = "../config_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-config-api = { path = "../config_api", version = "0.17.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-exchange-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Exchange program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,12 +13,12 @@ bincode = "1.1.4"
|
||||
log = "0.4.7"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-exchange-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana exchange program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-exchange-api = { path = "../exchange_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-exchange-api = { path = "../exchange_api", version = "0.17.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-failure-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana failure program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,10 +10,10 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
3
programs/librapay_api/.gitignore
vendored
Normal file
3
programs/librapay_api/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/farf/
|
||||
/target/
|
||||
Cargo.lock
|
23
programs/librapay_api/Cargo.toml
Normal file
23
programs/librapay_api/Cargo.toml
Normal file
@ -0,0 +1,23 @@
|
||||
[package]
|
||||
name = "solana-librapay-api"
|
||||
version = "0.17.1"
|
||||
description = "Solana Libra Payment"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bincode = "1.1.4"
|
||||
log = "0.4.2"
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
types = { version = "0.0.0-sol15", package = "solana_libra_types" }
|
||||
language_e2e_tests = { version = "0.0.0-sol15", package = "solana_libra_language_e2e_tests" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
name = "solana_librapay_api"
|
89
programs/librapay_api/src/lib.rs
Normal file
89
programs/librapay_api/src/lib.rs
Normal file
@ -0,0 +1,89 @@
|
||||
const LIBRAPAY_PROGRAM_ID: [u8; 32] = [
|
||||
5, 13, 18, 222, 165, 11, 80, 225, 56, 103, 125, 38, 15, 252, 181, 16, 125, 99, 110, 106, 186,
|
||||
28, 136, 119, 235, 245, 20, 80, 0, 0, 0, 0,
|
||||
];
|
||||
|
||||
solana_sdk::solana_name_id!(
|
||||
LIBRAPAY_PROGRAM_ID,
|
||||
"LibraPay11111111111111111111111111111111111"
|
||||
);
|
||||
|
||||
pub mod librapay_instruction;
|
||||
pub mod librapay_transaction;
|
||||
|
||||
extern crate solana_move_loader_api;
|
||||
|
||||
use solana_move_loader_api::account_state::LibraAccountState;
|
||||
use solana_runtime::loader_utils::load_program;
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::client::Client;
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
use solana_sdk::message::Message;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_instruction;
|
||||
|
||||
use types::account_address::AccountAddress;
|
||||
|
||||
pub fn create_genesis<T: Client>(from_key: &Keypair, client: &T, amount: u64) -> Keypair {
|
||||
let libra_genesis_key = Keypair::new();
|
||||
|
||||
let instruction = system_instruction::create_account(
|
||||
&from_key.pubkey(),
|
||||
&libra_genesis_key.pubkey(),
|
||||
1,
|
||||
bincode::serialize(&LibraAccountState::create_genesis(1))
|
||||
.unwrap()
|
||||
.len() as u64,
|
||||
&solana_move_loader_api::id(),
|
||||
);
|
||||
client.send_instruction(&from_key, instruction).unwrap();
|
||||
|
||||
let instruction = librapay_instruction::genesis(&libra_genesis_key.pubkey(), amount);
|
||||
let message = Message::new_with_payer(vec![instruction], Some(&from_key.pubkey()));
|
||||
client
|
||||
.send_message(&[from_key, &libra_genesis_key], message)
|
||||
.unwrap();
|
||||
|
||||
libra_genesis_key
|
||||
}
|
||||
|
||||
pub fn upload_move_program<T: Client>(from: &Keypair, client: &T, code: &str) -> Pubkey {
|
||||
let address = AccountAddress::default();
|
||||
let account_state = LibraAccountState::create_program(&address, code, vec![]);
|
||||
let program_bytes = bincode::serialize(&account_state).unwrap();
|
||||
|
||||
load_program(client, &from, &solana_move_loader_api::id(), program_bytes)
|
||||
}
|
||||
|
||||
pub fn upload_mint_program<T: Client>(from: &Keypair, client: &T) -> Pubkey {
|
||||
let code = "
|
||||
import 0x0.LibraAccount;
|
||||
import 0x0.LibraCoin;
|
||||
main(payee: address, amount: u64) {
|
||||
LibraAccount.mint_to_address(move(payee), move(amount));
|
||||
return;
|
||||
}";
|
||||
upload_move_program(from, client, code)
|
||||
}
|
||||
|
||||
pub fn upload_payment_program<T: Client>(from: &Keypair, client: &T) -> Pubkey {
|
||||
let code = "
|
||||
import 0x0.LibraAccount;
|
||||
import 0x0.LibraCoin;
|
||||
main(payee: address, amount: u64) {
|
||||
LibraAccount.pay_from_sender(move(payee), move(amount));
|
||||
return;
|
||||
}
|
||||
";
|
||||
|
||||
upload_move_program(from, client, code)
|
||||
}
|
||||
|
||||
pub fn process_instruction(
|
||||
program_id: &Pubkey,
|
||||
keyed_accounts: &mut [KeyedAccount],
|
||||
data: &[u8],
|
||||
) -> Result<(), InstructionError> {
|
||||
solana_move_loader_api::processor::process_instruction(program_id, keyed_accounts, data)
|
||||
}
|
98
programs/librapay_api/src/librapay_instruction.rs
Normal file
98
programs/librapay_api/src/librapay_instruction.rs
Normal file
@ -0,0 +1,98 @@
|
||||
use bincode;
|
||||
use solana_move_loader_api::account_state::pubkey_to_address;
|
||||
use solana_move_loader_api::processor::InvokeCommand;
|
||||
use solana_sdk::instruction::{AccountMeta, Instruction};
|
||||
use solana_sdk::loader_instruction::LoaderInstruction;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use types::account_address::AccountAddress;
|
||||
use types::transaction::TransactionArgument;
|
||||
|
||||
pub fn genesis(genesis_pubkey: &Pubkey, microlibras: u64) -> Instruction {
|
||||
let data = bincode::serialize(&InvokeCommand::CreateGenesis(microlibras)).unwrap();
|
||||
let ix_data = LoaderInstruction::InvokeMain { data };
|
||||
|
||||
let accounts = vec![AccountMeta::new(*genesis_pubkey, true)];
|
||||
|
||||
Instruction::new(solana_move_loader_api::id(), &ix_data, accounts)
|
||||
}
|
||||
|
||||
pub fn mint(
|
||||
program_pubkey: &Pubkey,
|
||||
from_pubkey: &Pubkey,
|
||||
to_pubkey: &Pubkey,
|
||||
microlibras: u64,
|
||||
) -> Instruction {
|
||||
let args = vec![
|
||||
TransactionArgument::Address(pubkey_to_address(to_pubkey)),
|
||||
TransactionArgument::U64(microlibras),
|
||||
];
|
||||
|
||||
let data = bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: AccountAddress::default(),
|
||||
function_name: "main".to_string(),
|
||||
args,
|
||||
})
|
||||
.unwrap();
|
||||
let ix_data = LoaderInstruction::InvokeMain { data };
|
||||
|
||||
let accounts = vec![
|
||||
AccountMeta::new_credit_only(*program_pubkey, false),
|
||||
AccountMeta::new(*from_pubkey, true),
|
||||
AccountMeta::new(*to_pubkey, false),
|
||||
];
|
||||
|
||||
Instruction::new(solana_move_loader_api::id(), &ix_data, accounts)
|
||||
}
|
||||
|
||||
pub fn transfer(
|
||||
program_pubkey: &Pubkey,
|
||||
mint_pubkey: &Pubkey,
|
||||
from_pubkey: &Pubkey,
|
||||
to_pubkey: &Pubkey,
|
||||
microlibras: u64,
|
||||
) -> Instruction {
|
||||
let args = vec![
|
||||
TransactionArgument::Address(pubkey_to_address(to_pubkey)),
|
||||
TransactionArgument::U64(microlibras),
|
||||
];
|
||||
|
||||
let data = bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: pubkey_to_address(from_pubkey),
|
||||
function_name: "main".to_string(),
|
||||
args,
|
||||
})
|
||||
.unwrap();
|
||||
let ix_data = LoaderInstruction::InvokeMain { data };
|
||||
|
||||
let accounts = vec![
|
||||
AccountMeta::new_credit_only(*program_pubkey, false),
|
||||
AccountMeta::new_credit_only(*mint_pubkey, false),
|
||||
AccountMeta::new(*from_pubkey, true),
|
||||
AccountMeta::new(*to_pubkey, false),
|
||||
];
|
||||
|
||||
Instruction::new(solana_move_loader_api::id(), &ix_data, accounts)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_pay() {
|
||||
let from = Pubkey::new_rand();
|
||||
let to = Pubkey::new_rand();
|
||||
let program_id = Pubkey::new_rand();
|
||||
let mint_id = Pubkey::new_rand();
|
||||
transfer(&program_id, &mint_id, &from, &to, 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mint() {
|
||||
let program_id = Pubkey::new_rand();
|
||||
let from = Pubkey::new_rand();
|
||||
let to = Pubkey::new_rand();
|
||||
|
||||
mint(&program_id, &from, &to, 1);
|
||||
}
|
||||
}
|
217
programs/librapay_api/src/librapay_transaction.rs
Normal file
217
programs/librapay_api/src/librapay_transaction.rs
Normal file
@ -0,0 +1,217 @@
|
||||
use crate::librapay_instruction;
|
||||
use language_e2e_tests::account::AccountResource;
|
||||
use log::*;
|
||||
use solana_move_loader_api::account_state::{pubkey_to_address, LibraAccountState};
|
||||
use solana_move_loader_api::data_store::DataStore;
|
||||
use solana_sdk::client::Client;
|
||||
use solana_sdk::hash::Hash;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_instruction;
|
||||
use solana_sdk::transaction::Transaction;
|
||||
use std::boxed::Box;
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
|
||||
pub fn create_genesis(
|
||||
genesis_keypair: &Keypair,
|
||||
microlibras: u64,
|
||||
recent_blockhash: Hash,
|
||||
) -> Transaction {
|
||||
let ix = librapay_instruction::genesis(&genesis_keypair.pubkey(), microlibras);
|
||||
Transaction::new_signed_with_payer(
|
||||
vec![ix],
|
||||
Some(&genesis_keypair.pubkey()),
|
||||
&[genesis_keypair],
|
||||
recent_blockhash,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn mint_tokens(
|
||||
program_id: &Pubkey,
|
||||
payer: &Keypair,
|
||||
mint: &Keypair,
|
||||
to: &Pubkey,
|
||||
microlibras: u64,
|
||||
recent_blockhash: Hash,
|
||||
) -> Transaction {
|
||||
let ix = librapay_instruction::mint(program_id, &mint.pubkey(), to, microlibras);
|
||||
Transaction::new_signed_with_payer(
|
||||
vec![ix],
|
||||
Some(&payer.pubkey()),
|
||||
&[payer, mint],
|
||||
recent_blockhash,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn transfer(
|
||||
program_id: &Pubkey,
|
||||
mint: &Pubkey,
|
||||
payer: &Keypair,
|
||||
from: &Keypair,
|
||||
to: &Pubkey,
|
||||
microlibras: u64,
|
||||
recent_blockhash: Hash,
|
||||
) -> Transaction {
|
||||
let ix = librapay_instruction::transfer(program_id, mint, &from.pubkey(), to, microlibras);
|
||||
Transaction::new_signed_with_payer(
|
||||
vec![ix],
|
||||
Some(&payer.pubkey()),
|
||||
&[payer, from],
|
||||
recent_blockhash,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn create_accounts(
|
||||
from: &Keypair,
|
||||
tos: &[Pubkey],
|
||||
lamports: u64,
|
||||
recent_blockhash: Hash,
|
||||
) -> Transaction {
|
||||
let instructions = tos
|
||||
.iter()
|
||||
.map(|to| {
|
||||
system_instruction::create_account(
|
||||
&from.pubkey(),
|
||||
to,
|
||||
lamports,
|
||||
128,
|
||||
&solana_move_loader_api::id(),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
Transaction::new_signed_instructions(&[from], instructions, recent_blockhash)
|
||||
}
|
||||
|
||||
pub fn create_account(
|
||||
from: &Keypair,
|
||||
to: &Pubkey,
|
||||
lamports: u64,
|
||||
recent_blockhash: Hash,
|
||||
) -> Transaction {
|
||||
create_accounts(from, &[*to], lamports, recent_blockhash)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum LibrapayError {
|
||||
UnknownAccountState,
|
||||
}
|
||||
|
||||
impl fmt::Display for LibrapayError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{:?}", self)
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for LibrapayError {}
|
||||
|
||||
pub fn get_libra_balance<T: Client>(
|
||||
client: &T,
|
||||
account_address: &Pubkey,
|
||||
) -> Result<u64, Box<dyn error::Error>> {
|
||||
let account = client.get_account_data(&account_address)?;
|
||||
if let Some(account) = account {
|
||||
let mut data_store = DataStore::default();
|
||||
match bincode::deserialize(&account)? {
|
||||
LibraAccountState::User(_, write_set) => {
|
||||
data_store.apply_write_set(&write_set);
|
||||
}
|
||||
LibraAccountState::Unallocated => {
|
||||
return Ok(0);
|
||||
}
|
||||
state => {
|
||||
info!("Unknown account state: {:?}", state);
|
||||
return Err(LibrapayError::UnknownAccountState)?;
|
||||
}
|
||||
}
|
||||
let resource = data_store
|
||||
.read_account_resource(&pubkey_to_address(account_address))
|
||||
.unwrap();
|
||||
|
||||
let res = AccountResource::read_balance(&resource);
|
||||
Ok(res)
|
||||
} else {
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{create_genesis, upload_mint_program, upload_payment_program};
|
||||
use solana_runtime::bank::Bank;
|
||||
use solana_runtime::bank_client::BankClient;
|
||||
use solana_sdk::genesis_block::create_genesis_block;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use std::sync::Arc;
|
||||
|
||||
fn create_bank(lamports: u64) -> (Arc<Bank>, Keypair, Keypair, Pubkey, Pubkey) {
|
||||
let (genesis_block, mint_keypair) = create_genesis_block(lamports);
|
||||
let mut bank = Bank::new(&genesis_block);
|
||||
bank.add_instruction_processor(
|
||||
solana_move_loader_api::id(),
|
||||
solana_move_loader_api::processor::process_instruction,
|
||||
);
|
||||
let shared_bank = Arc::new(bank);
|
||||
let bank_client = BankClient::new_shared(&shared_bank);
|
||||
let genesis_keypair = create_genesis(&mint_keypair, &bank_client, 1_000_000);
|
||||
let mint_program_pubkey = upload_mint_program(&mint_keypair, &bank_client);
|
||||
let program_pubkey = upload_payment_program(&mint_keypair, &bank_client);
|
||||
(
|
||||
shared_bank,
|
||||
mint_keypair,
|
||||
genesis_keypair,
|
||||
mint_program_pubkey,
|
||||
program_pubkey,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_transfer() {
|
||||
let (bank, mint_keypair, libra_genesis_keypair, mint_program_id, program_id) =
|
||||
create_bank(10_000);
|
||||
let from = Keypair::new();
|
||||
let to = Keypair::new();
|
||||
|
||||
let tx = create_accounts(
|
||||
&mint_keypair,
|
||||
&[from.pubkey(), to.pubkey()],
|
||||
1,
|
||||
bank.last_blockhash(),
|
||||
);
|
||||
bank.process_transaction(&tx).unwrap();
|
||||
|
||||
info!(
|
||||
"created accounts: mint: {} libra_mint: {}",
|
||||
mint_keypair.pubkey(),
|
||||
libra_genesis_keypair.pubkey()
|
||||
);
|
||||
info!(" from: {} to: {}", from.pubkey(), to.pubkey());
|
||||
|
||||
let tx = mint_tokens(
|
||||
&mint_program_id,
|
||||
&mint_keypair,
|
||||
&libra_genesis_keypair,
|
||||
&from.pubkey(),
|
||||
1,
|
||||
bank.last_blockhash(),
|
||||
);
|
||||
bank.process_transaction(&tx).unwrap();
|
||||
let client = BankClient::new_shared(&bank);
|
||||
assert_eq!(1, get_libra_balance(&client, &from.pubkey()).unwrap());
|
||||
|
||||
info!("passed mint... doing another transfer..");
|
||||
|
||||
let tx = transfer(
|
||||
&program_id,
|
||||
&libra_genesis_keypair.pubkey(),
|
||||
&mint_keypair,
|
||||
&from,
|
||||
&to.pubkey(),
|
||||
1,
|
||||
bank.last_blockhash(),
|
||||
);
|
||||
bank.process_transaction(&tx).unwrap();
|
||||
assert_eq!(1, get_libra_balance(&client, &to.pubkey()).unwrap());
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-move-loader-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Move Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -17,19 +17,19 @@ log = "0.4.2"
|
||||
serde = "1.0.94"
|
||||
serde_derive = "1.0.94"
|
||||
serde_json = "1.0.40"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
bytecode_verifier = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_bytecode_verifier" }
|
||||
compiler = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_compiler" }
|
||||
failure = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_failure_ext" }
|
||||
language_e2e_tests = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_language_e2e_tests" }
|
||||
state_view = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_state_view" }
|
||||
stdlib = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_stdlib" }
|
||||
types = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_types" }
|
||||
vm = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_vm" }
|
||||
vm_cache_map = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_vm_cache_map" }
|
||||
vm_runtime = { git = "https://github.com/solana-labs/libra", tag = "v0.0.0-sol13.2", package = "solana_libra_vm_runtime" }
|
||||
bytecode_verifier = { version = "0.0.0-sol15", package = "solana_libra_bytecode_verifier" }
|
||||
compiler = { version = "0.0.0-sol15", package = "solana_libra_compiler" }
|
||||
failure = { version = "0.0.0-sol15", package = "solana_libra_failure_ext" }
|
||||
language_e2e_tests = { version = "0.0.0-sol15", package = "solana_libra_language_e2e_tests" }
|
||||
state_view = { version = "0.0.0-sol15", package = "solana_libra_state_view" }
|
||||
stdlib = { version = "0.0.0-sol15", package = "solana_libra_stdlib" }
|
||||
types = { version = "0.0.0-sol15", package = "solana_libra_types" }
|
||||
vm = { version = "0.0.0-sol15", package = "solana_libra_vm" }
|
||||
vm_cache_map = { version = "0.0.0-sol15", package = "solana_libra_vm_cache_map" }
|
||||
vm_runtime = { version = "0.0.0-sol15", package = "solana_libra_vm_runtime" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,8 +1,9 @@
|
||||
use crate::data_store::DataStore;
|
||||
use crate::error_mappers::*;
|
||||
use bytecode_verifier::VerifiedModule;
|
||||
use compiler::Compiler;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::{instruction::InstructionError, pubkey::Pubkey};
|
||||
use std::convert::TryInto;
|
||||
use stdlib::stdlib_modules;
|
||||
use types::{
|
||||
@ -47,8 +48,8 @@ pub enum LibraAccountState {
|
||||
script_bytes: Vec<u8>,
|
||||
modules_bytes: Vec<Vec<u8>>,
|
||||
},
|
||||
/// Write set containing a Libra account's data
|
||||
User(WriteSet),
|
||||
/// Associated genesis account and the write set containing the Libra account data
|
||||
User(Pubkey, WriteSet),
|
||||
/// Write sets containing the mint and stdlib modules
|
||||
Genesis(WriteSet),
|
||||
}
|
||||
@ -62,12 +63,12 @@ impl LibraAccountState {
|
||||
code: &str,
|
||||
deps: Vec<&Vec<u8>>,
|
||||
) -> Self {
|
||||
// Compiler needs all the dependencies all the dependency module's account's
|
||||
// Compiler needs all the dependencies and the dependency module's account's
|
||||
// data into `VerifiedModules`
|
||||
let mut extra_deps: Vec<VerifiedModule> = vec![];
|
||||
for dep in deps {
|
||||
let state: LibraAccountState = bincode::deserialize(&dep).unwrap();
|
||||
if let LibraAccountState::User(write_set) = state {
|
||||
let state: Self = bincode::deserialize(&dep).unwrap();
|
||||
if let LibraAccountState::User(_, write_set) = state {
|
||||
for (_, write_op) in write_set.iter() {
|
||||
if let WriteOp::Value(raw_bytes) = write_op {
|
||||
extra_deps.push(
|
||||
@ -93,7 +94,7 @@ impl LibraAccountState {
|
||||
.serialize(&mut script_bytes)
|
||||
.expect("Unable to serialize script");
|
||||
let mut modules_bytes = vec![];
|
||||
for module in compiled_program.modules.iter() {
|
||||
for module in &compiled_program.modules {
|
||||
let mut buf = vec![];
|
||||
module
|
||||
.serialize(&mut buf)
|
||||
@ -106,11 +107,11 @@ impl LibraAccountState {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_user(write_set: WriteSet) -> Self {
|
||||
LibraAccountState::User(write_set)
|
||||
pub fn create_user(owner: &Pubkey, write_set: WriteSet) -> Self {
|
||||
LibraAccountState::User(*owner, write_set)
|
||||
}
|
||||
|
||||
pub fn create_genesis(mint_balance: u64) -> Self {
|
||||
pub fn create_genesis(mint_balance: u64) -> Result<(Self), InstructionError> {
|
||||
let modules = stdlib_modules();
|
||||
let arena = Arena::new();
|
||||
let state_view = DataStore::default();
|
||||
@ -130,11 +131,14 @@ impl LibraAccountState {
|
||||
txn_data.sender = mint_address;
|
||||
|
||||
let mut txn_executor = TransactionExecutor::new(&block_cache, &data_cache, txn_data);
|
||||
txn_executor.create_account(mint_address).unwrap().unwrap();
|
||||
txn_executor
|
||||
.create_account(mint_address)
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
txn_executor
|
||||
.execute_function(&COIN_MODULE, "initialize", vec![])
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
|
||||
txn_executor
|
||||
.execute_function(
|
||||
@ -142,8 +146,8 @@ impl LibraAccountState {
|
||||
"mint_to_address",
|
||||
vec![Local::address(mint_address), Local::u64(mint_balance)],
|
||||
)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
|
||||
txn_executor
|
||||
.execute_function(
|
||||
@ -151,28 +155,26 @@ impl LibraAccountState {
|
||||
"rotate_authentication_key",
|
||||
vec![Local::bytearray(genesis_auth_key)],
|
||||
)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
|
||||
let stdlib_modules = modules
|
||||
.iter()
|
||||
.map(|m| {
|
||||
let mut module_vec = vec![];
|
||||
m.serialize(&mut module_vec).unwrap();
|
||||
(m.self_id(), module_vec)
|
||||
})
|
||||
.collect();
|
||||
let mut stdlib_modules = vec![];
|
||||
for module in modules.iter() {
|
||||
let mut buf = vec![];
|
||||
module.serialize(&mut buf).map_err(map_failure_error)?;
|
||||
stdlib_modules.push((module.self_id(), buf));
|
||||
}
|
||||
|
||||
txn_executor
|
||||
.make_write_set(stdlib_modules, Ok(Ok(())))
|
||||
.unwrap()
|
||||
.map_err(map_vm_runtime_error)?
|
||||
.write_set()
|
||||
.clone()
|
||||
.into_mut()
|
||||
}
|
||||
.freeze()
|
||||
.unwrap();
|
||||
.map_err(map_failure_error)?;
|
||||
|
||||
LibraAccountState::Genesis(write_set)
|
||||
Ok(LibraAccountState::Genesis(write_set))
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ pub struct DataStore {
|
||||
impl DataStore {
|
||||
/// Creates a new `DataStore` with the provided initial data.
|
||||
pub fn new(data: IndexMap<AccessPath, Vec<u8>>) -> Self {
|
||||
DataStore { data }
|
||||
Self { data }
|
||||
}
|
||||
|
||||
/// Applies a [`WriteSet`] to this data store.
|
||||
|
42
programs/move_loader_api/src/error_mappers.rs
Normal file
42
programs/move_loader_api/src/error_mappers.rs
Normal file
@ -0,0 +1,42 @@
|
||||
//! Mapping functions to Instruction errors
|
||||
|
||||
use log::*;
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
use vm::file_format::CompiledModule;
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn map_vm_runtime_error(err: vm::errors::VMRuntimeError) -> InstructionError {
|
||||
debug!("Execution failed: {:?}", err);
|
||||
match err.err {
|
||||
vm::errors::VMErrorKind::OutOfGasError => InstructionError::InsufficientFunds,
|
||||
_ => InstructionError::GenericError,
|
||||
}
|
||||
}
|
||||
pub fn map_vm_invariant_violation_error(err: vm::errors::VMInvariantViolation) -> InstructionError {
|
||||
debug!("Error: Execution failed: {:?}", err);
|
||||
InstructionError::GenericError
|
||||
}
|
||||
pub fn map_vm_binary_error(err: vm::errors::BinaryError) -> InstructionError {
|
||||
debug!("Error: Script deserialize failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn map_data_error(err: std::boxed::Box<bincode::ErrorKind>) -> InstructionError {
|
||||
debug!("Error: Account data: {:?}", err);
|
||||
InstructionError::InvalidAccountData
|
||||
}
|
||||
pub fn map_vm_verification_error(
|
||||
err: (CompiledModule, Vec<vm::errors::VerificationError>),
|
||||
) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err.1);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
pub fn map_failure_error(err: failure::Error) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn missing_account() -> InstructionError {
|
||||
debug!("Error: Missing account");
|
||||
InstructionError::InvalidAccountData
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
pub mod account_state;
|
||||
pub mod data_store;
|
||||
pub mod error_mappers;
|
||||
pub mod processor;
|
||||
|
||||
const MOVE_LOADER_PROGRAM_ID: [u8; 32] = [
|
||||
5, 91, 237, 31, 90, 253, 197, 145, 157, 236, 147, 43, 6, 5, 157, 238, 63, 151, 181, 165, 118,
|
||||
224, 198, 97, 103, 136, 113, 64, 0, 0, 0, 0,
|
||||
5, 84, 172, 160, 172, 5, 64, 41, 134, 4, 81, 31, 45, 11, 30, 64, 219, 238, 140, 38, 194, 100,
|
||||
192, 219, 156, 94, 62, 208, 0, 0, 0, 0,
|
||||
];
|
||||
|
||||
solana_sdk::solana_name_id!(
|
||||
MOVE_LOADER_PROGRAM_ID,
|
||||
"MvLdr11111111111111111111111111111111111111"
|
||||
"MoveLdr111111111111111111111111111111111111"
|
||||
);
|
||||
|
@ -1,5 +1,6 @@
|
||||
use crate::account_state::{pubkey_to_address, LibraAccountState};
|
||||
use crate::data_store::DataStore;
|
||||
use crate::error_mappers::*;
|
||||
use crate::id;
|
||||
use bytecode_verifier::{VerifiedModule, VerifiedScript};
|
||||
use log::*;
|
||||
@ -44,11 +45,11 @@ pub fn process_instruction(
|
||||
|
||||
match command {
|
||||
LoaderInstruction::Write { offset, bytes } => {
|
||||
MoveProcessor::do_write(keyed_accounts, offset, bytes)
|
||||
MoveProcessor::do_write(keyed_accounts, offset, &bytes)
|
||||
}
|
||||
LoaderInstruction::Finalize => MoveProcessor::do_finalize(keyed_accounts),
|
||||
LoaderInstruction::InvokeMain { data } => {
|
||||
MoveProcessor::do_invoke_main(keyed_accounts, data)
|
||||
MoveProcessor::do_invoke_main(keyed_accounts, &data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -56,52 +57,25 @@ pub fn process_instruction(
|
||||
pub const PROGRAM_INDEX: usize = 0;
|
||||
pub const GENESIS_INDEX: usize = 1;
|
||||
|
||||
// TODO: Not quite right yet
|
||||
/// Invoke information passed via the Invoke Instruction
|
||||
#[derive(Default, Debug, Serialize, Deserialize)]
|
||||
pub struct InvokeInfo {
|
||||
/// Sender of the "transaction", the "sender" who is calling this program
|
||||
sender_address: AccountAddress,
|
||||
/// Name of the function to call
|
||||
function_name: String,
|
||||
/// Arguments to pass to the program being invoked
|
||||
args: Vec<TransactionArgument>,
|
||||
/// Command to invoke
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum InvokeCommand {
|
||||
/// Create a new genesis account
|
||||
CreateGenesis(u64),
|
||||
/// Run a Move program
|
||||
RunProgram {
|
||||
/// Sender of the "transaction", the "sender" who is running this program
|
||||
sender_address: AccountAddress,
|
||||
/// Name of the program's function to call
|
||||
function_name: String,
|
||||
/// Arguments to pass to the program being called
|
||||
args: Vec<TransactionArgument>,
|
||||
},
|
||||
}
|
||||
|
||||
pub struct MoveProcessor {}
|
||||
|
||||
impl MoveProcessor {
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
fn map_vm_runtime_error(err: vm::errors::VMRuntimeError) -> InstructionError {
|
||||
debug!("Execution failed: {:?}", err);
|
||||
match err.err {
|
||||
vm::errors::VMErrorKind::OutOfGasError => InstructionError::InsufficientFunds,
|
||||
_ => InstructionError::GenericError,
|
||||
}
|
||||
}
|
||||
fn map_vm_invariant_violation_error(err: vm::errors::VMInvariantViolation) -> InstructionError {
|
||||
debug!("Error: Execution failed: {:?}", err);
|
||||
InstructionError::GenericError
|
||||
}
|
||||
fn map_vm_binary_error(err: vm::errors::BinaryError) -> InstructionError {
|
||||
debug!("Error: Script deserialize failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
fn map_data_error(err: std::boxed::Box<bincode::ErrorKind>) -> InstructionError {
|
||||
debug!("Error: Account data: {:?}", err);
|
||||
InstructionError::InvalidAccountData
|
||||
}
|
||||
fn map_vm_verification_error(
|
||||
err: (CompiledModule, Vec<vm::errors::VerificationError>),
|
||||
) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err.1);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
fn map_failure_error(err: failure::Error) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
fn missing_account() -> InstructionError {
|
||||
debug!("Error: Missing account");
|
||||
@ -110,7 +84,7 @@ impl MoveProcessor {
|
||||
|
||||
fn arguments_to_locals(args: Vec<TransactionArgument>) -> Vec<Local> {
|
||||
let mut locals = vec![];
|
||||
for arg in args.into_iter() {
|
||||
for arg in args {
|
||||
locals.push(match arg {
|
||||
TransactionArgument::U64(i) => Local::u64(i),
|
||||
TransactionArgument::Address(a) => Local::address(a),
|
||||
@ -129,28 +103,28 @@ impl MoveProcessor {
|
||||
script
|
||||
.as_inner()
|
||||
.serialize(&mut script_bytes)
|
||||
.map_err(Self::map_failure_error)?;
|
||||
.map_err(map_failure_error)?;
|
||||
let mut modules_bytes = vec![];
|
||||
for module in modules.iter() {
|
||||
let mut buf = vec![];
|
||||
module
|
||||
.as_inner()
|
||||
.serialize(&mut buf)
|
||||
.map_err(Self::map_failure_error)?;
|
||||
.map_err(map_failure_error)?;
|
||||
modules_bytes.push(buf);
|
||||
}
|
||||
bincode::serialize(&LibraAccountState::VerifiedProgram {
|
||||
script_bytes,
|
||||
modules_bytes,
|
||||
})
|
||||
.map_err(Self::map_data_error)
|
||||
.map_err(map_data_error)
|
||||
}
|
||||
|
||||
fn deserialize_compiled_program(
|
||||
data: &[u8],
|
||||
) -> Result<(CompiledScript, Vec<CompiledModule>), InstructionError> {
|
||||
let (script_bytes, modules_bytes) =
|
||||
match bincode::deserialize(data).map_err(Self::map_data_error)? {
|
||||
match bincode::deserialize(data).map_err(map_data_error)? {
|
||||
LibraAccountState::CompiledProgram {
|
||||
script_bytes,
|
||||
modules_bytes,
|
||||
@ -161,13 +135,12 @@ impl MoveProcessor {
|
||||
}
|
||||
};
|
||||
|
||||
let script =
|
||||
CompiledScript::deserialize(&script_bytes).map_err(Self::map_vm_binary_error)?;
|
||||
let script = CompiledScript::deserialize(&script_bytes).map_err(map_vm_binary_error)?;
|
||||
let modules = modules_bytes
|
||||
.iter()
|
||||
.map(|bytes| CompiledModule::deserialize(&bytes))
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(Self::map_vm_binary_error)?;
|
||||
.map_err(map_vm_binary_error)?;
|
||||
|
||||
Ok((script, modules))
|
||||
}
|
||||
@ -176,7 +149,7 @@ impl MoveProcessor {
|
||||
data: &[u8],
|
||||
) -> Result<(VerifiedScript, Vec<VerifiedModule>), InstructionError> {
|
||||
let (script_bytes, modules_bytes) =
|
||||
match bincode::deserialize(data).map_err(Self::map_data_error)? {
|
||||
match bincode::deserialize(data).map_err(map_data_error)? {
|
||||
LibraAccountState::VerifiedProgram {
|
||||
script_bytes,
|
||||
modules_bytes,
|
||||
@ -187,19 +160,20 @@ impl MoveProcessor {
|
||||
}
|
||||
};
|
||||
|
||||
let script =
|
||||
VerifiedScript::deserialize(&script_bytes).map_err(Self::map_vm_binary_error)?;
|
||||
let script = VerifiedScript::deserialize(&script_bytes).map_err(map_vm_binary_error)?;
|
||||
let modules = modules_bytes
|
||||
.iter()
|
||||
.map(|bytes| VerifiedModule::deserialize(&bytes))
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(Self::map_vm_binary_error)?;
|
||||
.map_err(map_vm_binary_error)?;
|
||||
|
||||
Ok((script, modules))
|
||||
}
|
||||
|
||||
fn execute(
|
||||
invoke_info: InvokeInfo,
|
||||
sender_address: AccountAddress,
|
||||
function_name: String,
|
||||
args: Vec<TransactionArgument>,
|
||||
script: VerifiedScript,
|
||||
modules: Vec<VerifiedModule>,
|
||||
data_store: &DataStore,
|
||||
@ -217,38 +191,41 @@ impl MoveProcessor {
|
||||
verified_module
|
||||
.as_inner()
|
||||
.serialize(&mut raw_bytes)
|
||||
.expect("Unable to serialize module"); // TODO remove expect
|
||||
.map_err(map_failure_error)?;
|
||||
modules_to_publish.push((verified_module.self_id(), raw_bytes));
|
||||
module_cache.cache_module(verified_module);
|
||||
}
|
||||
|
||||
let mut txn_metadata = TransactionMetadata::default();
|
||||
txn_metadata.sender = invoke_info.sender_address;
|
||||
txn_metadata.sender = sender_address;
|
||||
|
||||
// Caps execution to the Libra prescribed 10 milliseconds
|
||||
txn_metadata.max_gas_amount = *MAXIMUM_NUMBER_OF_GAS_UNITS;
|
||||
txn_metadata.gas_unit_price = *MAX_PRICE_PER_GAS_UNIT;
|
||||
|
||||
let mut vm = TransactionExecutor::new(&module_cache, data_store, txn_metadata);
|
||||
vm.execute_function(
|
||||
&module_id,
|
||||
&invoke_info.function_name,
|
||||
Self::arguments_to_locals(invoke_info.args),
|
||||
)
|
||||
.map_err(Self::map_vm_invariant_violation_error)?
|
||||
.map_err(Self::map_vm_runtime_error)?;
|
||||
vm.execute_function(&module_id, &function_name, Self::arguments_to_locals(args))
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
|
||||
Ok(vm
|
||||
.make_write_set(modules_to_publish, Ok(Ok(())))
|
||||
.map_err(Self::map_vm_runtime_error)?)
|
||||
.map_err(map_vm_runtime_error)?)
|
||||
}
|
||||
|
||||
fn keyed_accounts_to_data_store(
|
||||
genesis_key: &Pubkey,
|
||||
keyed_accounts: &[KeyedAccount],
|
||||
) -> Result<DataStore, InstructionError> {
|
||||
let mut data_store = DataStore::default();
|
||||
for keyed_account in keyed_accounts {
|
||||
match bincode::deserialize(&keyed_account.account.data).map_err(Self::map_data_error)? {
|
||||
LibraAccountState::Genesis(write_set) | LibraAccountState::User(write_set) => {
|
||||
match bincode::deserialize(&keyed_account.account.data).map_err(map_data_error)? {
|
||||
LibraAccountState::Genesis(write_set) => data_store.apply_write_set(&write_set),
|
||||
LibraAccountState::User(owner, write_set) => {
|
||||
if owner != *genesis_key {
|
||||
debug!("All user accounts must be owned by the genesis");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
data_store.apply_write_set(&write_set)
|
||||
}
|
||||
_ => (), // ignore unallocated accounts
|
||||
@ -257,10 +234,45 @@ impl MoveProcessor {
|
||||
Ok(data_store)
|
||||
}
|
||||
|
||||
fn data_store_to_keyed_accounts(
|
||||
data_store: DataStore,
|
||||
keyed_accounts: &mut [KeyedAccount],
|
||||
) -> Result<(), InstructionError> {
|
||||
let mut write_sets = data_store
|
||||
.into_write_sets()
|
||||
.map_err(|_| InstructionError::GenericError)?;
|
||||
|
||||
// Genesis account holds both mint and stdlib under address 0x0
|
||||
let genesis_key = *keyed_accounts[GENESIS_INDEX].unsigned_key();
|
||||
let write_set = write_sets
|
||||
.remove(&AccountAddress::default())
|
||||
.ok_or_else(Self::missing_account)?;
|
||||
keyed_accounts[GENESIS_INDEX].account.data.clear();
|
||||
let writer = std::io::BufWriter::new(&mut keyed_accounts[GENESIS_INDEX].account.data);
|
||||
bincode::serialize_into(writer, &LibraAccountState::Genesis(write_set))
|
||||
.map_err(map_data_error)?;
|
||||
|
||||
// Now do the rest of the accounts
|
||||
for keyed_account in keyed_accounts[GENESIS_INDEX + 1..].iter_mut() {
|
||||
let write_set = write_sets
|
||||
.remove(&pubkey_to_address(keyed_account.unsigned_key()))
|
||||
.ok_or_else(Self::missing_account)?;
|
||||
keyed_account.account.data.clear();
|
||||
let writer = std::io::BufWriter::new(&mut keyed_account.account.data);
|
||||
bincode::serialize_into(writer, &LibraAccountState::User(genesis_key, write_set))
|
||||
.map_err(map_data_error)?;
|
||||
}
|
||||
if !write_sets.is_empty() {
|
||||
debug!("Error: Missing keyed accounts");
|
||||
return Err(InstructionError::GenericError);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn do_write(
|
||||
keyed_accounts: &mut [KeyedAccount],
|
||||
offset: u32,
|
||||
bytes: Vec<u8>,
|
||||
bytes: &[u8],
|
||||
) -> Result<(), InstructionError> {
|
||||
if keyed_accounts[PROGRAM_INDEX].signer_key().is_none() {
|
||||
debug!("Error: key[0] did not sign the transaction");
|
||||
@ -295,7 +307,7 @@ impl MoveProcessor {
|
||||
.into_iter()
|
||||
.map(VerifiedModule::new)
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(Self::map_vm_verification_error)?;
|
||||
.map_err(map_vm_verification_error)?;
|
||||
|
||||
keyed_accounts[PROGRAM_INDEX].account.data =
|
||||
Self::serialize_verified_program(&verified_script, &verified_modules)?;
|
||||
@ -312,62 +324,76 @@ impl MoveProcessor {
|
||||
|
||||
pub fn do_invoke_main(
|
||||
keyed_accounts: &mut [KeyedAccount],
|
||||
data: Vec<u8>,
|
||||
data: &[u8],
|
||||
) -> Result<(), InstructionError> {
|
||||
if keyed_accounts.len() < 2 {
|
||||
debug!("Error: Requires at least a program and a genesis accounts");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
if keyed_accounts[PROGRAM_INDEX].account.owner != id() {
|
||||
debug!("Error: Move program account not owned by Move loader");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
if !keyed_accounts[PROGRAM_INDEX].account.executable {
|
||||
debug!("Error: Move program account not executable");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
match bincode::deserialize(&data).map_err(map_data_error)? {
|
||||
InvokeCommand::CreateGenesis(amount) => {
|
||||
if keyed_accounts.is_empty() {
|
||||
debug!("Error: Requires an unallocated account");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
if keyed_accounts[0].account.owner != id() {
|
||||
debug!("Error: Move program account not owned by Move loader");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
|
||||
let invoke_info: InvokeInfo = bincode::deserialize(&data).map_err(Self::map_data_error)?;
|
||||
let mut data_store = Self::keyed_accounts_to_data_store(&keyed_accounts[GENESIS_INDEX..])?;
|
||||
let (verified_script, verified_modules) =
|
||||
Self::deserialize_verified_program(&keyed_accounts[PROGRAM_INDEX].account.data)?;
|
||||
match bincode::deserialize(&keyed_accounts[0].account.data)
|
||||
.map_err(map_data_error)?
|
||||
{
|
||||
LibraAccountState::Unallocated => {
|
||||
keyed_accounts[0].account.data.clear();
|
||||
let writer = std::io::BufWriter::new(&mut keyed_accounts[0].account.data);
|
||||
bincode::serialize_into(writer, &LibraAccountState::create_genesis(amount)?)
|
||||
.map_err(map_data_error)
|
||||
}
|
||||
_ => {
|
||||
debug!("Error: Must provide an unallocated account");
|
||||
Err(InstructionError::InvalidArgument)
|
||||
}
|
||||
}
|
||||
}
|
||||
InvokeCommand::RunProgram {
|
||||
sender_address,
|
||||
function_name,
|
||||
args,
|
||||
} => {
|
||||
if keyed_accounts.len() < 2 {
|
||||
debug!("Error: Requires at least a program and a genesis accounts");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
if keyed_accounts[PROGRAM_INDEX].account.owner != id() {
|
||||
debug!("Error: Move program account not owned by Move loader");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
if !keyed_accounts[PROGRAM_INDEX].account.executable {
|
||||
debug!("Error: Move program account not executable");
|
||||
return Err(InstructionError::InvalidArgument);
|
||||
}
|
||||
|
||||
let output = Self::execute(invoke_info, verified_script, verified_modules, &data_store)?;
|
||||
for event in output.events() {
|
||||
trace!("Event: {:?}", event);
|
||||
let mut data_store = Self::keyed_accounts_to_data_store(
|
||||
keyed_accounts[GENESIS_INDEX].unsigned_key(),
|
||||
&keyed_accounts[GENESIS_INDEX..],
|
||||
)?;
|
||||
let (verified_script, verified_modules) = Self::deserialize_verified_program(
|
||||
&keyed_accounts[PROGRAM_INDEX].account.data,
|
||||
)?;
|
||||
|
||||
let output = Self::execute(
|
||||
sender_address,
|
||||
function_name,
|
||||
args,
|
||||
verified_script,
|
||||
verified_modules,
|
||||
&data_store,
|
||||
)?;
|
||||
for event in output.events() {
|
||||
trace!("Event: {:?}", event);
|
||||
}
|
||||
|
||||
data_store.apply_write_set(&output.write_set());
|
||||
Self::data_store_to_keyed_accounts(data_store, keyed_accounts)
|
||||
}
|
||||
}
|
||||
|
||||
data_store.apply_write_set(&output.write_set());
|
||||
|
||||
// Break data store into a list of address keyed WriteSets
|
||||
let mut write_sets = data_store
|
||||
.into_write_sets()
|
||||
.map_err(|_| InstructionError::GenericError)?;
|
||||
|
||||
// Genesis account holds both mint and stdlib under address 0x0
|
||||
let write_set = write_sets
|
||||
.remove(&AccountAddress::default())
|
||||
.ok_or_else(Self::missing_account)?;
|
||||
keyed_accounts[GENESIS_INDEX].account.data.clear();
|
||||
let writer = std::io::BufWriter::new(&mut keyed_accounts[GENESIS_INDEX].account.data);
|
||||
bincode::serialize_into(writer, &LibraAccountState::Genesis(write_set))
|
||||
.map_err(Self::map_data_error)?;
|
||||
|
||||
// Now do the rest of the accounts
|
||||
for keyed_account in keyed_accounts[GENESIS_INDEX + 1..].iter_mut() {
|
||||
let write_set = write_sets
|
||||
.remove(&pubkey_to_address(keyed_account.unsigned_key()))
|
||||
.ok_or_else(Self::missing_account)?;
|
||||
keyed_account.account.data.clear();
|
||||
let writer = std::io::BufWriter::new(&mut keyed_account.account.data);
|
||||
bincode::serialize_into(writer, &LibraAccountState::User(write_set))
|
||||
.map_err(Self::map_data_error)?;
|
||||
}
|
||||
if !write_sets.is_empty() {
|
||||
debug!("Error: Missing keyed accounts");
|
||||
return Err(InstructionError::GenericError);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@ -389,6 +415,33 @@ mod tests {
|
||||
let (_, _) = MoveProcessor::deserialize_verified_program(&program.account.data).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_create_genesis_account() {
|
||||
solana_logger::setup();
|
||||
|
||||
let amount = 10_000_000;
|
||||
let mut unallocated = LibraAccount::create_unallocated();
|
||||
|
||||
let mut keyed_accounts = vec![KeyedAccount::new(
|
||||
&unallocated.key,
|
||||
false,
|
||||
&mut unallocated.account,
|
||||
)];
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
&bincode::serialize(&InvokeCommand::CreateGenesis(amount)).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
bincode::deserialize::<LibraAccountState>(
|
||||
&LibraAccount::create_genesis(amount).account.data
|
||||
)
|
||||
.unwrap(),
|
||||
bincode::deserialize::<LibraAccountState>(&keyed_accounts[0].account.data).unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invoke_main() {
|
||||
solana_logger::setup();
|
||||
@ -396,21 +449,21 @@ mod tests {
|
||||
let code = "main() { return; }";
|
||||
let sender_address = AccountAddress::default();
|
||||
let mut program = LibraAccount::create_program(&sender_address, code, vec![]);
|
||||
let mut genesis = LibraAccount::create_genesis();
|
||||
let mut genesis = LibraAccount::create_genesis(1_000_000_000);
|
||||
|
||||
let mut keyed_accounts = vec![
|
||||
KeyedAccount::new(&program.key, true, &mut program.account),
|
||||
KeyedAccount::new(&genesis.key, false, &mut genesis.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
};
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
@ -427,23 +480,22 @@ mod tests {
|
||||
";
|
||||
let sender_address = AccountAddress::default();
|
||||
let mut program = LibraAccount::create_program(&sender_address, code, vec![]);
|
||||
let mut genesis = LibraAccount::create_genesis();
|
||||
let mut genesis = LibraAccount::create_genesis(1_000_000_000);
|
||||
|
||||
let mut keyed_accounts = vec![
|
||||
KeyedAccount::new(&program.key, true, &mut program.account),
|
||||
KeyedAccount::new(&genesis.key, false, &mut genesis.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
};
|
||||
assert_eq!(
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
})
|
||||
.unwrap(),
|
||||
),
|
||||
Err(InstructionError::InsufficientFunds)
|
||||
);
|
||||
@ -458,7 +510,12 @@ mod tests {
|
||||
|
||||
let mut data_store = DataStore::default();
|
||||
match bincode::deserialize(&accounts[GENESIS_INDEX + 1].account.data).unwrap() {
|
||||
LibraAccountState::User(write_set) => data_store.apply_write_set(&write_set),
|
||||
LibraAccountState::User(owner, write_set) => {
|
||||
if owner != accounts[GENESIS_INDEX].key {
|
||||
panic!();
|
||||
}
|
||||
data_store.apply_write_set(&write_set)
|
||||
}
|
||||
_ => panic!("Invalid account state"),
|
||||
}
|
||||
let payee_resource = data_store
|
||||
@ -497,24 +554,24 @@ mod tests {
|
||||
KeyedAccount::new(&payee.key, false, &mut payee.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
|
||||
let amount = 2;
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address: sender.address.clone(),
|
||||
function_name: "main".to_string(),
|
||||
args: vec![
|
||||
TransactionArgument::Address(payee.address.clone()),
|
||||
TransactionArgument::U64(amount),
|
||||
],
|
||||
};
|
||||
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: sender.address.clone(),
|
||||
function_name: "main".to_string(),
|
||||
args: vec![
|
||||
TransactionArgument::Address(payee.address.clone()),
|
||||
TransactionArgument::U64(amount),
|
||||
],
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let data_store = MoveProcessor::keyed_accounts_to_data_store(&keyed_accounts[1..]).unwrap();
|
||||
let data_store =
|
||||
MoveProcessor::keyed_accounts_to_data_store(&genesis.key, &keyed_accounts[1..])
|
||||
.unwrap();
|
||||
let sender_resource = data_store.read_account_resource(&sender.address).unwrap();
|
||||
let payee_resource = data_store.read_account_resource(&payee.address).unwrap();
|
||||
|
||||
@ -549,7 +606,7 @@ mod tests {
|
||||
return;
|
||||
}
|
||||
";
|
||||
let mut genesis = LibraAccount::create_genesis();
|
||||
let mut genesis = LibraAccount::create_genesis(1_000_000_000);
|
||||
let mut payee = LibraAccount::create_unallocated();
|
||||
let mut program = LibraAccount::create_program(&payee.address, code, vec![]);
|
||||
|
||||
@ -559,14 +616,14 @@ mod tests {
|
||||
KeyedAccount::new(&payee.key, false, &mut payee.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address: payee.address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
};
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: payee.address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
@ -586,7 +643,7 @@ mod tests {
|
||||
";
|
||||
let mut module = LibraAccount::create_unallocated();
|
||||
let mut program = LibraAccount::create_program(&module.address, code, vec![]);
|
||||
let mut genesis = LibraAccount::create_genesis();
|
||||
let mut genesis = LibraAccount::create_genesis(1_000_000_000);
|
||||
|
||||
let mut keyed_accounts = vec![
|
||||
KeyedAccount::new(&program.key, true, &mut program.account),
|
||||
@ -594,14 +651,14 @@ mod tests {
|
||||
KeyedAccount::new(&module.key, false, &mut module.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address: module.address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
};
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: module.address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@ -627,14 +684,14 @@ mod tests {
|
||||
KeyedAccount::new(&module.key, false, &mut module.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address: program.address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
};
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: program.address,
|
||||
function_name: "main".to_string(),
|
||||
args: vec![],
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
@ -650,7 +707,7 @@ mod tests {
|
||||
return;
|
||||
}
|
||||
";
|
||||
let mut genesis = LibraAccount::create_genesis();
|
||||
let mut genesis = LibraAccount::create_genesis(1_000_000_000);
|
||||
let mut program = LibraAccount::create_program(&genesis.address, code, vec![]);
|
||||
let mut payee = LibraAccount::create_unallocated();
|
||||
|
||||
@ -660,18 +717,17 @@ mod tests {
|
||||
KeyedAccount::new(&payee.key, false, &mut payee.account),
|
||||
];
|
||||
MoveProcessor::do_finalize(&mut keyed_accounts).unwrap();
|
||||
let invoke_info = InvokeInfo {
|
||||
sender_address: genesis.address.clone(),
|
||||
function_name: "main".to_string(),
|
||||
args: vec![
|
||||
TransactionArgument::Address(pubkey_to_address(&payee.key)),
|
||||
TransactionArgument::U64(amount),
|
||||
],
|
||||
};
|
||||
|
||||
MoveProcessor::do_invoke_main(
|
||||
&mut keyed_accounts,
|
||||
bincode::serialize(&invoke_info).unwrap(),
|
||||
&bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: genesis.address.clone(),
|
||||
function_name: "main".to_string(),
|
||||
args: vec![
|
||||
TransactionArgument::Address(pubkey_to_address(&payee.key)),
|
||||
TransactionArgument::U64(amount),
|
||||
],
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@ -682,6 +738,7 @@ mod tests {
|
||||
])
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Debug, Default)]
|
||||
struct LibraAccount {
|
||||
pub key: Pubkey,
|
||||
pub address: AccountAddress,
|
||||
@ -708,7 +765,7 @@ mod tests {
|
||||
Self::new(key, account)
|
||||
}
|
||||
|
||||
pub fn create_genesis() -> Self {
|
||||
pub fn create_genesis(amount: u64) -> Self {
|
||||
let account = Account {
|
||||
lamports: 1,
|
||||
data: vec![],
|
||||
@ -717,7 +774,7 @@ mod tests {
|
||||
};
|
||||
let mut genesis = Self::new(Pubkey::default(), account);
|
||||
genesis.account.data =
|
||||
bincode::serialize(&LibraAccountState::create_genesis(1_000_000_000)).unwrap();
|
||||
bincode::serialize(&LibraAccountState::create_genesis(amount).unwrap()).unwrap();
|
||||
genesis
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-move-loader-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Move Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.2"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-noop-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana noop program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,8 +10,8 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-stake-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Stake program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,10 +14,10 @@ log = "0.4.7"
|
||||
rand = "0.6.5"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -53,7 +53,7 @@ pub struct Stake {
|
||||
pub activated: Epoch, // epoch the stake was activated
|
||||
pub deactivated: Epoch, // epoch the stake was deactivated, std::Epoch::MAX if not deactivated
|
||||
}
|
||||
pub const STAKE_WARMUP_EPOCHS: u64 = 3;
|
||||
pub const STAKE_WARMUP_EPOCHS: Epoch = 3;
|
||||
|
||||
impl Default for Stake {
|
||||
fn default() -> Self {
|
||||
@ -68,7 +68,7 @@ impl Default for Stake {
|
||||
}
|
||||
|
||||
impl Stake {
|
||||
pub fn stake(&self, epoch: u64) -> u64 {
|
||||
pub fn stake(&self, epoch: Epoch) -> u64 {
|
||||
// before "activated" or after deactivated?
|
||||
if epoch < self.activated || epoch >= self.deactivated {
|
||||
return 0;
|
||||
@ -217,7 +217,7 @@ impl<'a> StakeAccount for KeyedAccount<'a> {
|
||||
new_stake,
|
||||
vote_account.unsigned_key(),
|
||||
&vote_account.state()?,
|
||||
clock.epoch,
|
||||
clock.stakers_epoch,
|
||||
);
|
||||
|
||||
self.set_state(&StakeState::Stake(stake))
|
||||
@ -231,7 +231,7 @@ impl<'a> StakeAccount for KeyedAccount<'a> {
|
||||
}
|
||||
|
||||
if let StakeState::Stake(mut stake) = self.state()? {
|
||||
stake.deactivate(clock.epoch);
|
||||
stake.deactivate(clock.stakers_epoch);
|
||||
|
||||
self.set_state(&StakeState::Stake(stake))
|
||||
} else {
|
||||
@ -287,7 +287,11 @@ impl<'a> StakeAccount for KeyedAccount<'a> {
|
||||
|
||||
match self.state()? {
|
||||
StakeState::Stake(mut stake) => {
|
||||
let staked = if stake.stake(clock.epoch) == 0 {
|
||||
// still activated, no can do
|
||||
if stake.deactivated == std::u64::MAX {
|
||||
return Err(InstructionError::InsufficientFunds);
|
||||
}
|
||||
let staked = if stake.stake(clock.stakers_epoch) == 0 {
|
||||
0
|
||||
} else {
|
||||
// Assume full stake if the stake is under warmup/cooldown
|
||||
@ -353,7 +357,10 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_stake_delegate_stake() {
|
||||
let clock = sysvar::clock::Clock::default();
|
||||
let clock = sysvar::clock::Clock {
|
||||
stakers_epoch: 1,
|
||||
..sysvar::clock::Clock::default()
|
||||
};
|
||||
|
||||
let vote_keypair = Keypair::new();
|
||||
let mut vote_state = VoteState::default();
|
||||
@ -399,7 +406,7 @@ mod tests {
|
||||
voter_pubkey: vote_keypair.pubkey(),
|
||||
credits_observed: vote_state.credits(),
|
||||
stake: stake_lamports,
|
||||
activated: 0,
|
||||
activated: clock.stakers_epoch,
|
||||
deactivated: std::u64::MAX,
|
||||
})
|
||||
);
|
||||
@ -456,7 +463,10 @@ mod tests {
|
||||
let mut stake_account =
|
||||
Account::new(stake_lamports, std::mem::size_of::<StakeState>(), &id());
|
||||
|
||||
let clock = sysvar::clock::Clock::default();
|
||||
let clock = sysvar::clock::Clock {
|
||||
stakers_epoch: 1,
|
||||
..sysvar::clock::Clock::default()
|
||||
};
|
||||
|
||||
// unsigned keyed account
|
||||
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, false, &mut stake_account);
|
||||
@ -495,7 +505,7 @@ mod tests {
|
||||
let mut stake_account =
|
||||
Account::new(total_lamports, std::mem::size_of::<StakeState>(), &id());
|
||||
|
||||
let clock = sysvar::clock::Clock::default();
|
||||
let mut clock = sysvar::clock::Clock::default();
|
||||
|
||||
let to = Pubkey::new_rand();
|
||||
let mut to_account = Account::new(1, 0, &system_program::id());
|
||||
@ -535,6 +545,11 @@ mod tests {
|
||||
Ok(())
|
||||
);
|
||||
|
||||
// deactivate the stake before withdrawal
|
||||
assert_eq!(stake_keyed_account.deactivate_stake(&clock), Ok(()));
|
||||
// simulate time passing
|
||||
clock.stakers_epoch += STAKE_WARMUP_EPOCHS;
|
||||
|
||||
// Try to withdraw more than what's available
|
||||
assert_eq!(
|
||||
stake_keyed_account.withdraw(
|
||||
@ -566,7 +581,7 @@ mod tests {
|
||||
|
||||
let clock = sysvar::clock::Clock::default();
|
||||
let mut future = sysvar::clock::Clock::default();
|
||||
future.epoch += 16;
|
||||
future.stakers_epoch += 16;
|
||||
|
||||
let to = Pubkey::new_rand();
|
||||
let mut to_account = Account::new(1, 0, &system_program::id());
|
||||
@ -585,14 +600,14 @@ mod tests {
|
||||
Ok(())
|
||||
);
|
||||
|
||||
// Try to withdraw including staked
|
||||
// Try to withdraw stake
|
||||
assert_eq!(
|
||||
stake_keyed_account.withdraw(
|
||||
total_lamports - stake_lamports + 1,
|
||||
&mut to_keyed_account,
|
||||
&clock
|
||||
),
|
||||
Ok(())
|
||||
Err(InstructionError::InsufficientFunds)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-stake-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana stake program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-stake-tests"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana stake api tests"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,12 +10,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.17.0" }
|
||||
solana-stake-program = { path = "../stake_program", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.17.1" }
|
||||
solana-stake-program = { path = "../stake_program", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
assert_matches = "1.3.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-storage-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Storage program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -17,8 +17,8 @@ num-derive = "0.2"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-storage-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana storage program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,12 +10,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-storage-api = { path = "../storage_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-storage-api = { path = "../storage_api", version = "0.17.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.17.1" }
|
||||
assert_matches = "1.3.0"
|
||||
bincode = "1.1.4"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-token-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Token API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -15,8 +15,8 @@ num-derive = "0.2"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-token-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana token program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-token-api = { path = "../token_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-token-api = { path = "../token_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vote-api"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Vote program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,9 +13,9 @@ bincode = "1.1.4"
|
||||
log = "0.4.7"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vote-program"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana Vote program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
solana-logger = { path = "../../logger", version = "0.17.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.17.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.17.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -2,17 +2,17 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-replicator"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[features]
|
||||
cuda = ["solana/cuda"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-runtime"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana runtime"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -25,18 +25,17 @@ rayon = "1.1.0"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-measure = { path = "../measure", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.17.0" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.17.0" }
|
||||
solana-noop-program = { path = "../programs/noop_program", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.0" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.17.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.0" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-measure = { path = "../measure", version = "0.17.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.17.1" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.1" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.17.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.1" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.17.1" }
|
||||
sys-info = "0.5.7"
|
||||
|
||||
[lib]
|
||||
|
@ -151,21 +151,25 @@ fn do_bench_transactions(
|
||||
}
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
fn bench_bank_sync_process_builtin_transactions(bencher: &mut Bencher) {
|
||||
do_bench_transactions(bencher, &sync_bencher, &create_builtin_transactions);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
fn bench_bank_sync_process_native_loader_transactions(bencher: &mut Bencher) {
|
||||
do_bench_transactions(bencher, &sync_bencher, &create_native_loader_transactions);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
fn bench_bank_async_process_builtin_transactions(bencher: &mut Bencher) {
|
||||
do_bench_transactions(bencher, &async_bencher, &create_builtin_transactions);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
fn bench_bank_async_process_native_loader_transactions(bencher: &mut Bencher) {
|
||||
do_bench_transactions(bencher, &async_bencher, &create_native_loader_transactions);
|
||||
}
|
||||
|
@ -286,8 +286,9 @@ impl Bank {
|
||||
// slot = 0 and genesis configuration
|
||||
{
|
||||
let stakes = bank.stakes.read().unwrap();
|
||||
for i in 0..=bank.get_stakers_epoch(bank.slot) {
|
||||
bank.epoch_stakes.insert(i, stakes.clone());
|
||||
for epoch in 0..=bank.get_stakers_epoch(bank.slot) {
|
||||
bank.epoch_stakes
|
||||
.insert(epoch, stakes.clone_with_epoch(epoch));
|
||||
}
|
||||
}
|
||||
bank.update_clock();
|
||||
@ -357,7 +358,7 @@ impl Bank {
|
||||
// if my parent didn't populate for this epoch, we've
|
||||
// crossed a boundary
|
||||
if epoch_stakes.get(&epoch).is_none() {
|
||||
epoch_stakes.insert(epoch, self.stakes.read().unwrap().clone());
|
||||
epoch_stakes.insert(epoch, self.stakes.read().unwrap().clone_with_epoch(epoch));
|
||||
}
|
||||
epoch_stakes
|
||||
};
|
||||
@ -1496,6 +1497,7 @@ mod tests {
|
||||
use solana_sdk::system_transaction;
|
||||
use solana_sdk::sysvar::{fees::Fees, rewards::Rewards};
|
||||
use solana_sdk::timing::DEFAULT_TICKS_PER_SLOT;
|
||||
use solana_stake_api::stake_state::Stake;
|
||||
use solana_vote_api::vote_instruction;
|
||||
use solana_vote_api::vote_state::{VoteState, MAX_LOCKOUT_HISTORY};
|
||||
use std::io::Cursor;
|
||||
@ -2435,33 +2437,48 @@ mod tests {
|
||||
genesis_block.epoch_warmup = false; // allows me to do the normal division stuff below
|
||||
|
||||
let parent = Arc::new(Bank::new(&genesis_block));
|
||||
|
||||
let vote_accounts0: Option<HashMap<_, _>> = parent.epoch_vote_accounts(0).map(|accounts| {
|
||||
accounts
|
||||
.iter()
|
||||
.filter_map(|(pubkey, (_, account))| {
|
||||
if let Ok(vote_state) = VoteState::deserialize(&account.data) {
|
||||
if vote_state.node_pubkey == leader_pubkey {
|
||||
Some((*pubkey, true))
|
||||
let mut leader_vote_stake: Vec<_> = parent
|
||||
.epoch_vote_accounts(0)
|
||||
.map(|accounts| {
|
||||
accounts
|
||||
.iter()
|
||||
.filter_map(|(pubkey, (stake, account))| {
|
||||
if let Ok(vote_state) = VoteState::deserialize(&account.data) {
|
||||
if vote_state.node_pubkey == leader_pubkey {
|
||||
Some((*pubkey, *stake))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
});
|
||||
assert!(vote_accounts0.is_some());
|
||||
assert!(vote_accounts0.iter().len() != 0);
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.unwrap();
|
||||
assert_eq!(leader_vote_stake.len(), 1);
|
||||
let (leader_vote_account, leader_stake) = leader_vote_stake.pop().unwrap();
|
||||
assert!(leader_stake > 0);
|
||||
|
||||
let mut i = 1;
|
||||
let leader_stake = Stake {
|
||||
stake: leader_lamports,
|
||||
..Stake::default()
|
||||
};
|
||||
|
||||
let mut epoch = 1;
|
||||
loop {
|
||||
if i > STAKERS_SLOT_OFFSET / SLOTS_PER_EPOCH {
|
||||
if epoch > STAKERS_SLOT_OFFSET / SLOTS_PER_EPOCH {
|
||||
break;
|
||||
}
|
||||
assert!(parent.epoch_vote_accounts(i).is_some());
|
||||
i += 1;
|
||||
let vote_accounts = parent.epoch_vote_accounts(epoch);
|
||||
assert!(vote_accounts.is_some());
|
||||
|
||||
assert_eq!(
|
||||
leader_stake.stake(epoch),
|
||||
vote_accounts.unwrap().get(&leader_vote_account).unwrap().0
|
||||
);
|
||||
|
||||
epoch += 1;
|
||||
}
|
||||
|
||||
// child crosses epoch boundary and is the first slot in the epoch
|
||||
@ -2471,15 +2488,25 @@ mod tests {
|
||||
SLOTS_PER_EPOCH - (STAKERS_SLOT_OFFSET % SLOTS_PER_EPOCH),
|
||||
);
|
||||
|
||||
assert!(child.epoch_vote_accounts(i).is_some());
|
||||
assert!(child.epoch_vote_accounts(epoch).is_some());
|
||||
assert_eq!(
|
||||
leader_stake.stake(epoch),
|
||||
child
|
||||
.epoch_vote_accounts(epoch)
|
||||
.unwrap()
|
||||
.get(&leader_vote_account)
|
||||
.unwrap()
|
||||
.0
|
||||
);
|
||||
|
||||
// child crosses epoch boundary but isn't the first slot in the epoch
|
||||
// child crosses epoch boundary but isn't the first slot in the epoch, still
|
||||
// makes an epoch stakes
|
||||
let child = Bank::new_from_parent(
|
||||
&parent,
|
||||
&leader_pubkey,
|
||||
SLOTS_PER_EPOCH - (STAKERS_SLOT_OFFSET % SLOTS_PER_EPOCH) + 1,
|
||||
);
|
||||
assert!(child.epoch_vote_accounts(i).is_some());
|
||||
assert!(child.epoch_vote_accounts(epoch).is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -66,6 +66,7 @@ pub fn create_genesis_block_with_leader(
|
||||
),
|
||||
),
|
||||
])
|
||||
// Bare minimum program set
|
||||
.native_instruction_processors(&[
|
||||
solana_bpf_loader_program!(),
|
||||
solana_vote_program!(),
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::bank_client::BankClient;
|
||||
use serde::Serialize;
|
||||
use solana_sdk::client::SyncClient;
|
||||
use solana_sdk::client::Client;
|
||||
use solana_sdk::instruction::{AccountMeta, Instruction};
|
||||
use solana_sdk::loader_instruction;
|
||||
use solana_sdk::message::Message;
|
||||
@ -8,8 +7,8 @@ use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_instruction;
|
||||
|
||||
pub fn load_program(
|
||||
bank_client: &BankClient,
|
||||
pub fn load_program<T: Client>(
|
||||
bank_client: &T,
|
||||
from_keypair: &Keypair,
|
||||
loader_pubkey: &Pubkey,
|
||||
program: Vec<u8>,
|
||||
|
@ -143,7 +143,7 @@ impl Default for MessageProcessor {
|
||||
}
|
||||
|
||||
impl MessageProcessor {
|
||||
/// Add a static entrypoint to intercept intructions before the dynamic loader.
|
||||
/// Add a static entrypoint to intercept instructions before the dynamic loader.
|
||||
pub fn add_instruction_processor(
|
||||
&mut self,
|
||||
program_id: Pubkey,
|
||||
|
@ -2,6 +2,7 @@
|
||||
//! node stakes
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::timing::Epoch;
|
||||
use solana_stake_api::stake_state::StakeState;
|
||||
use solana_vote_api::vote_state::VoteState;
|
||||
use std::collections::HashMap;
|
||||
@ -19,11 +20,11 @@ pub struct Stakes {
|
||||
points: u64,
|
||||
|
||||
/// current epoch, used to calculate current stake
|
||||
epoch: u64,
|
||||
epoch: Epoch,
|
||||
}
|
||||
|
||||
impl Stakes {
|
||||
pub fn clone_with_epoch(&self, epoch: u64) -> Self {
|
||||
pub fn clone_with_epoch(&self, epoch: Epoch) -> Self {
|
||||
if self.epoch == epoch {
|
||||
self.clone()
|
||||
} else {
|
||||
@ -46,7 +47,7 @@ impl Stakes {
|
||||
}
|
||||
|
||||
// sum the stakes that point to the given voter_pubkey
|
||||
fn calculate_stake(&self, voter_pubkey: &Pubkey, epoch: u64) -> u64 {
|
||||
fn calculate_stake(&self, voter_pubkey: &Pubkey, epoch: Epoch) -> u64 {
|
||||
self.stake_accounts
|
||||
.iter()
|
||||
.map(|(_, stake_account)| {
|
||||
@ -62,7 +63,9 @@ impl Stakes {
|
||||
}
|
||||
|
||||
pub fn is_stake(account: &Account) -> bool {
|
||||
solana_vote_api::check_id(&account.owner) || solana_stake_api::check_id(&account.owner)
|
||||
solana_vote_api::check_id(&account.owner)
|
||||
|| solana_stake_api::check_id(&account.owner)
|
||||
&& account.data.len() >= std::mem::size_of::<StakeState>()
|
||||
}
|
||||
|
||||
pub fn store(&mut self, pubkey: &Pubkey, account: &Account) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-sdk-c"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana SDK C"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -18,7 +18,7 @@ bs58 = "0.2.0"
|
||||
libc = "0.2.58"
|
||||
rand_chacha = "0.1.1"
|
||||
rand_core = { version = ">=0.2, <0.4", default-features = false }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-ed25519-dalek = "0.2.0"
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-sdk"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana SDK"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -28,5 +28,5 @@ serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
sha2 = "0.8.0"
|
||||
solana-ed25519-dalek = "0.2.0"
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
untrusted = "0.7.0"
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-sdk-bpf-no-std"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF SDK Rust no_std support"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-sdk-bpf-test"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF SDK Rust Cargo test utilities"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-sdk-bpf-utils"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana BPF SDK Rust Utils"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-upload-perf"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Metrics Upload Utility"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,7 +12,7 @@ publish = false
|
||||
[dependencies]
|
||||
log = "0.4.7"
|
||||
serde_json = "1.0.40"
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
|
||||
[[bin]]
|
||||
name = "solana-upload-perf"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-validator-info"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
description = "Solana validator registration tool"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -20,9 +20,9 @@ reqwest = "0.9.19"
|
||||
serde = "1.0.97"
|
||||
serde_derive = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
url = "2.0.0"
|
||||
|
||||
[[bin]]
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-validator"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -12,15 +12,15 @@ homepage = "https://solana.com/"
|
||||
clap = "2.33.0"
|
||||
log = "0.4.7"
|
||||
serde_json = "1.0.40"
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-drone = { path = "../drone", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.0" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-drone = { path = "../drone", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.1" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.17.1" }
|
||||
|
||||
[features]
|
||||
cuda = ["solana/cuda"]
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-vote-signer"
|
||||
description = "Solana Vote Signing Service"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -17,8 +17,8 @@ jsonrpc-http-server = "12.1.0"
|
||||
log = "0.4.7"
|
||||
serde = "1.0.97"
|
||||
serde_json = "1.0.40"
|
||||
solana-metrics = { path = "../metrics", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-wallet"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -17,22 +17,22 @@ dirs = "2.0.1"
|
||||
log = "0.4.7"
|
||||
num-traits = "0.2"
|
||||
serde_json = "1.0.40"
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.17.0" }
|
||||
solana-client = { path = "../client", version = "0.17.0" }
|
||||
solana-drone = { path = "../drone", version = "0.17.0" }
|
||||
solana-logger = { path = "../logger", version = "0.17.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.0" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.17.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.17.1" }
|
||||
solana-client = { path = "../client", version = "0.17.1" }
|
||||
solana-drone = { path = "../drone", version = "0.17.1" }
|
||||
solana-logger = { path = "../logger", version = "0.17.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.17.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.17.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.17.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.17.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.17.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.17.1" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.17.1" }
|
||||
url = "2.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
solana = { path = "../core", version = "0.17.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.17.0" }
|
||||
solana = { path = "../core", version = "0.17.1" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.17.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
Reference in New Issue
Block a user