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

Save operation_result and proposed_ops as objects in ElasticSearch plugin #2380

Closed
1 of 17 tasks
abitmore opened this issue Mar 12, 2021 · 6 comments · Fixed by #2565
Closed
1 of 17 tasks

Save operation_result and proposed_ops as objects in ElasticSearch plugin #2380

abitmore opened this issue Mar 12, 2021 · 6 comments · Fixed by #2565
Assignees

Comments

@abitmore
Copy link
Member

abitmore commented Mar 12, 2021

User Story

As a user of ElasticSearch plugin I'd like that the operation_result field can be saved as objects so that the data can be indexed.

And mentioned by @sschiessl-bcp in #2380 (comment):

I also noticed that proposals' proposed ops are stored as string, might be interesting as well

Additional Context (optional)
By now op in ES are saved as objects and strings, but operation_result is only strings.

#1400 is related.

#2568 is the next work to be done.

Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@sschiessl-bcp
Copy link

I also noticed that proposals' proposed ops are stored as string, might be interesting as well

@abitmore abitmore changed the title Save operation_result as objects in ElasticSearch plugin Save operation_result and proposed_ops as objects in ElasticSearch plugin Mar 14, 2021
@abitmore
Copy link
Member Author

@sschiessl-bcp I guess operation_result and proposed_ops were stored as strings intentionally because ES is unable to correctly store static_variant as is as object. It seems it's not a simple change. I'll look into it to see what's the best we can do.

@sschiessl-bcp
Copy link

Thanks, if its too complicated it's not a big issue. Benefit is "only" that it would facilitate searching proposal contents.

@abitmore
Copy link
Member Author

#1400 is related.

@abitmore
Copy link
Member Author

Note: in the current implementation, the string version of proposed_ops is not the same as the original json. Specifically, the operation type 12 should be an integer but not a string.

account_history.id : "2.9.479380"
operation_history.op_object.proposed_ops : [{"op":["12",{"fee":{"amount":100000000,"asset_id":"1.3.0"},"issuer":"1.2.0","asset_to_update":"1.3.113","new_options":{"feed_lifetime_sec":86400,"minimum_feeds":7,"force_settlement_delay_sec":86400,"force_settlement_offset_percent":0,"maximum_force_settlement_volume":200,"short_backing_asset":"1.3.0","extensions":{}},"extensions":[]}]}]

@abitmore
Copy link
Member Author

Done via #2565. Closing.
BTW #2568 is the next work to be done.

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 a pull request may close this issue.

2 participants