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
Summary or problem description
At present, smart contracts use a passive trigger mode. By monitoring the update of the data on the chain and using external programs to build a transactions to invoke contract.
E.g. We want to do some clearing operations. Now we need to use the trading robot to trigger the call of the smart contract clearing function interface at some time. If the trading robot is down at this time, we can only wait for the project party to repair it or deploy a new one.If we have a timer on the chain, the operation can be done automatically.This can make smart contracts more flexible, and the reliability of the project will be stronger.
Do you have any solution you want to propose?
Aim
Designing a pseudo-timer, the basic functions include:
Automatically trigger execution
Turn the timer on / off
Set timing time
Authorized execution
Principle
The current consensus mechanism is difficult to implement the timer function in the true sense, but we can integrate external monitoring programs into NEO through a plugin and then combine some interoperation service to implement an on-chain pseudo timer.
We first set the functions that need to be executed automatically and the time interval (the number of blocks) in the contract.At the same time, the consensus node needs to install a monitoring plugin. Its role is to monitor which contracts have timed tasks enabled, add these calling tasks to the work task queue, and execute these calling tasks at the corresponding time (the execution interval set by the contract).It will construct a contract call transaction, this transaction will be broadcast to all consensus nodes, and the consensus node will multi-sign the transaction.When the number of signatures is sufficient, the transaction will be put into the block and executed on the chain.
New Interoperable Services
New interoperation services can be included into three parts: timing time setting, turning on / off timer, setting the function to be executed.
A. Timing time setting: set the execution interval (the number of blocks)
B. On / off timer: whether to start the timer
C. Set the function to be executed: Set the name of the function that the timer needs to execute periodically
Monitoring plugin
The monitoring plugin contains three functions: monitoring, constructing transactions, and signing transactions
a. Monitoring: Monitor the timing tasks of all contracts and add them to the work task queue
b. Constructing transactions: constructing transactions according to the work task queue at certain intervals
c. Signature transactions: Multi-sign the transaction and add it to the proposal block if the number of signatures is sufficient
Risk point
A. The problem of calling fee payment
B. Call permission problem
Scenes
1.Automatic settlement, airdrop and other operations
Settlement of auction results, airdrops of tokens, and other actions that need to be triggered off-chain can be triggered on the chain. NEO becomes a distributed computer.
2.Cross-chain (cooperating with Oracle can eliminate the need for alliance chain)
By combining timers with Oracle, NEO can realize the function of automatic handling, and there is every reason to become an intermediary, which can increase the value of NEO .
Neo Version
Neo 3
Where in the software does this update applies to?
Other:
The text was updated successfully, but these errors were encountered:
Summary or problem description
At present, smart contracts use a passive trigger mode. By monitoring the update of the data on the chain and using external programs to build a transactions to invoke contract.
E.g. We want to do some clearing operations. Now we need to use the trading robot to trigger the call of the smart contract clearing function interface at some time. If the trading robot is down at this time, we can only wait for the project party to repair it or deploy a new one.If we have a timer on the chain, the operation can be done automatically.This can make smart contracts more flexible, and the reliability of the project will be stronger.
Do you have any solution you want to propose?
Aim
Designing a pseudo-timer, the basic functions include:
Principle
The current consensus mechanism is difficult to implement the timer function in the true sense, but we can integrate external monitoring programs into NEO through a plugin and then combine some interoperation service to implement an on-chain pseudo timer.
We first set the functions that need to be executed automatically and the time interval (the number of blocks) in the contract.At the same time, the consensus node needs to install a monitoring plugin. Its role is to monitor which contracts have timed tasks enabled, add these calling tasks to the work task queue, and execute these calling tasks at the corresponding time (the execution interval set by the contract).It will construct a contract call transaction, this transaction will be broadcast to all consensus nodes, and the consensus node will multi-sign the transaction.When the number of signatures is sufficient, the transaction will be put into the block and executed on the chain.
New Interoperable Services
New interoperation services can be included into three parts: timing time setting, turning on / off timer, setting the function to be executed.
A. Timing time setting: set the execution interval (the number of blocks)
B. On / off timer: whether to start the timer
C. Set the function to be executed: Set the name of the function that the timer needs to execute periodically
Monitoring plugin
The monitoring plugin contains three functions: monitoring, constructing transactions, and signing transactions
a. Monitoring: Monitor the timing tasks of all contracts and add them to the work task queue
b. Constructing transactions: constructing transactions according to the work task queue at certain intervals
c. Signature transactions: Multi-sign the transaction and add it to the proposal block if the number of signatures is sufficient
Risk point
A. The problem of calling fee payment
B. Call permission problem
Scenes
1.Automatic settlement, airdrop and other operations
Settlement of auction results, airdrops of tokens, and other actions that need to be triggered off-chain can be triggered on the chain. NEO becomes a distributed computer.
2.Cross-chain (cooperating with Oracle can eliminate the need for alliance chain)
By combining timers with Oracle, NEO can realize the function of automatic handling, and there is every reason to become an intermediary, which can increase the value of NEO .
Neo Version
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: