Skip to content

Commit 5048c63

Browse files
sergeytimoshinananas-block
authored andcommitted
Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>
Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com> Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com> test: add compressed token in batched tree test
1 parent 7a7984c commit 5048c63

File tree

126 files changed

+12385
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+12385
-30
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ test-ledger/
99

1010
.DS_Store
1111

12-
minio
12+
minio
1313
test.db

Cargo.toml

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ log = "0.4.17"
5959
once_cell = "1.19.0"
6060
rstest = "0.18.2"
6161
sea-orm = { version = "0.10.6", features = [
62-
"macros",
63-
"runtime-tokio-rustls",
64-
"sqlx-postgres",
65-
"sqlx-sqlite",
66-
"with-chrono",
67-
"mock",
62+
"macros",
63+
"runtime-tokio-rustls",
64+
"sqlx-postgres",
65+
"sqlx-sqlite",
66+
"with-chrono",
67+
"mock",
6868
] }
6969
bytes = "1.7.1"
7070
sea-orm-migration = { version = "0.10.6", features = [
71-
"runtime-tokio-rustls",
72-
"sqlx-postgres",
71+
"runtime-tokio-rustls",
72+
"sqlx-postgres",
7373
] }
7474
serde = { version = "1.0.217", features = ["derive"] }
7575
serde_json = "1.0.82"
@@ -79,21 +79,27 @@ solana-program = "1.18.0"
7979
solana-sdk = "1.18.0"
8080
solana-transaction-status = "1.18.0"
8181

82-
light-merkle-tree-metadata = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [] }
83-
light-concurrent-merkle-tree = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [] }
84-
light-sdk = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [] }
85-
light-compressed-account = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [] }
86-
light-batched-merkle-tree = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [] }
87-
light-prover-client = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [] }
82+
light-merkle-tree-metadata = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [
83+
] }
84+
light-concurrent-merkle-tree = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [
85+
] }
86+
light-sdk = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [
87+
] }
88+
light-compressed-account = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [
89+
] }
90+
light-batched-merkle-tree = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [
91+
] }
92+
light-prover-client = { git = "https://github.com/Lightprotocol/light-protocol", branch = "sergey/forester-photon-v2", features = [
93+
] }
8894

8995
sqlx = { version = "0.6.2", features = [
90-
"macros",
91-
"runtime-tokio-rustls",
92-
"postgres",
93-
"sqlite",
94-
"uuid",
95-
"offline",
96-
"json",
96+
"macros",
97+
"runtime-tokio-rustls",
98+
"postgres",
99+
"sqlite",
100+
"uuid",
101+
"offline",
102+
"json",
97103
] }
98104
thiserror = "1.0.31"
99105
# time pinned because of https://github.com/launchbadge/sqlx/issues/3189
@@ -109,11 +115,15 @@ tower = { version = "0.4.13", features = ["full"] }
109115
tower-http = { version = "0.3.5", features = ["full"] }
110116
tracing = "0.1.35"
111117
tracing-subscriber = { version = "0.3.16", features = [
112-
"json",
113-
"env-filter",
114-
"ansi",
118+
"json",
119+
"env-filter",
120+
"ansi",
121+
] }
122+
utoipa = { version = "4.2.0", features = [
123+
"yaml",
124+
"chrono",
125+
"non_strict_integers",
115126
] }
116-
utoipa = { version = "4.2.0", features = ["yaml", "chrono", "non_strict_integers"] }
117127
yellowstone-grpc-client = "1.15.0"
118128
yellowstone-grpc-proto = "1.14.0"
119129
cadence = "1.4.0"

src/api/method/get_multiple_compressed_account_proofs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub async fn get_multiple_compressed_account_proofs(
4242
tx.get_database_backend(),
4343
"SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(),
4444
))
45-
.await?;
45+
.await?;
4646
}
4747
let proofs = get_multiple_compressed_leaf_proofs(&tx, request).await?;
4848
tx.commit().await?;

src/ingester/persist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub mod persisted_state_tree;
4242
mod persisted_batch_append_event;
4343
mod persisted_batch_nullify_event;
4444

45-
const COMPRESSED_TOKEN_PROGRAM: Pubkey = pubkey!("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");
45+
pub const COMPRESSED_TOKEN_PROGRAM: Pubkey = pubkey!("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");
4646

4747
const LEGACY_TREE_HEIGHT: u32 = 27;
4848
const BATCH_STATE_TREE_HEIGHT: u32 = 33;

src/migration/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ async fn main() {
1010
if custom_indexes_enabled {
1111
cli::run_cli(MigractorWithCustomMigrations).await;
1212
} else {
13-
cli::run_cli(Migrator).await;
13+
cli::run_cli(Migrator).await;
1414
}
1515
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
{
2+
"slot": 11,
3+
"transaction": [
4+
"AcEAyhfpeF5B5GSpP+47D7npP7x59vGXU397sm1MeC9aaKa+GL0BiI7WRdc/DoO7ubbn+3nspDIfxDhVRKA5CwYBAAoPzLjCFXXnWj51s6K1RyQiLzHD11pzA0VK0kuivz8zqswwzBtgy0YeLQRZhWcJKFzXdcc0fzRaBFU4yyiYWtFCJjRIS2OG7THg4gmd2AxzLNtvy4800llv1LjJIp5SLhgyTy/C0Fr8KxLYTClxCKFxErzKz3N965dup6b5TkvdJtunnkg5bFbg1U4/ubEDxZheC+GMOarrHXf0jUDwBlSiWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAGp1X4ITkFTUQksVrwxDDPL0t/mHk62hJS1I82ZsbLzgbd9uHudY/eGEJdvORszdq2GvxNg7kNJ/69+SjYoYv8CRWjVyN5To+2XQdba3JpnDjdAuWUi3Ww5aBBjoCXW0QJLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8HuvEjPsyZLvDS/XFpag0/GdQAG8phtlvI1vIh1703UTmyRiwvXzPkVREinq/ao85eCmh6P0Ip/DQs6q4eFL8MvuzKHUQXK6FtbREdgftv+FFJ7+0I5EcpAQjv9FSeiZ1WelbKDOm0cd7ViHUebOUTkYmNBpxgebNnZ9OnY/PukgCBgAFAkBCDwAJDwAADQECCAcMCw4KAwkFBJEB8SIwuiWze8ADAAAAzLjCFXXnWj51s6K1RyQiLzHD11pzA0VK0kuivz8zqszMuMIVdedaPnWzorVHJCIvMcPXWnMDRUrSS6K/PzOqzMy4whV151o+dbOitUckIi8xw9dacwNFStJLor8/M6rMAwAAADUwAAAAAAAANTAAAAAAAAA1MAAAAAAAAAFAQg8AAAAAAA==",
5+
"base64"
6+
],
7+
"meta": {
8+
"err": null,
9+
"status": {
10+
"Ok": null
11+
},
12+
"fee": 5000,
13+
"preBalances": [
14+
9995027520,
15+
2923200,
16+
2039280,
17+
29677440,
18+
0,
19+
1,
20+
1,
21+
1141440,
22+
1141440,
23+
1141440,
24+
1141440,
25+
1141440,
26+
1392000,
27+
0,
28+
0
29+
],
30+
"postBalances": [
31+
9992017517,
32+
2923200,
33+
2039280,
34+
29682443,
35+
3000000,
36+
1,
37+
1,
38+
1141440,
39+
1141440,
40+
1141440,
41+
1141440,
42+
1141440,
43+
1392000,
44+
0,
45+
0
46+
],
47+
"innerInstructions": [
48+
{
49+
"index": 1,
50+
"instructions": [
51+
{
52+
"programIdIndex": 8,
53+
"accounts": [
54+
1,
55+
2,
56+
0
57+
],
58+
"data": "6dRbrMDfHJ4F",
59+
"stackHeight": 2
60+
},
61+
{
62+
"programIdIndex": 7,
63+
"accounts": [
64+
0,
65+
13,
66+
12,
67+
11,
68+
14,
69+
10,
70+
9,
71+
4,
72+
7,
73+
5,
74+
7,
75+
3
76+
],
77+
"data": "WpwPmo3KqN4odjj6RZDrqHoBKMoVmyfrVCdxAhAm4BrLsRZXTihhk5jwWukjC2BVTjziHbCzQvjBvXq1JxEB3sYpk5s9NqfVDaGZShBs579Fp8ENUkjAwsjhbirAN95VKm7ZMqFYS2VRiCHWKukmATo1sSSMrW9xwMi8bDVNX7XdNdPvh8sViwdKUChFrjBJnm8ioDPX66HL8wg6sdWanSwjvEcpGUdbZ8SyBEMK47892KeTFAneZGn1KzqYndacsDo6iDVaCvZWhzQeRNdnkph65KKfNSkHoqTa42qpLgkNitDHZYMBfVr56q2K3MYu1YcKPECprS4sJGUbDBfwV6eQWJDe6qkygUCFCGuMhBndkZxEzqq813bbwk9c5ZZ3H3BzoWUWaHNYksTcffHY2WAuHsdpbVGh268m1rdpFY3112dZWHfZcFJNkvZqreLozWUoqksoB6iDPbcexoYGBNve5NKne1GwTzD7HrZHaMfbQ7bBPkMiPUBBTV4UsxYxyof9Cfo9aMj19pSkGT5nEE3ycoTr8kpDjLeiotYbGTnkTimr9LEn5xTGDNZSjY9pjfrHoWT9opR1au2kG69DhsMpveCpEpWbUD5ii7xcXsstXWBd1EJ6HSLeWKp1h8pUrXwKsWGBnVwzB4sdvUBRDECzZqQEYWeno246hThWfoKqmGkACZNTEBKvFhCsknAqbSJaxc9L8o",
78+
"stackHeight": 2
79+
},
80+
{
81+
"programIdIndex": 5,
82+
"accounts": [
83+
0,
84+
4
85+
],
86+
"data": "3Bxs4Z6oyhaczjLK",
87+
"stackHeight": 3
88+
},
89+
{
90+
"programIdIndex": 5,
91+
"accounts": [
92+
0,
93+
3
94+
],
95+
"data": "3Bxs4Q7rWYJXVKwV",
96+
"stackHeight": 3
97+
},
98+
{
99+
"programIdIndex": 10,
100+
"accounts": [
101+
14,
102+
12,
103+
3
104+
],
105+
"data": "tYXduB7cAui7Gdg5DyTiW9e3sL88TDknGJJJJeJjkY1HivWnDCUzuantQ1cyEPgNBJqT5TzZHaNRcohSXWuCakfC6xYBTKHyyTk7Aej7BS7zdcaLCvu6kUNqkjfXU8o5iRNiJrDtCsonidUHX7diAAeQbjKyV6RRgHWEC3fBtnVaj6zYMZq9oHHRm3bqW4ivW2J5TvAVhBTD58RamBLGCm3oPxwabRb8oSsaJR2TKfnZ3PA9JjBcDVbxFpr4hNL8C6B3NzwSAXCTp6XZTQ5v8kasrwD9",
106+
"stackHeight": 3
107+
}
108+
]
109+
}
110+
],
111+
"logMessages": [
112+
"Program ComputeBudget111111111111111111111111111111 invoke [1]",
113+
"Program ComputeBudget111111111111111111111111111111 success",
114+
"Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m invoke [1]",
115+
"Program log: Instruction: MintTo",
116+
"Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb invoke [2]",
117+
"Program log: Instruction: MintTo",
118+
"Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb consumed 5068 of 982637 compute units",
119+
"Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb success",
120+
"Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]",
121+
"Program log: Instruction: InvokeCpi",
122+
"Program consumption: 955161 units remaining",
123+
"Program log: num new addresses: 0",
124+
"Program 11111111111111111111111111111111 invoke [3]",
125+
"Program 11111111111111111111111111111111 success",
126+
"Program log: paying fee: 5003",
127+
"Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU",
128+
"Program 11111111111111111111111111111111 invoke [3]",
129+
"Program 11111111111111111111111111111111 success",
130+
"Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]",
131+
"Program log: Instruction: InsertIntoQueues",
132+
"Program log: insert_nullifiers 0",
133+
"Program log: append leaves 3",
134+
"Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 9973 of 916083 compute units",
135+
"Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success",
136+
"Program consumption: 905907 units remaining",
137+
"Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 55180 of 960808 compute units",
138+
"Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success",
139+
"Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m consumed 95077 of 999850 compute units",
140+
"Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m success"
141+
],
142+
"preTokenBalances": [
143+
{
144+
"accountIndex": 2,
145+
"mint": "4HV5oEidH1QGY55kNTHb1yqjcHmKyT7gTgNSCL8TiWe9",
146+
"uiTokenAmount": {
147+
"uiAmount": null,
148+
"decimals": 2,
149+
"amount": "0",
150+
"uiAmountString": "0"
151+
},
152+
"owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy",
153+
"programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
154+
}
155+
],
156+
"postTokenBalances": [
157+
{
158+
"accountIndex": 2,
159+
"mint": "4HV5oEidH1QGY55kNTHb1yqjcHmKyT7gTgNSCL8TiWe9",
160+
"uiTokenAmount": {
161+
"uiAmount": 370.23,
162+
"decimals": 2,
163+
"amount": "37023",
164+
"uiAmountString": "370.23"
165+
},
166+
"owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy",
167+
"programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
168+
}
169+
],
170+
"rewards": [],
171+
"loadedAddresses": {
172+
"writable": [],
173+
"readonly": []
174+
},
175+
"computeUnitsConsumed": 95227
176+
},
177+
"blockTime": 1740104955
178+
}

0 commit comments

Comments
 (0)