consensus/clique: Proof of Authority (#3753)
This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
This commit is contained in:
committed by
Felix Lange
parent
bfe5eb7f8c
commit
feeccdf4ec
@ -20,6 +20,7 @@ package web3ext
|
||||
var Modules = map[string]string{
|
||||
"admin": Admin_JS,
|
||||
"chequebook": Chequebook_JS,
|
||||
"clique": Clique_JS,
|
||||
"debug": Debug_JS,
|
||||
"eth": Eth_JS,
|
||||
"miner": Miner_JS,
|
||||
@ -29,8 +30,10 @@ var Modules = map[string]string{
|
||||
"shh": Shh_JS,
|
||||
"swarmfs": SWARMFS_JS,
|
||||
"txpool": TxPool_JS,
|
||||
|
||||
}
|
||||
|
||||
|
||||
const Chequebook_JS = `
|
||||
web3._extend({
|
||||
property: 'chequebook',
|
||||
@ -63,6 +66,44 @@ web3._extend({
|
||||
});
|
||||
`
|
||||
|
||||
const Clique_JS = `
|
||||
web3._extend({
|
||||
property: 'clique',
|
||||
methods:
|
||||
[
|
||||
new web3._extend.Method({
|
||||
name: 'getSnapshot',
|
||||
call: 'clique_getSnapshot',
|
||||
params: 1,
|
||||
inputFormatter: [null]
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'getSigners',
|
||||
call: 'clique_getSigners',
|
||||
params: 1,
|
||||
inputFormatter: [null]
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'propose',
|
||||
call: 'clique_propose',
|
||||
params: 2
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'discard',
|
||||
call: 'clique_discard',
|
||||
params: 1
|
||||
})
|
||||
],
|
||||
properties:
|
||||
[
|
||||
new web3._extend.Property({
|
||||
name: 'proposals',
|
||||
getter: 'clique_proposals'
|
||||
}),
|
||||
]
|
||||
});
|
||||
`
|
||||
|
||||
const Admin_JS = `
|
||||
web3._extend({
|
||||
property: 'admin',
|
||||
|
Reference in New Issue
Block a user