Skip to content

Conversation

@juan-malbeclabs
Copy link
Contributor

The account command is implemented to provide detailed information about a specific account based on its public key (pubkey). When executed, this command retrieves and displays the account’s essential details, including its state, and other relevant metadata. Additionally, it lists all transactions associated with the account, allowing users to review its complete transaction history.

The current format used to display transaction arguments needs to be modified to improve clarity, readability, and usability. This change is necessary to ensure that all relevant details are presented in a structured and intuitive manner, making it easier for users to understand the parameters associated with each transaction.

juanolv added 3 commits March 3, 2025 18:35
…and list all associated transactions.

The way transaction arguments are displayed must be modified.
@juan-malbeclabs
Copy link
Contributor Author

Example:

$ doublezero account --logs --pubkey 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k

Device (account_type: device, owner: krejPh8fcaoubty2hj2JGtq6fwBmbLC2QJ6tC2Fu9Kc, index: 37, location_pk: 9ZyYupqaUbGBUL5iaqb4wK1MD1rnefTSzeZTH2YeDTD9, exchange_pk: 2RJffmtyzRKAkMRE4ym77h3XqgHaDuDox3PFWmX6oNon, device_type: switch, public_ip: 195.219.138.50, dz_prefix: 195.219.138.56/29, status: activated, code: ams-dz001)

Transactions:
2025-02-25 22:43:31 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 23.109.62.84)
                        pubkey: DZfHfcCXTLwgZeCRKQ1FL1UuwAwFAZM93g86NMYpfYan, signature: 5F5Tw6HothN1Tjq55DARQUZwyxsgzW6URaWU7j1kTaeA7eYjLtHF6NGj3ZyTrwtgXKLKsZvcq6Q5WdqK561wHBVb
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 16638 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-02-25 22:42:55 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 23.109.62.84)
                        pubkey: DZfHfcCXTLwgZeCRKQ1FL1UuwAwFAZM93g86NMYpfYan, signature: 4hvQJunoQJoeBVEzvcEfnqmfUwWs71iF3wixtk62VzttDNZPC1oi48gyiTv9VGbzj8QiUkKr3VqHWqBowAhYwixm
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 1636 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 failed: instruction requires an uninitialized account

2025-02-20 20:43:30 UTC: CreateTunnel (code: ams-dz001, side_a_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, side_z_pk: 55tfaZ1kRGxugv7MAuinXP4rHATcGTbNyEKrNsbuVLx2, tunnel_type: MPLSoGRE, bandwidth: 10000000000, mtu: 9000, delay_ns: 25000000, jitter_ns: 1000000)
                        pubkey: DZtDirR2BL7c8aSZLnbsCY88YnhtgunDxvNTfBoCimbc, signature: 2q7VxVCiNXbBxTuBtG3V1ECHKZ9ZXBnwRjmegBwdomzfHSB5wy3cXGG7WLDPbN3ciN6aWGPwt17wQ9AWSjpDpAB2
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 18049 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-02-13 16:17:00 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 23.109.62.84)
                        pubkey: K7dkyC1bda2ujJLZrYZgi51JhPY5G4oWjzo6BvnDfwQ, signature: 58skcqY9EKuHmLR4aSx1NwiHp3yDuRBTXUA69AvhwEp6pA8e3e1GhUimbZtYJcEhmua1dMF2x4noniNEWmrQEouo
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 16891 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-02-06 14:26:59 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 23.109.62.84)
                        pubkey: K7dkyC1bda2ujJLZrYZgi51JhPY5G4oWjzo6BvnDfwQ, signature: 2a5fZmy8sQWxBGpAW4WMq3Bd8YN5LvxEgrfV3EVHskNGr4A1o1hk8aFr6u953GEcU7ut2aA9TGS1dum281jwBLxu
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 22638 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-02-06 01:44:58 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 23.109.62.84)
                        pubkey: K7dkyC1bda2ujJLZrYZgi51JhPY5G4oWjzo6BvnDfwQ, signature: 43xCjZTh9KjZx81NZkUnXfxJnkT2aX4ppug2PLb6budNm2fv5GKPkMqkrr6GuU3unD2C93oGAxohVEp4vWHTr71b
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 21138 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-02-06 01:41:05 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 23.109.62.84)
                        pubkey: K7dkyC1bda2ujJLZrYZgi51JhPY5G4oWjzo6BvnDfwQ, signature: 4TPy6q9ohAuK1E674xa4YGhJWgnvYRyGbz9gtePBHFynm3nWYFwjk6BuNVT6vDRCMnL7HXpYxtD9xjw9omZ5w9ra
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 16638 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-01-23 15:38:28 UTC: CreateUser (user_type: server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: 64.130.57.122)
                        pubkey: DjdiUGStnZFhxqwXdv7jNK4ZfxfmoAwZZWVixkQAkYhH, signature: jmmQNgMB6yHuWBFZhxfdX7Qh4u7wiVEaqoDg7PUxEMdNj46GihpBKwd4nKzYaMZmq7wanNayEDLUa6cudSwSzzq
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program log: Rent: 1579920
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program log: Created: User { account_type: User, owner: DjdiUGStnZFhxqwXdv7jNK4ZfxfmoAwZZWVixkQAkYhH, index: 69, user_type: Server, device_pk: 3uGKPEjinn74vd9LHtC4VJvAMAZZgU9qX9rPxtc6pF2k, cyoa_type: GREOverDIA, client_ip: [64, 130, 57, 122], dz_ip: [0, 0, 0, 0], tunnel_id: 0, tunnel_net: ([0, 0, 0, 0], 0), status: Pending }
  - Program log: Updated: GlobalState { account_type: GlobalState, account_index: 69 }
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 39016 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-01-13 21:34:23 UTC: ActivateDevice ()
                        pubkey: gwfHPG4suqu1aiXEjCPyW9rZfKnb9zQqdNt4iyqiA1D, signature: 2bg68nUdHCY9jf5EkekiCghMje2cpeS4qqedxfx7sZuJjWrRJcwBbQm83uZpEYdBQZ1kNQBCUEnwxmDpgHEmBE24
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program log: Activated: Device { account_type: Device, owner: krejPh8fcaoubty2hj2JGtq6fwBmbLC2QJ6tC2Fu9Kc, index: 37, location_pk: 9ZyYupqaUbGBUL5iaqb4wK1MD1rnefTSzeZTH2YeDTD9, exchange_pk: 2RJffmtyzRKAkMRE4ym77h3XqgHaDuDox3PFWmX6oNon, device_type: Switch, public_ip: [195, 219, 138, 50], dz_prefix: ([195, 219, 138, 56], 29), status: Activated, code: "ams-dz001" }
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 58268 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

2025-01-13 21:33:08 UTC: CreateDevice (code: ams-dz001, location_pk: 9ZyYupqaUbGBUL5iaqb4wK1MD1rnefTSzeZTH2YeDTD9, exchange_pk: 2RJffmtyzRKAkMRE4ym77h3XqgHaDuDox3PFWmX6oNon, device_type: Switch, public_ip: 195.219.138.50, dz_prefix: 195.219.138.56/29)
                        pubkey: krejPh8fcaoubty2hj2JGtq6fwBmbLC2QJ6tC2Fu9Kc, signature: 2GZBtev42xUcWWGu3AHVLzAUQAEBESrK3nu2ij4DZTP5YhMRyi3W8ok8cQH6psrSu8bckWweMdHNER99UfFrbxhN
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 invoke [1]
  - Program log: Rent: 1844400
  - Program 11111111111111111111111111111111 invoke [2]
  - Program 11111111111111111111111111111111 success
  - Program log: Created: Device { account_type: Device, owner: krejPh8fcaoubty2hj2JGtq6fwBmbLC2QJ6tC2Fu9Kc, index: 37, location_pk: 9ZyYupqaUbGBUL5iaqb4wK1MD1rnefTSzeZTH2YeDTD9, exchange_pk: 2RJffmtyzRKAkMRE4ym77h3XqgHaDuDox3PFWmX6oNon, device_type: Switch, public_ip: [195, 219, 138, 50], dz_prefix: ([195, 219, 138, 56], 29), status: Pending, code: "ams-dz001" }
  - Program log: Updated: GlobalState { account_type: GlobalState, account_index: 37 }
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 consumed 63786 of 200000 compute units
  - Program 6i4v8m3i7W2qPGRonFi8mehN76SXUkDcpgk4tPQhE2J4 success

@juan-malbeclabs juan-malbeclabs merged commit 1cb644a into main Mar 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants