feat: add SelfAdaptiveShardingExecutor
add new type of multi-point contract "SelfAdaptiveSharding"
This commit is contained in:
parent
f6c898dc9e
commit
89360bbf0c
@ -281,6 +281,7 @@
|
||||
<option value="4">RARH</option>
|
||||
<option value="5">RARA</option>
|
||||
<option value="6">Sharding</option>
|
||||
<option value="7">SASharding</option>
|
||||
</select>
|
||||
<div class="btn-group mr-3" role="group"
|
||||
style="margin-left: 2%">
|
||||
@ -504,7 +505,8 @@
|
||||
</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="输入参数" id="arg">
|
||||
<input type="text" class="form-control col-2" placeholder="输入gas" id="gasLimit">
|
||||
<input type="text" class="form-control col-2" placeholder="输入gas"
|
||||
id="gasLimit">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" id="executeContractAsDebug"
|
||||
@ -553,7 +555,8 @@
|
||||
<span class="input-group-text">参数</span>
|
||||
</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="输入参数" id="maskArg">
|
||||
<input type="text" class="form-control" placeholder="输入参数"
|
||||
id="maskArg">
|
||||
|
||||
<div class="input-group-append">
|
||||
<button onclick="getMask()" type="button"
|
||||
@ -586,7 +589,8 @@
|
||||
<span class="input-group-text">参数</span>
|
||||
</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="输入参数" id="mockArg">
|
||||
<input type="text" class="form-control" placeholder="输入参数"
|
||||
id="mockArg">
|
||||
|
||||
<div class="input-group-append">
|
||||
<button onclick="getMock()" type="button"
|
||||
|
@ -158,39 +158,44 @@ var onStartContract = function(obj) {
|
||||
};
|
||||
|
||||
// 集群启动合约
|
||||
var startContractUnits = function(place) {
|
||||
// ZYX
|
||||
var unitsID = $("#selectUnits")[0].value.split("_")[1];
|
||||
if(unitsID == undefined || unitsID == "选择节点集群"){
|
||||
myToast("提示","请选择节点集群!");
|
||||
return;
|
||||
}
|
||||
|
||||
var peersID = "";
|
||||
for ( var i in global.units[unitsID]) {
|
||||
peersID += global.units[unitsID][i].pubKey + ",";
|
||||
}
|
||||
|
||||
var request = {};
|
||||
|
||||
request.action = "startContractMultiPoint";
|
||||
request.peersID = peersID;
|
||||
request.type = $("#sequence")[0].value;
|
||||
console.log(request.type);
|
||||
if (request.type==0){
|
||||
myToast("提示","请选择集群合约模式!");
|
||||
function startContractUnits(place) {
|
||||
// ZYX
|
||||
const unitsID = $("#selectUnits")[0].value.split("_")[1];
|
||||
if (!unitsID || unitsID === "选择节点集群") {
|
||||
myToast("提示", "请选择节点集群!");
|
||||
return;
|
||||
}
|
||||
request.projectName = global.ypkName;
|
||||
if (request.projectName==undefined || request.projectName == "请选择ypk文件"){
|
||||
myToast("提示","请选择合约!");
|
||||
return;
|
||||
}
|
||||
request.isPrivate = global.ypkIsPrivate;
|
||||
request.sponsorPeerID = global.peerID; //peerID of the node
|
||||
console.log(request);
|
||||
global.wssocket.send(JSON.stringify(request));
|
||||
};
|
||||
}
|
||||
|
||||
let peersID = "";
|
||||
for (let i in global.units[unitsID]) {
|
||||
peersID += global.units[unitsID][i].pubKey + ",";
|
||||
}
|
||||
|
||||
const request = {};
|
||||
|
||||
request.action = "startContractMultiPoint";
|
||||
request.peersID = peersID;
|
||||
request.type = $("#sequence")[0].value;
|
||||
console.log(request.type);
|
||||
if (request.type == 0) {
|
||||
myToast("提示", "请选择集群合约模式!");
|
||||
return;
|
||||
}
|
||||
request.selectUnitNum = Number($("#selectUnitNum")[0].value);
|
||||
if (!request.selectUnitNum || isNaN(request.selectUnitNum)) {
|
||||
myToast("提示", "请填写集群规模!");
|
||||
return;
|
||||
}
|
||||
request.projectName = global.ypkName;
|
||||
if (!request.projectName || request.projectName == "请选择ypk文件") {
|
||||
myToast("提示", "请选择合约!");
|
||||
return;
|
||||
}
|
||||
request.isPrivate = global.ypkIsPrivate;
|
||||
request.sponsorPeerID = global.peerID; //peerID of the node
|
||||
console.log(request);
|
||||
global.wssocket.send(JSON.stringify(request));
|
||||
}
|
||||
|
||||
var onStartTrustfulContract = function(obj) {
|
||||
console.log(obj);
|
||||
|
Loading…
Reference in New Issue
Block a user