Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Oracle #108

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f340341
Add rudimentary web3 connection
Nov 23, 2016
91def9a
Fix web3 construction
Nov 30, 2016
381683f
Params for RPC endpoint
Nov 30, 2016
2d303c7
Refactor
Nov 30, 2016
5fa7f4f
Add scaffolding for handlers
Dec 1, 2016
5422d6d
Squashed 'src/contracts/simplewrite/' content from commit c5ed39b
Dec 21, 2016
0d493f3
Merge commit '5422d6da1867bdf0981cf63e67701ae56c0b9ea3' as 'src/contr…
Dec 21, 2016
0045904
Hook in simplewrite
Dec 21, 2016
b42562d
Move contracts out of src, fix invocation
Dec 21, 2016
fc8bacb
Initialize contract correctly
Dec 21, 2016
189d4ef
Merge branch 'master' into ak-oracle
Jan 4, 2017
896e04d
Drop specific contracts from aleph tree
Jan 5, 2017
c89bfca
Break up calculation and setting of signatures
Jan 5, 2017
f228b5a
Load contract from args
Jan 5, 2017
471501f
Merge branch 'master' into ak-oracle
Jan 5, 2017
c549bd9
Inject signer, export signature calculator
Jan 5, 2017
281dbb6
Merge branch 'master' into ak-oracle
Jan 11, 2017
4bcf8ce
add save/load functions for publisher ids
yusefnapora Jan 13, 2017
ac2327a
add pre-generated publisher ids, script for generating more
yusefnapora Jan 13, 2017
b91124b
add wrapper classes for signing keys for promises, save/load, etc
yusefnapora Jan 13, 2017
adac964
make PublisherId a class with load/save, sign/verify methods
yusefnapora Jan 13, 2017
b96b7ba
test loading publisher id from concat, validating messages with it
yusefnapora Jan 13, 2017
839a4ee
Merge branch 'master' into ak-oracle
Jan 18, 2017
698f267
Consistency w/other branch
Jan 18, 2017
46adf44
Directly test signing (will fail)
Jan 18, 2017
daf392c
Merge remote-tracking branch 'origin/yn-pregenerated-publisher-ids' i…
Jan 18, 2017
1997149
Fix deterministic signing test
Jan 18, 2017
6cceef9
Merge branch 'yn-key-class-refactor' into ak-oracle
Jan 18, 2017
09319f8
Merge yn-friendly-repl into ak-oracle
yusefnapora Feb 7, 2017
ebb4342
Merge master into ak-oracle
yusefnapora Feb 7, 2017
3c0a4ac
use _.omit to remove existing sig
yusefnapora Feb 7, 2017
c3ea4d5
try loading private key from string instead of file
yusefnapora Feb 7, 2017
b0fe68b
use integer instead of Date object in test statement
yusefnapora Feb 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 107 additions & 52 deletions npm-shrinkwrap.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"temp": "^0.8.3",
"thenify-all": "^1.6.0",
"tunnel-ssh": "^4.1.1",
"web3": "^0.17.0-beta",
"yargs": "^6.3.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/model/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { PublisherId, PublicSigningKey } = require('../peer/identity')
const pb = require('../protobuf')
const serialize = require('../metadata/serialize')
const { b58MultihashForBuffer, stringifyNestedBuffers, setUnion } = require('../common/util')
const { omit } = require('lodash')

import type { StatementMsg, StatementBodyMsg, SimpleStatementMsg, CompoundStatementMsg, EnvelopeStatementMsg } from '../protobuf/types'

Expand Down Expand Up @@ -138,8 +139,7 @@ class Statement {
}

calculateSignature (signer: {sign: (msg: Buffer) => Promise<Buffer>}): Promise<Buffer> {
const msg: Object = this.toProtobuf()
msg.signature = undefined
const msg: Object = omit(this.toProtobuf(), 'signature')
const bytes = pb.stmt.Statement.encode(msg)
return signer.sign(bytes)
}
Expand Down
Loading