-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Conversation
3f78711
to
6371aec
Compare
println!( | ||
"Transactions affecting {} within slots [{},{}]", | ||
address, start_slot, end_slot | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one subcommand for which it could be useful to return json. Could we create a Cli type and impl Display for niceties like this print statement and the signatures count below? (a la #9478 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that but didn't go for it since this command really is just cli window dressing over the same JSON RPC API. But my mind is open to be convinced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, fair. I think since this has the potential to return a whole heap of data, request for json might come up, but we can refactor then.
@@ -42,6 +42,9 @@ pub enum RpcRequest { | |||
MinimumLedgerSlot, | |||
} | |||
|
|||
pub const MAX_GET_SIGNATURE_STATUSES_QUERY_ITEMS: usize = 256; | |||
pub const MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS_SLOT_RANGE: u64 = 10_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to move this around the tree a little
The last commit changes the CLI interface to: # last 10k slots
$ solana transaction-history LunaFpQkZsZVJL2P2BUqNDJqyVYqrw9buQnjQtMLXdK
# last 10 slots
$ solana transaction-history LunaFpQkZsZVJL2P2BUqNDJqyVYqrw9buQnjQtMLXdK --limit 10
# 10k slots ending at 123456
$ solana transaction-history LunaFpQkZsZVJL2P2BUqNDJqyVYqrw9buQnjQtMLXdK 123456
# 10 slots ending at 123456
$ solana transaction-history LunaFpQkZsZVJL2P2BUqNDJqyVYqrw9buQnjQtMLXdK 123456 --limit 10 wdyt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like this much better
println!( | ||
"Transactions affecting {} within slots [{},{}]", | ||
address, start_slot, end_slot | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, fair. I think since this has the potential to return a whole heap of data, request for json might come up, but we can refactor then.
Codecov Report
@@ Coverage Diff @@
## master #9614 +/- ##
========================================
- Coverage 80.5% 80.5% -0.1%
========================================
Files 279 279
Lines 63658 63708 +50
========================================
+ Hits 51282 51290 +8
- Misses 12376 12418 +42 |
automerge (cherry picked from commit 914b022)
Show historical transactions affecting the given address, ordered based on the slot in which they were confirmed in from lowest to highest slot
The output is just a list of transaction signatures. One could then run
solana confirm -v <signature>
to decode the full historical transaction. I opted to not plumb an option to decode the transactions directly intosolana transaction-history
for now, to avoid adding a ton of unintentional load to the RPC serversFixes #9453