The .neo-express
file for Neo N3 compatible versions of N3 includes a settings
object property.
This document details the values that Neo-Express reads from the settings
object.
The chain.SecondsPerBlock
Neo-Express setting corresponds to the MillisecondsPerBlock
config.json property
and the --secondsPerBlock
option for the Neo-Express run
command.
By default, Neo-Express mints a new block every 15 seconds. The chain.SecondsPerBlock
setting can
be used to override the default behavior. If the run
command --secondsPerBlock
option is specified,
the chain.SecondsPerBlock
setting is ignored.
chain.SecondsPerBlock
is specified as an unsigned integer. If you specify an invalid unsigned integer
value for this setting, Neo-Express reverts to the default.
Example usage:
"settings": {
"chain.SecondsPerBlock": "5" // Mint a new block every 5 seconds
}
The rpc.BindAddress
Neo-Express setting corresponds to the BindAddress
RpcServer config property.
By default, Neo-Express only listens for JSON-RPC requests on the loopback address. This means that
JSON-RPC requests must originate on the same machine as Neo-Express is running in order to be serviced.
While this is the most secure approach, it limits the ability of the developer to test cross machine
scenarios, especially ones that involve mobile devices. The rpc.BindAddress
setting can be used to
override the default behavior.
The rpc.BindAddress
field accepts an IP address in dotted quad notation. It specifies the IP Address
that the JSON-RPC server will listen on for client requests. Typically, to enable remote access to
a Neo-Express instance, you would specify the rpc.BindAddress
to be 0.0.0.0
.
If you specify an invalid IP Address, Neo-Express reverts to the default loopback BindAddress
(aka 127.0.0.1
).
Example usage:
"settings": {
"rpc.BindAddress": "0.0.0.0" // listens for JSON-RPC requests on all network interfaces
}
The rpc.MaxFee
Neo-Express setting corresponds to the MaxFee
RpcServer config property.
This setting specifies a maximum Network Fee for the
sendfrom
,
sendmany
and sendtoaddress
JSON-RPC methods.
This setting defaults to 0.1 GAS. If you specify an invalid decimal value for this setting, Neo-Express reverts to the default.
Example usage:
"settings": {
"rpc.MaxFee": "0.2" // support higher network fee for send[from/many/toaddress] methods
}
The rpc.MaxGasInvoke
Neo-Express setting corresponds to the MaxGasInvoke
RpcServer config property.
This setting specifies maximum limit in GAS for the
invokefunction
and invokescript
JSON-RPC methods.
This setting defaults to 10.0 GAS. If you specify an invalid decimal value for this setting, Neo-Express reverts to the default.
Example usage:
"settings": {
"rpc.MaxGasInvoke": "15" // support higher GAS limit for invoke[function/script] methods
}
The rpc.MaxIteratorResultItems
Neo-Express setting corresponds to the MaxIteratorResultItems
RpcServer config property.
This setting specifies maximum number of items returned to the RPC caller when there is an iterator
on the result stack.
This setting defaults to 100 items. If you specify an invalid or negative integer value for this setting, Neo-Express reverts to the default.
Example usage:
"settings": {
"rpc.MaxIteratorResultItems": "150" // support higher item limit for iterator results
}
The rpc.SessionEnabled
Neo-Express setting corresponds to the SessionEnabled
RpcServer config property.
This setting specifies if iterator sessions are enabled.
This setting defaults to true
. If you specify an invalid boolean value for this setting,
Neo-Express reverts to the default.
Example usage:
"settings": {
"rpc.SessionEnabled": "false" // disable sessions
}