-
Notifications
You must be signed in to change notification settings - Fork 95
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
Changes to add Account support #435
Conversation
…go into tmp-accounts
The field must be second last with the nonce being last in order for the `contentHashFromBlockBytes` to work correctly. Also make the calculation of `SlotIdentifierLength` slightly more clear by using the size of a `uint64` rather than `int64`.
@@ -99,6 +101,12 @@ type ProtocolParameters struct { | |||
GenesisUnixTimestamp uint32 `serix:"6,mapKey=genesisUnixTimestamp"` | |||
// SlotDurationInSeconds defines the duration of each slot in seconds. | |||
SlotDurationInSeconds uint8 `serix:"7,mapKey=slotDurationInSeconds"` | |||
// ManaGenerationRate is the amount of potential Mana generated by 1 IOTA in 1 slot. | |||
ManaGenerationRate uint8 //`serix:"8,mapKey=manaGenerationRate"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are the serix tags commented out?
@@ -47,6 +47,8 @@ func LatestAPI(protoParams *ProtocolParameters) API { | |||
} | |||
|
|||
// calls the internally instantiated API to encode the given object. | |||
// | |||
//nolint:unparam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why unparam here?
@@ -86,8 +86,9 @@ func TestProtocolParametersJSONMarshalling(t *testing.T) { | |||
TokenSupply: 1234567890987654321, | |||
GenesisUnixTimestamp: 1681373293, | |||
SlotDurationInSeconds: 10, | |||
MaxCommitableAge: 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the new mana values to this test
} | ||
|
||
func (s *BlockIssuerFeature) VBytes(rentStruct *RentStructure, _ VBytesFunc) VBytes { | ||
// TODO: add factor for block issuer keys (higher than regular keys factor). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about this TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracked in iotaledger/iota-core#137
@@ -403,6 +432,22 @@ func ExecFuncSenderUnlocked() ExecFunc { | |||
} | |||
} | |||
|
|||
// ExecFuncBalancedMana validates that Mana is balanced from the input/output side. | |||
// TODO: Return Mana according to StorageDepositReturnUnlockCondition(s)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5251c62
to
537f7d9
Compare
537f7d9
to
a483caf
Compare
a09f9d7
to
2e18e83
Compare
7527feb
to
328934f
Compare
Description of change
This PR introduces a large number of changes that add support for using AccountOutput in a transaction, in place of AliasOutput.
It also extends VM to support Transaction validation when creating, destroying or modifying an AccountOutput.
Type of change
Choose a type of change, and delete any options that are not relevant.
How the change has been tested
Implemented unit tests.
This code is also used in iota-core software which uses it in it's own test cases.
Make sure to provide instructions for the maintainer as well as any relevant configurations.
Change checklist
Add an
x
to the boxes that are relevant to your changes, and delete any items that are not.