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

Clarity Event logging (AssetMaps, etc) #1204

Closed
jcnelson opened this issue Jan 3, 2020 · 3 comments
Closed

Clarity Event logging (AssetMaps, etc) #1204

jcnelson opened this issue Jan 3, 2020 · 3 comments
Assignees
Labels

Comments

@jcnelson
Copy link
Member

jcnelson commented Jan 3, 2020

An important feature required by both exchanges and block explorers is the ability to see how much of each asset was moved by a given transaction (STX or otherwise). We track this with AssetMaps, but we don't expose any public interface for consuming them. We should provide an option to log all (txid, tx-fee-paid, asset-name, asset-recipient, asset-quantity) records to a dedicated sqlite database, which can be used to service these kinds of queries. We could also expose this information via the RPC interface.

Logging assets is effectively an optimization for operators who need to issue lots of random transaction queries. For low-volume use-cases (like personal nodes), the same information can be obtained by simply replaying the epoch data containing the transaction from the state indicated by the previous epoch's state root. The user would do so with a modified Clarity VM instance whose datastore was programmed to query data maps and variables from the blockchain state at that point in time.

@jcnelson jcnelson self-assigned this Jan 3, 2020
@jcnelson
Copy link
Member Author

In the same vein, make it so the Stacks node emits events through a local socket (e.g. a unix domain socket or whatever), and make it so smart contracts can emit particular events when they run, so receivers can be notified when things happen.

@jcnelson
Copy link
Member Author

To be clear, I do not believe that this feature should be used to procure a publicly-accessible dataset without also making the act of logging the data as expensive as storing it in a data map. Otherwise, the act of curating a public dataset of log data is the act of giving enterprising app developers free hosting for data their smart contract "stores" via this facility.

@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants