Skip to content

Masternode vote transition does not validate indexValues value #2769

@pshenmic

Description

@pshenmic

Expected Behavior

GRPC broadcastStateTransition query throw a error and an explanation if transaction is not valid

Current Behavior

MasternodeVoteTransition's indexValues is an Vec that usually accepts a string, but if you pass a base64 for example, it does not validate the values. Such transaction successfully accepted by broadcastStateTransition method, meaning that it was accepted by the chain. However, since transaction is not fully valid, it does not get in the chain and get stucked in the mempool.

/org.dash.platform.dapi.v0.Platform/broadcastStateTransition ALREADY_EXISTS: state transition already in mempool

If I switch the ordering of indexValues, the same broadcast fails with:

/org.dash.platform.dapi.v0.Platform/broadcastStateTransition INTERNAL: Internal error

Possible Solution

Implement checks in the Drive

Steps to Reproduce (for bugs)

  1. Create invalid MasternodeVoteTransition
  2. Try to broadcast
  3. The error is not thrown
  4. Transaction is not appearing on Platform Explorer

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop, server, or mobile):
  • Link to your project:

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions