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

Custom operation plugin #1847

Closed
syalon opened this issue Jul 12, 2019 · 10 comments
Closed

Custom operation plugin #1847

syalon opened this issue Jul 12, 2019 · 10 comments
Assignees

Comments

@syalon
Copy link
Member

syalon commented Jul 12, 2019

Background

Currently, the account in bitshares cannot store any data information. Only store data via custom op.
For example: contact information, custom market information, setting information, etc.

However, the data in custom op currently has no API interface for easy retrieval. So I hope to provide plugins for support.

Requirements

API interface

Currently custom op mainly contains the id and data fields. Consider reorganizing the data in the form of a hashmap. And provide several API query data:

  • get_custom_by_key(hash_key) // hash_key can consider the id field in custom op
  • get_custom_datas // Get the complete hashmap data associated with the account.

For the definition of hash_key, we can also draft a specification, such as 0x01 at the beginning as contact information, etc., to facilitate mobile, ui and other client public data.

For the organization of the data, everyone has other comments welcome.

API Server

Plugins can be considered to be enabled by default.

背景

目前bitshares中的account不能存储任何数据信息。只有通过custom op进行扩展操作。用于存储和account相关的数据。
比如:联系人信息、自定义市场信息、设置信息等

但目前custom op中的数据没有方便检索的API接口。所以希望提供插件进行支持。

需求

API接口

目前custom op主要包含 iddata 字段。考虑通过hashmap的形式重新组织数据。并提供几个API查询数据:

  • get_custom_by_key(hash_key) // hash_key 可以考虑 custom op中的id字段
  • get_custom_datas // 获取和account关联的完整hashmap数据。

对于hash_key的定义也可以起草一个规范,比如0x01开头作为联系人信息等,方便mobile、ui以及其他客户端公用数据。

对于数据的组织形式,大家有其他意见欢迎提出。

API服务器

插件可考虑默认启用。

@abitmore @oxarbitrage @ryanRfox

@syalon syalon changed the title custom operation plugin Custom operation plugin Jul 12, 2019
@abitmore
Copy link
Member

For reference, please check the "follow plugin" in Steem. With this plugin, Steem accounts can follow or ignore other accounts. https://github.com/steemit/steem/tree/master/libraries/plugins/follow

@oxarbitrage
Copy link
Member

I had some conversations with @abitmore on how to implement this plugin and i am going to give a try to it. I will pull request as soon as i have something to share, i expect to be on it this starting week.

@oxarbitrage oxarbitrage self-assigned this Jul 20, 2019
@sschiessl-bcp
Copy link

Is the idea to expand the current state to be able to include custom information for each account, or "only" a separate plugin that node operators can run that translates custom operation payload to be always accessible?

If the UI or mobile would be making use of such a feature, it would need to be available for all nodes, thus should be feasible to enable as default without having RAM explode.

@abitmore
Copy link
Member

The idea is to expand the current state, in a plugin, need API nodes to enable the plugin to be used by UI and mobile.

@syalon
Copy link
Member Author

syalon commented Jul 23, 2019

It seems that there is progress, thank you to the core team. For the general purpose of ui and mobile, we also need to specify some standards. Of course, these can be discussed in terms of the final implementation of @oxarbitrage .

@oxarbitrage oxarbitrage added this to the 3.3.0 - Feature Release milestone Jul 23, 2019
@oxarbitrage
Copy link
Member

There is going to be an informational BSIP similar to https://github.com/bitshares/bsips/blob/master/bsip-0060.md to specify some standards. However i will do that side by side with a prototype of the plugin as i a had not decided what will be the best standards yet.

@syalon
Copy link
Member Author

syalon commented Aug 14, 2019

Is there a planned release date for version 3.3.0?

@pmconrad
Copy link
Contributor

Yes, see https://github.com/bitshares/bitshares-core/projects/18 . We're a little behind schedule though. :-/

@abitmore
Copy link
Member

AFAIK we have made good progress on this, but not ready for 3.3 release. So I moved this to next release.

@oxarbitrage
Copy link
Member

Finally a first version of the custom_operations plugin was merged at #1926

Specific problems will be handled in individual issues. Thank you :)

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

No branches or pull requests

6 participants