-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'ArkEcosystem/core/2.3' into blockid
* ArkEcosystem/core/2.3: chore: move core-graphql to the deprecated folder (#2169) refactor(crypto): benchmarks (#2167) refactor: replace micromatch with nanomatch and remove heavy deps (#2165) feat(crypto): increase vendor field length to 255 bytes (#2159) feat(core-api): search delegates by usernames (#2143) feat(core-logger-pino): initial implementation (#2134) perf(crypto): integrate bcrypto (#2158) feat(core): ask for process restarts after updating (#2155) refactor(core): replace pm2 with process manager (#2154) refactor(core): require the user to take action for updates (#2153) feat(core-p2p): Fetch list of peers from at least a few others (#2152) refactor(core): more robust check for ensureDefaults (#2151) fix(core): ensure file and defaults before reading fix(core): return correct suffix for core:restart command (#2150) fix(core-database): properly sort BigNumber values (#2144) feat(core): configuration and channel support for the CLI (#2145) feat(core): merge core-snapshot-cli commands into core (#2149) fix(core-api): pass query to findAllByVote method (#2142) feat(core-p2p): Validate GET replies from other peers (#2102) chore(release): 2.2.0-beta.7 (#2141) fix(core-blockchain): stuck at not ready to accept new block (#2139) refactor(core-p2p): Improve selection of peer for downloading blocks (#2137) fix(core): overwrite the config path if an env variable is provided (#2140) fix(core): do not ignore the network flag in parseWithNetwork (#2138) chore(release): 2.2.0-beta.6 (#2136) refactor(core-container): throw an error if the peers or plugins file are missing (#2135) chore(release): 2.2.0-beta.5 (#2132) refactor(core-p2p): reduce logging noise (#2129) misc(core-p2p): remove superfluous log message (#2128) refactor(core-p2p): Improve fork handling in updatePeersOnMissingBlocks (#2125)
- Loading branch information
Showing
274 changed files
with
3,114 additions
and
3,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const { | ||
models | ||
} = require('@arkecosystem/crypto') | ||
|
||
const dataEmpty = require('../helpers').getJSONFixture('block/deserialized/no-transactions'); | ||
const dataFull = require('../helpers').getJSONFixture('block/deserialized/transactions'); | ||
const serializedEmpty = require('../helpers').getFixture('block/serialized/no-transactions.txt'); | ||
const serializedFull = require('../helpers').getFixture('block/serialized/transactions.txt'); | ||
|
||
exports['fromData (0)'] = () => { | ||
return new models.Block(dataEmpty); | ||
}; | ||
|
||
exports['fromData (150)'] = () => { | ||
return new models.Block(dataFull); | ||
}; | ||
|
||
exports['fromHex (0)'] = () => { | ||
return new models.Block(serializedEmpty); | ||
}; | ||
|
||
exports['fromHex (150)'] = () => { | ||
return new models.Block(serializedFull); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const { | ||
HashAlgorithms, | ||
Transaction | ||
} = require('@arkecosystem/crypto') | ||
const createHash = require("create-hash"); | ||
const nodeSha256 = (bytes) => createHash("sha256").update(bytes).digest() | ||
|
||
const data = require('../helpers').getJSONFixture('transaction/deserialized/0'); | ||
const transactionBytes = Transaction.toBytes(data); | ||
|
||
exports['bcrypto.sha256'] = () => { | ||
HashAlgorithms.sha256(transactionBytes); | ||
}; | ||
|
||
exports['node.sha256'] = () => { | ||
nodeSha256(transactionBytes); | ||
}; | ||
|
||
exports['bcrypto.sha1'] = () => { | ||
HashAlgorithms.sha1(transactionBytes); | ||
}; | ||
|
||
exports['node.sha1'] = () => { | ||
createHash("sha1").update(transactionBytes).digest(); | ||
}; | ||
|
||
exports['bcrypto.ripemd160'] = () => { | ||
HashAlgorithms.ripemd160(transactionBytes); | ||
}; | ||
|
||
exports['node.ripemd160'] = () => { | ||
createHash("ripemd160").update(transactionBytes).digest(); | ||
}; | ||
|
||
exports['bcrypto.hash160'] = () => { | ||
HashAlgorithms.hash160(transactionBytes); | ||
}; | ||
|
||
exports['node.hash160'] = () => { | ||
createHash("ripemd160").update(nodeSha256(transactionBytes)).digest(); | ||
}; | ||
|
||
exports['bcrypto.hash256'] = () => { | ||
HashAlgorithms.hash256(transactionBytes); | ||
}; | ||
|
||
exports['node.hash256'] = () => { | ||
nodeSha256(nodeSha256(transactionBytes)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { | ||
Transaction | ||
} = require('@arkecosystem/crypto') | ||
|
||
const data = require('../../helpers').getJSONFixture('transaction/deserialized/0'); | ||
const serializedHex = require('../../helpers').getFixture('transaction/serialized/0.txt'); | ||
const serializedBytes = Buffer.from(serializedHex, "hex"); | ||
|
||
exports['fromData'] = () => { | ||
return Transaction.fromData(data); | ||
}; | ||
|
||
exports['fromHex'] = () => { | ||
return Transaction.fromHex(serializedHex); | ||
}; | ||
|
||
exports['fromBytes'] = () => { | ||
return Transaction.fromBytes(serializedBytes); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
const { | ||
Transaction | ||
TransactionDeserializer | ||
} = require('@arkecosystem/crypto') | ||
|
||
exports.deserialize = data => { | ||
return Transaction.fromHex(data) | ||
return TransactionDeserializer.deserialize(data) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
const { | ||
Transaction | ||
TransactionSerializer | ||
} = require('@arkecosystem/crypto') | ||
|
||
const data = require('../../helpers').getJSONFixture('transaction/deserialized/0'); | ||
|
||
exports['core'] = () => { | ||
return Transaction.fromData(data); | ||
return TransactionSerializer.getBytes(data); | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@arkecosystem/core-graphql", | ||
"description": "GraphQL Integration for Ark Core", | ||
"version": "2.2.0-beta.4", | ||
"version": "2.2.0-beta.7", | ||
"contributors": [ | ||
"Lúcio Rubens <[email protected]>" | ||
], | ||
|
@@ -31,10 +31,10 @@ | |
"updates": "../../node_modules/npm-check-updates/bin/npm-check-updates -a" | ||
}, | ||
"dependencies": { | ||
"@arkecosystem/core-container": "^2.2.0-beta.4", | ||
"@arkecosystem/core-http-utils": "^2.2.0-beta.4", | ||
"@arkecosystem/core-interfaces": "^2.2.0-beta.4", | ||
"@arkecosystem/crypto": "^2.2.0-beta.4", | ||
"@arkecosystem/core-container": "^2.2.0-beta.7", | ||
"@arkecosystem/core-http-utils": "^2.2.0-beta.7", | ||
"@arkecosystem/core-interfaces": "^2.2.0-beta.7", | ||
"@arkecosystem/crypto": "^2.2.0-beta.7", | ||
"apollo-server-hapi": "^2.4.0", | ||
"dayjs-ext": "^2.2.0", | ||
"graphql-tools-types": "^1.2.1" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.