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
from - the issue manager account, note: it must be unlocked
to - the contract address
data - the hash of the invoked method signature and encoded parameters
Notes
Transaction data
In a transaction data the first four bytes of the call data for a function
call specifies the function to be called. It is the first (left, high-order in
big-endian) four bytes of the Keccak (SHA-3) hash of the signature of the
function.
The signature is defined as the canonical expression of the basic prototype,
i.e. the function name with the parenthesised list of parameter types. Parameter
types are split by a single comma - no spaces are used.
See the Function
Selector
section of Ethereum Contract ABI wiki page.
The first four bytes are 0x38b1e418, are the first four bytes of the hash of
the verifyResolution function signature, that is verifyResolution(bytes32,address,bytes32).
They're padded on the lower-order (right) side with zero-bytes such that the
length is 32 bytes in the byte32 case, or padded on the higher-order (left)
side with zero-bytes such that the length is a multiple of 32 bytes in the address case.
There are two optional parameters that have been omitted from the example
request: gas and gasPrice.
The default gas value is 90000 and is just enough to send a "verify patch"
transaction. The last time I tested it I spent 88971 gas.
Gas price, if omitted, is going to be determined based on the mean gas price at
the time the transaction is sent. I think that's ok for now, but we should
create a new issue to make the gas price variable according to the patch
submission fee.
Unlocking an account
The from account must me unlocked in order to be able to sign (and send) the
transaction. To unlock an account there's a Management API's personal_unlockaccount
function that can be used.
The unencrypted key will be held in memory until the unlock duration expires.
If the unlock duration defaults to 300 seconds. An explicit duration of zero
seconds unlocks the key until geth exits.
Security (or lack of): the invocation can use zero seconds as the expiration
param for the first version of this feature.
The text was updated successfully, but these errors were encountered:
This can be done by creating a new transaction that includes the correct data.
Example
Params:
from
- the issue manager account, note: it must be unlockedto
- the contract addressdata
- the hash of the invoked method signature and encoded parametersNotes
Transaction data
In a transaction data the first four bytes of the call data for a function
call specifies the function to be called. It is the first (left, high-order in
big-endian) four bytes of the Keccak (SHA-3) hash of the signature of the
function.
The signature is defined as the canonical expression of the basic prototype,
i.e. the function name with the parenthesised list of parameter types. Parameter
types are split by a single comma - no spaces are used.
See the Function
Selector
section of Ethereum Contract ABI wiki page.
Example transaction data
The example transaction included the data:
The first four bytes are
0x38b1e418
, are the first four bytes of the hash ofthe
verifyResolution
function signature, that isverifyResolution(bytes32,address,bytes32)
.In a geth console:
The remaining data
is the hexadecimal representation of:
issueId
resolutor
addresscommitSHA
They're padded on the lower-order (right) side with zero-bytes such that the
length is 32 bytes in the
byte32
case, or padded on the higher-order (left)side with zero-bytes such that the length is a multiple of 32 bytes in the
address
case.In a geth console:
Decoded params:
issueId
: https://git.io/v5l3tresolutor
: 0x2dfbd363bf80097c24fa063730d0daace296533ecommitSHA
: 3057ae2b1d6052c64499aac90801a796Resources:
Gas and gas price
There are two optional parameters that have been omitted from the example
request:
gas
andgasPrice
.The default
gas
value is 90000 and is just enough to send a "verify patch"transaction. The last time I tested it I spent 88971 gas.
Gas price, if omitted, is going to be determined based on the mean gas price at
the time the transaction is sent. I think that's ok for now, but we should
create a new issue to make the gas price variable according to the patch
submission fee.
Unlocking an account
The
from
account must me unlocked in order to be able to sign (and send) thetransaction. To unlock an account there's a Management API's
personal_unlockaccount
function that can be used.
Example
Params:
From the doc:
Security (or lack of): the invocation can use zero seconds as the expiration
param for the first version of this feature.
The text was updated successfully, but these errors were encountered: