workbenchapp / solana-workbench

Your one-stop shop for developing on Solana
MIT License
64 stars 7 forks source link

Better labeling for (system, user) accounts #115

Open nathanleclaire opened 2 years ago

nathanleclaire commented 2 years ago

All accounts are kind of a big mish mash at the moment, it's difficult to decipher what is what, and could be more illustrative... let's figure out what all these in the changes view are and how we can better label them

image

bluskript commented 2 years ago

As far as I can tell, there isn't really a way to figure out reliably what a wallet is responsible for. If we wanted to make the labeling better, the only thing I can think of is a coloring the balance different colors based on the amount, but other than that there isn't much information to go off of is there?

nathanleclaire commented 2 years ago

Sort of. I do notice that in the validator logs it announces which accounts are the validator identity, and faucet account (airdropper) as well as vote account:

$ docker logs e40cccf6dbf5 2>&1 | grep "solana_core::validator" | head -n3
[2022-06-13T20:30:09.213420178Z WARN  solana_core::validator] identity: DdKu9drTsNDpfw6B5jKPtr845xLdNvCiAHUKyBxwhNtZ
[2022-06-13T20:30:09.213435345Z WARN  solana_core::validator] vote account: 4SXXnBCWWAaCpfrZh8DKpCP7x5W9Z58JPLtnihJnUrFr
[2022-06-13T20:30:09.213445053Z WARN  solana_core::validator] authorized voter: 4SXXnBCWWAaCpfrZh8DKpCP7x5W9Z58JPLtnihJnUrFr

$ docker logs solana-test-validator 2>&1 | grep 6kWU
[2022-06-13T20:30:08.928818220Z INFO  solana_faucet::faucet] Faucet account address: 6kWUPEJd8KMtfE96sVUHYs2hatTcWWtKQDBUch1Zqtvv

I'm thinking I'd like to add another <td></td> to the table for labels -- Validator Vote Account, Validator Identity, Faucet, and then maybe a default User Account label when they use the add button... and we could probably look up from the docker logs to see if there are any matches for the system accounts. Hacky, but would work for now. @SvenDowideit let me know your thoughts

nathanleclaire commented 2 years ago

in discussion about this elsewhere, we agree we don't really like log parsing as a solution ...

@Bluskript is going to investigate if we can access this information via RPC somehow

SvenDowideit commented 2 years ago

defer to 0.5