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

Cannot create MosaicGlobalRestriction with referenceMosaicId #45

Closed
dgarcia360 opened this issue Oct 5, 2019 · 1 comment
Closed

Cannot create MosaicGlobalRestriction with referenceMosaicId #45

dgarcia360 opened this issue Oct 5, 2019 · 1 comment
Labels
bug

Comments

@dgarcia360
Copy link
Member

@dgarcia360 dgarcia360 commented Oct 5, 2019

1. Expected behavior and actual behavior.

I'm having problems when creating a mosaic global restriction with a referenceMosaicId, getting the error Failure_RestrictionMosaic_Previous_Value_Must_Be_Zero (see 2. Steps to reproduce the problem).

The issue might not be in the SDK, but in the catbuffer serialization or server. Please feel free to escalate the issue to another repo if someone finds the root of the problem. Even though, we could start by adding an e2e test.

2. Steps to reproduce the problem.

Assuming key = randUInt64Value

  1. Create a new restrictable mosaic M1 with account A
  2. Announce with A a MosaicGlobalRestriction TX1:
Property Value
mosaicId M1
restrictionKey key
previousRestrictionType None
previousRestrictionValue 0
newRestrictionType EQ
newRestrictionValue 1
  1. TX1 gets confirmed
  2. Create a new restrictable M2 mosaic M2 with account B
  3. Announce with B a MosaicGlobalRestriction TX2
Property Value
mosaicId M2
referenceMosaicId M1
restrictionKey key
previousRestrictionType None
previousRestrictionValue 0
newRestrictionType EQ
newRestrictionValue 2
  1. TX2 does not get confirmed, raising the error 0x80510003 - Failure_RestrictionMosaic_Previous_Value_Must_Be_Zero

You can also find here the code used (steps 1-3).

  1. Specifications like the version of the project, operating system, or hardware.
  • nem2-sdk@0.13.3
  • c2 0.7.0.1

Initially reported here.

@dgarcia360 dgarcia360 changed the title Cannot create a mosaic global restriction with a referenceMosaicId Cannot create MosaicGlobalRestriction with referenceMosaicId Oct 5, 2019
@dgarcia360 dgarcia360 added the bug label Oct 22, 2019
gimer pushed a commit that referenced this issue Nov 8, 2019
### Added
 - Support for `make install`

### Changed
 - Add hash variant name to binary descriptions
 - Realign transaction binary layouts to maximize alignment of fields
 - Add `AggregateTransaction::TransactionHash` that contains merkle hash of component transactions
 - Store `Version` and `Network` directly in `EntityBody`

### Fixed
 - GitHub Issues: #45 #46 #47 #48 #49 #50
 - Bug in harvester `StateHash` calculation when `transactionSelectionStrategy` is not `oldest`
 - Fix remaining UBSAN and TSAN warnings
@Jaguar0625

This comment has been minimized.

Copy link
Member

@Jaguar0625 Jaguar0625 commented Nov 8, 2019

Fixed in 621ccbd [v0.9.0.1].

@Jaguar0625 Jaguar0625 closed this Nov 8, 2019
Jaguar0625 pushed a commit that referenced this issue Nov 14, 2019
### Added
 - Support for `make install`

### Changed
 - Add hash variant name to binary descriptions
 - Realign transaction binary layouts to maximize alignment of fields
 - Add `AggregateTransaction::TransactionHash` that contains merkle hash of component transactions
 - Store `Version` and `Network` directly in `EntityBody`

### Fixed
 - GitHub Issues: #45 #46 #47 #48 #49 #50
 - Bug in harvester `StateHash` calculation when `transactionSelectionStrategy` is not `oldest`
 - Fix remaining UBSAN and TSAN warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.