Skip to content

Commit

Permalink
Merge pull request #79 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored Oct 15, 2018
2 parents c30c5ca + df64358 commit e9f86ed
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 47 deletions.
44 changes: 23 additions & 21 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variables:
DOCKER_DRIVER: overlay2
DEFAULT_CLI_BRANCH: dev
DEFAULT_EASYDEXGUI_BRANCH: dev
AGAMA_VERSION: 0.3.13c
AGAMA_VERSION: 0.4.0
EASYDEX_GUI_BUILD: build.tar.gz
ELECTRON_BUILD_LINUX: Agama-linux-x64
ELECTRON_BUILD_WINDOWS: Agama-win32-x64
Expand All @@ -15,7 +15,13 @@ variables:
AGAMA_WINDOWS: ${ELECTRON_BUILD_WINDOWS}-v${AGAMA_VERSION}-beta.zip
AGAMA_MACOS: Agama-MacOS-v${AGAMA_VERSION}-beta
GIT_SUBMODULE_STRATEGY: recursive
POST_COMMENT: "$\n Agama Branch and Commit: ${CI_COMMIT_REF_NAME} $\n${CI_COMMIT_SHA} $\nMD5: "
POST_COMMENT: "Source: ${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}\n
Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
Commit: ${CI_COMMIT_SHA}$\n
Author: ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>\n
${CI_COMMIT_MESSAGE}"


build:linux:
image: asherd/agama-builder
stage: build
Expand Down Expand Up @@ -45,6 +51,11 @@ build:linux:
- npm run package-linux
- cd build
- tar -czf $AGAMA_LINUX $ELECTRON_BUILD_LINUX
- curl -F file=@"$AGAMA_LINUX"
-F channels="$AGAMA_POST_CHANNEL"
-F initial_comment="${POST_COMMENT}"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- mv $AGAMA_LINUX ..
artifacts:
paths: [$AGAMA_LINUX]
Expand Down Expand Up @@ -80,6 +91,11 @@ build:windows:
- npm run package-win
- cd build
- zip -r $AGAMA_WINDOWS $ELECTRON_BUILD_WINDOWS
- curl -F file=@"$AGAMA_WINDOWS"
-F channels="$AGAMA_POST_CHANNEL"
-F initial_comment="${POST_COMMENT}"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- mv $AGAMA_WINDOWS ..
artifacts:
paths: [$AGAMA_WINDOWS]
Expand Down Expand Up @@ -108,6 +124,11 @@ build:mac:
- npm install electron-packager -g
- npm run package-mac
- npm run create-installer-mac
- curl -F file=@"$AGAMA_MACOS.dmg"
-F channels="$AGAMA_POST_CHANNEL"
-F initial_comment="${POST_COMMENT}"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
artifacts:
paths: [$AGAMA_MACOS.dmg]
expire_in: 1 week
Expand All @@ -120,26 +141,7 @@ deploy:
- build:linux
- build:windows
- build:mac
before_script:
- export AGAMA_LINUX_MD5=$(md5sum $AGAMA_LINUX | cut -d " " -f 1)
- export AGAMA_WINDOWS_MD5=$(md5sum $AGAMA_WINDOWS | cut -d " " -f 1)
- export AGAMA_MACOS_MD5=$(md5sum $AGAMA_MACOS.dmg | cut -d " " -f 1)
script:
- curl -F file=@"$AGAMA_LINUX"
-F channels="$AGAMA_POST_CHANNEL"
-F initial_comment="${POST_COMMENT} $AGAMA_LINUX_MD5"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- curl -F file=@"$AGAMA_WINDOWS"
-F channels="$AGAMA_POST_CHANNEL"
-F initial_comment="${POST_COMMENT} $AGAMA_WINDOWS_MD5"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- curl -F file=@"$AGAMA_MACOS.dmg"
-F channels="$AGAMA_POST_CHANNEL"
-F initial_comment="${POST_COMMENT} $AGAMA_MACOS_MD5"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- mkdir -p $CI_COMMIT_REF_NAME/Windows
- mkdir -p $CI_COMMIT_REF_NAME/Linux
- mkdir -p $CI_COMMIT_REF_NAME/MacOS
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agama-app",
"productName": "Agama",
"version": "0.3.13",
"version": "0.4.0",
"description": "Agama Wallet Desktop App",
"main": "main.js",
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions routes/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const appConfig = {
experimentalFeatures: false,
dataDir: '',
autoStartVRSC: false,
autoStakeVRSC: false,
cheatCatcher: '',
dex: {
walletUnlockTimeout: 3600,
},
Expand Down Expand Up @@ -91,6 +93,18 @@ const appConfig = {
displayName: 'Automatically start VerusCoin on launch in native mode',
type: 'boolean',
},
autoStakeVRSC: {
display: true,
initDisplay: true,
displayName: 'Automatically start staking VerusCoin when it is launched in native mode',
type: 'boolean',
},
cheatCatcher: {
display: true,
info: 'As part of the VerusCoin Something at Stake solution, you can enter a Verus sapling address in this field, so when you catch them, you get their staking reward. Dont forget to thank them ;)',
displayName: 'Your VRSC sapling address for receiving funds cheaters attempt to steal',
type: 'string',
},
dataDir: {
display: true,
initDisplay: true,
Expand Down
19 changes: 14 additions & 5 deletions routes/shepherd/addCoinShortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = (shepherd) => {

httpRequest();
} else if (selection === 'VRSC') {
herdData = {
herdData = {
'ac_name': 'VRSC',
'ac_options': [
'-ac_algo=verushash',
Expand All @@ -117,13 +117,22 @@ module.exports = (shepherd) => {
'-ac_timeunlockfrom=129600',
'-ac_timeunlockto=1180800',
'-ac_veruspos=50',
'-gen',
'-genproclimit=0'
]
};
};

//Checking for VRSC specific config commands
if(shepherd.appConfig.autoStakeVRSC) {
herdData['ac_options'].push('-mint');
console.log('VRSC Staking set to default');
}
if(shepherd.appConfig.cheatCatcher.length === 78) {
herdData['ac_options'].push('-cheatcatcher=' + shepherd.appConfig.cheatCatcher);
console.log('Cheatcatching enabled at address ' + shepherd.appConfig.cheatCatcher);
}


httpRequest();
} else {
} else {
const herdData = [{
'ac_name': 'komodod',
'ac_options': [
Expand Down
3 changes: 2 additions & 1 deletion routes/shepherd/dashboardUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ module.exports = (shepherd) => {

if (isNewAddr &&
(allAddrArray[a].substring(0, 2) === 'zc' ||
allAddrArray[a].substring(0, 2) === 'zt')) {
allAddrArray[a].substring(0, 2) === 'zt' ||
allAddrArray[a].substring(0, 2) === 'zs')) {
result[1][result[1].length] = allAddrArray[a];
} else {
result[0][result[0].length] = allAddrArray[a];
Expand Down
36 changes: 21 additions & 15 deletions routes/shepherd/downloadZcparams.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ const Promise = require('bluebird');

module.exports = (shepherd) => {
shepherd.zcashParamsDownloadLinks = {
'agama.komodoplatform.com': {
proving: 'https://agama.komodoplatform.com/file/supernet/sprout-proving.key',
verifying: 'https://agama.komodoplatform.com/file/supernet/sprout-verifying.key',
},
'agama-yq0ysrdtr.stackpathdns.com': {
proving: 'http://agama-yq0ysrdtr.stackpathdns.com/file/supernet/sprout-proving.key',
verifying: 'http://agama-yq0ysrdtr.stackpathdns.com/file/supernet/sprout-verifying.key',
},
'zcash.dl.mercerweiss.com': {
proving: 'https://zcash.dl.mercerweiss.com/sprout-proving.key',
verifying: 'https://zcash.dl.mercerweiss.com/sprout-verifying.key',
'z.cash': {
proving: 'https://z.cash/downloads/sprout-proving.key',
verifying: 'https://z.cash/downloads/sprout-verifying.key',
spend: 'https://z.cash/downloads/sapling-spend.params',
output: 'https://z.cash/downloads/sapling-output.params',
groth16: 'https://z.cash/downloads/sprout-groth16.params'
},
};

Expand All @@ -25,12 +20,18 @@ module.exports = (shepherd) => {
provingKeySize: false,
verifyingKey: _fs.existsSync(`${shepherd.zcashParamsDir}/sprout-verifying.key`),
verifyingKeySize: false,
spend: _fs.existsSync(`${shepherd.zcashParamsDir}/sapling-spend.params`),
output: _fs.existsSync(`${shepherd.zcashParamsDir}/sapling-output.params`),
groth16: _fs.existsSync(`${shepherd.zcashParamsDir}/sprout-groth16.params`),
errors: false,
};

if (_checkList.rootDir &&
_checkList.provingKey ||
_checkList.verifyingKey) {
_checkList.provingKey &&
_checkList.verifyingKey &&
_checkList.spend &&
_checkList.output &&
_checkList.groth16) {
// verify each key size
const _provingKeySize = _checkList.provingKey ? fs.lstatSync(`${shepherd.zcashParamsDir}/sprout-proving.key`) : 0;
const _verifyingKeySize = _checkList.verifyingKey ? fs.lstatSync(`${shepherd.zcashParamsDir}/sprout-verifying.key`) : 0;
Expand All @@ -51,7 +52,10 @@ module.exports = (shepherd) => {
!_checkList.provingKey ||
!_checkList.verifyingKey ||
!_checkList.provingKeySize ||
!_checkList.verifyingKeySize) {
!_checkList.verifyingKeySize ||
!_checkList.spend ||
!_checkList.output ||
!_checkList.groth16) {
_checkList.errors = true;
}

Expand Down Expand Up @@ -86,7 +90,9 @@ module.exports = (shepherd) => {
for (let key in shepherd.zcashParamsDownloadLinks[dlOption]) {
shepherd.downloadFile({
remoteFile: shepherd.zcashParamsDownloadLinks[dlOption][key],
localFile: `${dlLocation}/sprout-${key}.key`,
localFile: key === 'spend' || key === 'output' ?
`${dlLocation}/sapling-${key}.params` :
(key === 'groth16' ? `${dlLocation}/sprout-${key}.params` : `${dlLocation}/sprout-${key}.key`),
onProgress: (received, total) => {
const percentage = (received * 100) / total;

Expand Down
3 changes: 3 additions & 0 deletions routes/shepherd/electrum/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ module.exports = (shepherd) => {
if (network === 'VRSC'){
return true;
}
if (network === 'VERUSTEST'){
return true;
}
else {
try {
const _b58check = shepherd.isZcash(network.toLowerCase()) ? bitcoinZcash.address.fromBase58Check(address) : bitcoin.address.fromBase58Check(address);
Expand Down
4 changes: 2 additions & 2 deletions version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=0.3.13c
version=0.4.0
type=beta
minversion=0.3.13c
minversion=0.4.0


2 changes: 1 addition & 1 deletion version_build
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
0.3.13c-beta
0.4.0-beta


0 comments on commit e9f86ed

Please sign in to comment.