You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stateless scripts are broken immediately because of intermediate ("third") script with additional data
stateful ones require additional care to handle specific parameters
The aim is to have N3 accounts work as is and provide more natural environment for contracts. In that environment we're checking for the script container hash and can have additional data like ledger height and current time provided by the runtime.
Describe the solution you'd like
An additional RPC endpoint for more generic script invocations.
invokescript isn't sufficient:
wrong trigger
can't have stable container hash
can't fake persisting block properly
invokecontractverify isn't sufficient:
doesn't cover regular verification scripts
can't have stable container hash
can't fake persisting block properly
We need something like invokecontainedscript(tx, block_header, trigger), where tx.Script is executed (it can be concatenated invocation+verification) with tx.Hash container (and other properties if passed) in a block with the given header (height/time/etc).
This will make stateless scripts work as is and stateful ones would just need to take into account indexes/time for reverifications. This also mostly shifts some responsibilities from the server side to client, whatever it provides we execute, regular invoke* functions create most of the same environment automatically based on current state.
The only caveat is honest NEP-30 contract-based verification, this doesn't fit into the model perfectly, but can be emulated if script to call verify() is provided client-side.
Describe alternatives you've considered
invokeverificationscript(invocation, verification, hash, time) was considered initially, but we can have something more generic.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm always frustrated when we can't solve nspcc-dev/neofs-api#305 easily. An attempt to do this in nspcc-dev/neofs-node#3216 shows some weaknesses:
The aim is to have N3 accounts work as is and provide more natural environment for contracts. In that environment we're checking for the script container hash and can have additional data like ledger height and current time provided by the runtime.
Describe the solution you'd like
An additional RPC endpoint for more generic script invocations.
invokescript
isn't sufficient:invokecontractverify
isn't sufficient:We need something like
invokecontainedscript(tx, block_header, trigger)
, where tx.Script is executed (it can be concatenated invocation+verification) with tx.Hash container (and other properties if passed) in a block with the given header (height/time/etc).This will make stateless scripts work as is and stateful ones would just need to take into account indexes/time for reverifications. This also mostly shifts some responsibilities from the server side to client, whatever it provides we execute, regular
invoke*
functions create most of the same environment automatically based on current state.The only caveat is honest NEP-30 contract-based verification, this doesn't fit into the model perfectly, but can be emulated if script to call
verify()
is provided client-side.Describe alternatives you've considered
invokeverificationscript(invocation, verification, hash, time)
was considered initially, but we can have something more generic.The text was updated successfully, but these errors were encountered: