CityOfZion / props

Ecosystem props than can be used to enhance project functionality
5 stars 3 forks source link

Neoxp policy parameter names listed in setup document are incorrect? #38

Closed roschler closed 2 years ago

roschler commented 2 years ago

The PROPS setup document:

https://props.coz.io/d/docs/overview

Has this block of instructions for configuring various policy parameters on NeoExpress:

neoxp policy set FeePerByte 100 genesis
neoxp policy set ExecFeeFactor 3 genesis
neoxp policy set StoragePrice 10000 genesis
neoxp transfer 10000 GAS genesis coz

Each of these commands results in a the following error:

Unhandled exception. McMaster.Extensions.CommandLineUtils.CommandParsingException: Invalid value specified for Policy. Allowed values are: GasPerBlock, MinimumDeploymentFee, CandidateRegistrationFee, OracleRequestFee, NetworkFeePerByte, StorageFeeFactor, ExecutionFeeFactor.

Are they correct? I am running neoxp version: 3.1.38+29ceee055e

roschler commented 2 years ago
Later when I try to the puppet minting test, I get this error (stack trace has been truncated: ``` Build me an army worthy of NMdLsuFLRnzZWqdcwBjTR4NKavmkMJYWcp !!! Minting 50 puppets! This may take a while, you can watch the action on neo-express. creating a generator instance with generator 1 gas consumed: 0.2105835 Generator Instance ID: 1 creating an epoch with generator instance 1 epoch ID: 1 set mint permissions for the generator result: 1 errored here Error: Failed to get system fee. Error: Script execution failed. ExecutionEngine state = FAULT. GAS must be positive. at getSystemFee ``` I am not opening a separate issue on this error in case it is derivative of the error I have reported above.
devhawk commented 2 years ago

FeePerByte, ExecFeeFactor and 'StoragePrice` were the original names for policy settings when the command was added in the v3.0.x branch of express.

When the policy sync command was added between v3.0 and v3.1, the remaining policy settings from https://governance.neo.org were added and the names were changed to reflect the public governance values.

If support for the old names is important, I can look to add them as aliases, but we aren't doing any more 3.1.x releases since 3.2 is coming up soon. I'd rather just have everyone more to the new policy names.

But feel free to open an issue in the express repo to add support for backwards compatible policy names.

lllwvlvwlll commented 2 years ago

@devhawk We'll just push an update here instead of forcing backwards compatibility for a new project.

roschler commented 2 years ago

New instructions work better. I did get an error when the configuration code attempts to get the current system fee, but it may be because I had already deployed the contract during my first attempt with the old instructions (see below)? If that is true, can something be changed so that re-running the configuration steps does not get the "Contract already exists" error. Or if that is not the reason for the error, what is wrong and how can I fix it?

deploying collection to 0x23e27f3aeb76a65e573f5ee8842c35d42e643b70 ...
deploying dice to 0x16d6a0be0506b26e0826dd352724cda0defa7131 ...
deploying generator to 0xf8cab6d2ad81e3b7b6f94ef8bb12b8611c9952ab ...
deploying puppet to 0x1830a4bacda1008375faa0253f249b04024f8a69 ...
C:\Users\rober\Documents\GitHub\ME\props\node_modules\@cityofzion\neon-js\dist\index.js:21802
        throw new Error(`Failed to get system fee. ${e}`);
              ^

Error: Failed to get system fee. Error: Script execution failed. ExecutionEngine state = FAULT. Contract Already Exists: 0x16d6a0be0506b26e0826dd352724cda0defa7131
    at getSystemFee (C:\Users\rober\Documents\GitHub\ME\props\node_modules\@cityofzion\neon-js\dist\index.js:21802:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async addFees (C:\Users\rober\Documents\GitHub\ME\props\node_modules\@cityofzion\neon-js\dist\index.js:21838:33)
    at async Object.deployContract (C:\Users\rober\Documents\GitHub\ME\props\node_modules\@cityofzion\neon-js\dist\index.js:21883:5)
    at async synchronousDeploy (C:\Users\rober\Documents\GitHub\ME\props\scripts\deploy.js:11:18)
lllwvlvwlll commented 2 years ago

There is a reference here: https://props.coz.io/d/docs/contracts#running-a-local-private-network

We can add a note about this error.