diff --git a/README.md b/README.md index 9369bda..5058241 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,13 @@ TODO 4. Building/deploying a verify program: + Requirements: + + - solana-verify (https://github.com/Ellipsis-Labs/solana-verifiable-build) + - solana cli 1.18.8 + - docker + - Make sure docker has permissions to access the lighthouse repo (enable in docker settings + system settings) + ```bash $ cd programs/lighthouse $ solana-verify build diff --git a/clients/rust/Cargo.lock b/clients/rust/Cargo.lock index 5f9c64b..87e75b9 100644 --- a/clients/rust/Cargo.lock +++ b/clients/rust/Cargo.lock @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" dependencies = [ "borsh 0.10.3", "leb128", @@ -1035,7 +1035,7 @@ dependencies = [ [[package]] name = "lighthouse-sdk" -version = "0.1.0" +version = "2.0.0" dependencies = [ "assert_matches", "base64 0.22.0", diff --git a/clients/rust/Cargo.toml b/clients/rust/Cargo.toml index 00d8796..c7b9219 100644 --- a/clients/rust/Cargo.toml +++ b/clients/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lighthouse-sdk" -version = "0.1.0" +version = "2.0.0" edition = "2021" readme = "README.md" license-file = "../../LICENSE" @@ -28,7 +28,7 @@ solana-program = "1.17.23" solana-sdk = { version = "1.17.23", optional = true } thiserror = "^1.0" base64 = "0.22.0" -lighthouse-common = { path = "../../lighthouse-common", features = ["serde"]} +lighthouse-common = { path = "../../lighthouse-common", version = "2.0.0", features = ["serde"]} [dev-dependencies] assert_matches = "1.5.0" \ No newline at end of file diff --git a/lighthouse-common/Cargo.lock b/lighthouse-common/Cargo.lock index d066614..2cdb255 100644 --- a/lighthouse-common/Cargo.lock +++ b/lighthouse-common/Cargo.lock @@ -287,7 +287,7 @@ checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" dependencies = [ "borsh", "leb128", diff --git a/lighthouse-common/Cargo.toml b/lighthouse-common/Cargo.toml index 7575cf1..85b0cb3 100644 --- a/lighthouse-common/Cargo.toml +++ b/lighthouse-common/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" edition = "2021" readme = "README.md" -license-file = "../../LICENSE" +license-file = "../LICENSE" description = "Shared common library used in lighthouse protocol and sdk" repository = "https://github.com/Jac0xb/lighthouse" license = "MIT" diff --git a/programs/lighthouse/Cargo.lock b/programs/lighthouse/Cargo.lock index c8935d4..0ecbd00 100644 --- a/programs/lighthouse/Cargo.lock +++ b/programs/lighthouse/Cargo.lock @@ -436,6 +436,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -1098,6 +1104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -1645,6 +1652,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "histogram" version = "0.6.9" @@ -1847,6 +1860,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", + "serde", ] [[package]] @@ -1857,6 +1871,7 @@ checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown 0.14.3", + "serde", ] [[package]] @@ -2036,15 +2051,19 @@ dependencies = [ [[package]] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729f1628e0847b286812c5ac4b9484c0646c92a747006e8f917af7943157dbc4" dependencies = [ "borsh 0.10.3", "leb128", + "serde", + "serde_with 3.8.1", ] [[package]] -name = "lighthouse-v1" -version = "0.1.0" +name = "lighthouse-program" +version = "2.0.0" dependencies = [ "bincode", "borsh 0.10.3", @@ -3343,7 +3362,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" dependencies = [ "serde", - "serde_with_macros", + "serde_with_macros 2.3.3", +] + +[[package]] +name = "serde_with" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.3", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros 3.8.1", + "time", ] [[package]] @@ -3358,6 +3395,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sha1" version = "0.10.6" @@ -4366,7 +4415,7 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "serde_with", + "serde_with 2.3.3", "sha2 0.10.8", "sha3 0.10.8", "siphasher", diff --git a/programs/lighthouse/Cargo.toml b/programs/lighthouse/Cargo.toml index 37f86b2..afc35bf 100644 --- a/programs/lighthouse/Cargo.toml +++ b/programs/lighthouse/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "lighthouse-v1" -version = "0.1.0" +name = "lighthouse-program" +version = "2.0.0" description = "Transaction guard rails" authors = ["Jac0xb"] repository = "https://github.com/jac0xb/lighthouse" @@ -33,7 +33,7 @@ spl-associated-token-account = { version = ">= 1.1.3, < 3.0", features = ["no-en spl-token = { version = ">= 3.5.0, < 5.0", features = ["no-entrypoint"] } spl-token-2022 = { version = "=2.0.1", features = [ "no-entrypoint" ] } thiserror = "=1.0.56" -lighthouse-common = { path = "../../lighthouse-common" } +lighthouse-common = { version = "2.0.0", features = ["serde"]} [dev-dependencies] solana-program-test = "=1.18.8" diff --git a/programs/lighthouse/lighthouse.json b/programs/lighthouse/lighthouse.json index 456355c..34cb3aa 100644 --- a/programs/lighthouse/lighthouse.json +++ b/programs/lighthouse/lighthouse.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "2.0.0", "name": "lighthouse", "instructions": [ { diff --git a/programs/test-program/Cargo.lock b/programs/test-program/Cargo.lock index abab9a8..dcaf116 100644 --- a/programs/test-program/Cargo.lock +++ b/programs/test-program/Cargo.lock @@ -2140,7 +2140,7 @@ dependencies = [ [[package]] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" dependencies = [ "borsh 0.10.3", "leb128", @@ -2150,7 +2150,7 @@ dependencies = [ [[package]] name = "lighthouse-sdk" -version = "0.1.0" +version = "2.0.0" dependencies = [ "base64 0.22.0", "borsh 0.10.3", diff --git a/programs/test-program/program/Cargo.toml b/programs/test-program/program/Cargo.toml index 17a616a..ae6148b 100644 --- a/programs/test-program/program/Cargo.toml +++ b/programs/test-program/program/Cargo.toml @@ -25,7 +25,7 @@ anchor-lang = { version = "0.29.0", features = ["init-if-needed"] } anchor-spl = "0.29.0" solana-program = "1.17.23" arrayref = "0.3.7" -lighthouse-sdk = { version = "0.1.0", path = "../../../clients/rust", features = ["cpi"] } +lighthouse-sdk = { version = "2.0.0", path = "../../../clients/rust", features = ["cpi"] } [dev-dependencies] async-trait = "0.1.71" diff --git a/tests/lighthouse/Cargo.lock b/tests/lighthouse/Cargo.lock index f6a77a5..1a0da9c 100644 --- a/tests/lighthouse/Cargo.lock +++ b/tests/lighthouse/Cargo.lock @@ -2253,7 +2253,7 @@ dependencies = [ [[package]] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" dependencies = [ "borsh 0.10.3", "leb128", @@ -2263,7 +2263,7 @@ dependencies = [ [[package]] name = "lighthouse-sdk" -version = "0.1.0" +version = "2.0.0" dependencies = [ "base64 0.22.0", "borsh 0.10.3", diff --git a/tests/lighthouse/Cargo.toml b/tests/lighthouse/Cargo.toml index 7a40243..84f057d 100644 --- a/tests/lighthouse/Cargo.toml +++ b/tests/lighthouse/Cargo.toml @@ -20,7 +20,7 @@ base64 = "0.22.0" bincode = "1" borsh = "^0.10.0" bytemuck = "1.13.0" -lighthouse-sdk = { path = "../../clients/rust", features = ["sdk"], default-features = false } +lighthouse-sdk = { path = "../../clients/rust", version = "2.0.0", features = ["sdk"], default-features = false } mpl-bubblegum = { git = "https://github.com/Jac0xb/mpl-bubblegum.git", rev = "bf9a36d95d4b636c0f9346665cc744c9cf283b54", package = "bubblegum", features = ["test-sbf"] } mpl-bubblegum-sdk = { git = "https://github.com/Jac0xb/mpl-bubblegum.git", rev = "bf9a36d95d4b636c0f9346665cc744c9cf283b54", package = "mpl-bubblegum" } mpl-token-metadata = "3.2.3" diff --git a/tests/test-client/Cargo.lock b/tests/test-client/Cargo.lock index 089b51d..722b14c 100644 --- a/tests/test-client/Cargo.lock +++ b/tests/test-client/Cargo.lock @@ -2127,7 +2127,7 @@ dependencies = [ [[package]] name = "lighthouse-common" -version = "0.1.0" +version = "2.0.0" dependencies = [ "borsh 0.10.3", "leb128", @@ -2137,7 +2137,7 @@ dependencies = [ [[package]] name = "lighthouse-sdk" -version = "0.1.0" +version = "2.0.0" dependencies = [ "base64 0.22.0", "borsh 0.10.3", diff --git a/tests/test-client/Cargo.toml b/tests/test-client/Cargo.toml index 589739a..edcb740 100644 --- a/tests/test-client/Cargo.toml +++ b/tests/test-client/Cargo.toml @@ -9,7 +9,7 @@ description = "A simple CLI application to test Lighthouse on Solana network" [dependencies] clap = { version = "^4.5.1", features = ["derive"] } solana-sdk = "1.17.23" -lighthouse-sdk = { path = "../../clients/rust" } +lighthouse-sdk = { path = "../../clients/rust", version = "2.0.0" } serde_json = "1.0.114" solana-program = "1.17.23" solana-client = "1.17.23"