Skip to content

feat(dpp): serialize consensus errors - #871

Merged
shumkov merged 83 commits into
v0.24-devfrom
refactor-consensus-errors
Apr 4, 2023
Merged

shumkov merged 83 commits into
v0.24-devfrom
refactor-consensus-errors

Conversation

@shumkov

@shumkov shumkov commented Mar 29, 2023 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

To report a state transition execution result we use Tenderdash response codes and info to store error details as a serialized error. This data is stored as a block result in Tenderdash. Then DAPI retrieves the error code and info and provides them to a client to recreate the error.

What was done?

  • Removed unnecessary and complex data from consensus errors
  • Implemented serialization and deserialization of consensus errors
  • Put consensus errors structure/error codes/names into order according to js-dpp.
  • Implemented the deserializeConsensusError function for wasm-dpp
  • Implemented messages for consensus errors in wasm-dpp

How Has This Been Tested?

With tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

shumkov and others added 30 commits March 30, 2023 01:02
…refactor-consensus-errors

# Conflicts:
#	packages/rs-dpp/src/errors/consensus/basic/basic_error.rs
…refactor-consensus-errors

# Conflicts:
#	packages/rs-dpp/src/errors/consensus/basic/basic_error.rs
…refactor-consensus-errors

# Conflicts:
#	packages/rs-dpp/src/tests/version/protocol_version_validator_spec.rs
@shumkov shumkov changed the title feat(dpp): create consensus error by code and arguments feat(dpp): serialize consensus errors Apr 4, 2023
@shumkov
shumkov marked this pull request as ready for review April 4, 2023 06:34
@shumkov
shumkov requested a review from antouhou as a code owner April 4, 2023 06:34
Comment thread packages/rs-dpp/src/data_trigger/mod.rs Resolved
@shumkov
shumkov merged commit 24b8795 into v0.24-dev Apr 4, 2023
@shumkov
shumkov deleted the refactor-consensus-errors branch April 4, 2023 09:40
markin-io pushed a commit that referenced this pull request Apr 25, 2023
@markin-io markin-io mentioned this pull request Apr 25, 2023
3 of 5 tasks
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