Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antelope : RAM Operations #11

Merged
merged 5 commits into from
Sep 17, 2024
Merged

Antelope : RAM Operations #11

merged 5 commits into from
Sep 17, 2024

Conversation

zolting
Copy link
Contributor

@zolting zolting commented Sep 13, 2024

Added the RAM Operations table for Antelope.

Operation field (depecrated, replace by action_index + action) is included for retrocompatiblity

Clickhouse select eos.ram_ops

@DenisCarriere
Copy link
Contributor

Oh, whenever there's a *_to_string() conversion, I also include the *_code as uint8

  • operation_code
  • namespace_code
  • action_code

@DenisCarriere
Copy link
Contributor

DenisCarriere commented Sep 17, 2024

For PRIMARY KEY, I'm not sure if unique_key is actually unique, I believe it represents the unique key of the table row, but it's not actually unique per event, meaning this key could be duplicated within the same transaction

Confirmed, unique_key isn't unique per each new event

SELECT
    unique_key,
    count()
FROM eos.ram_ops
GROUP BY unique_key
ORDER BY count() DESC
LIMIT 10

Query id: 2d665685-646c-41a0-9fee-0473702358b3

┌─unique_key───────────────────────────┬─count()─┐
│ playuplandme:ir1d3fattbmc:t4:        │     136 │
│ playuplandme:ir1d3fattbmc:t4         │     136 │
│ playuplandme:ku33v4yekn1j:t4:        │     102 │
│ playuplandme:ku33v4yekn1j:t4         │     102 │
│ lend.defi:lend.defi:globals:claiming │      42 │
│ playuplandme:voxvaet15huk:t4         │      42 │
│ playuplandme:voxvaet15huk:t4:        │      42 │
│ playuplandme:xgi1rnwwcnff:t4         │      40 │
│ playuplandme:lsobgp3joaaf:t4         │      40 │
│ playuplandme:xgi1rnwwcnff:t4:        │      40 │
└──────────────────────────────────────┴─────────┘

@DenisCarriere
Copy link
Contributor

Updated PRIMARY KEY to:

PRIMARY KEY (tx_hash, action_index, unique_key)
ORDER BY (tx_hash, action_index, unique_key)

@DenisCarriere DenisCarriere merged commit e748b41 into main Sep 17, 2024
2 checks passed
@DenisCarriere DenisCarriere deleted the feature/ram_ops branch September 17, 2024 20:53
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.

2 participants