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

Release Preparation, Audit Changes #141

Merged
merged 107 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
6b3fd9b
Canonicalize job name
martindale Jun 23, 2022
ae2c1f8
Remove aliases directory
martindale Mar 1, 2023
387516f
Cleanup Capability, Peer
martindale Mar 12, 2023
c44277b
Enable persistence, peer scoring
martindale Mar 16, 2023
6480f29
Add missing _registerPeer method
martindale Mar 16, 2023
ee692a3
Remove old methods from Peer, add debug to settings
martindale Mar 17, 2023
4d8014e
Specify Contract store, semantics
martindale Mar 21, 2023
d4a7c57
Begin handling browser case in Actor
martindale Mar 23, 2023
9cd1046
Update .nvmrc
martindale Mar 23, 2023
cf977ae
Update API, package-lock.json, some Contract fixes
martindale Mar 23, 2023
0fbbf60
Finalize Contract deploy signing
martindale Mar 23, 2023
d919ca3
Enable Contract state monitoring
martindale Mar 23, 2023
675d4d9
Cleanup contract AST importer
martindale Mar 23, 2023
74adab4
Cleanup log events
martindale Mar 23, 2023
b89b661
Add INSTALL.md, update install report
martindale Mar 24, 2023
c263309
Update OWNERS
martindale Mar 24, 2023
8b82700
Add Codecov to GitHub Actions
martindale Mar 28, 2023
7b8e5ba
Generate static coverage report in GitHub Test workflow
martindale Mar 28, 2023
e038487
Disable a number of obsolete tests, fix Peer close() issue
martindale Mar 28, 2023
b185beb
Disable Bitcoin fullnode, rely on Bitcoin Core
martindale Mar 28, 2023
7773bb4
Clean up Federation tests
martindale Mar 28, 2023
2ce7997
Remove components, resources
martindale Mar 28, 2023
95b5ddc
Consolidate `tools` to `scripts`
martindale Mar 28, 2023
17e7326
Refine test workflow, begin rework of Bitcoin tests
martindale Mar 30, 2023
93382c7
Update various tests, run recursively
martindale Mar 30, 2023
fcbaf7b
Enhance Key tests
martindale Mar 30, 2023
d0fe715
Add Bitcoin Transaction test origin
martindale Mar 30, 2023
8cf7014
Add Capability test skeleton
martindale Mar 30, 2023
8e4dcc3
Add basic capability tokens
martindale Mar 30, 2023
f51c896
Add Bitcoin Block test
martindale Mar 30, 2023
2366761
Cleanup test workflow, update Bitcoin class inheritances
martindale Mar 30, 2023
a83b8e6
Fix dependency paths
martindale Mar 30, 2023
b0e8b01
Call super() in Block constructor
martindale Mar 30, 2023
058f2d6
Test Contract#deploy()
martindale Mar 30, 2023
678f9c6
Test address generation
martindale Mar 30, 2023
42be2ca
Extend Service tests
martindale Mar 30, 2023
d3bbb35
Update App tests
martindale Mar 30, 2023
7513826
Introduce verify() to Environment
martindale Mar 30, 2023
73e3043
Test Service persistent mode
martindale Mar 30, 2023
fb0a6f9
Re-enable channel registration test
martindale Mar 30, 2023
a9cad8b
Restore Remote test (rewrite)
martindale Mar 30, 2023
b29c8fd
Add Filesystem#delete() test
martindale Mar 30, 2023
71bc714
Re-enable Peer test
martindale Mar 30, 2023
a42feb0
Add various method tests to Remote
martindale Mar 30, 2023
3b5ca97
Test Contract start and stop
martindale Mar 30, 2023
88361e3
Add Federation start and stop tests
martindale Mar 30, 2023
d516af0
Extend Actor, Bitcoin Transaction tests
martindale Mar 30, 2023
ef3cbcb
Add various methods to Remote tests
martindale Mar 30, 2023
532cbbf
Merge branch 'master' into feature/cleanup
martindale Mar 30, 2023
7e563b4
Update various documentation
martindale Mar 30, 2023
0949c62
Remove Travis badge
martindale Mar 30, 2023
f321f6d
Remove samples
martindale Mar 30, 2023
e912b75
Move validators to functions
martindale Mar 30, 2023
c7d1086
Move test document to fixtures
martindale Mar 30, 2023
e01e00e
Merge branch 'master' of github.com:FabricLabs/fabric into eric/develop
martindale Mar 30, 2023
3dc206c
Import updates from storytelling pass
martindale Mar 30, 2023
c1c63c0
Merge branch 'master' into feature/v0.1.0-RC1
martindale Mar 30, 2023
034422e
Remove old NOISE definition
martindale Mar 30, 2023
da93465
Merge branch 'develop' of github.com:FabricLabs/fabric into feature/v…
martindale Mar 30, 2023
0546958
Merge branch 'master' into feature/v0.1.0-RC1
martindale Mar 30, 2023
6e407fa
Merge branch 'feature/cleanup' of github.com:FabricLabs/fabric into f…
martindale Mar 30, 2023
1774e95
Remove Layer definition
martindale Mar 30, 2023
8d32de9
Disable Layer in Channel
martindale Mar 30, 2023
81c69c8
Add fund and add methods to Channel tests
martindale Mar 30, 2023
326f5fd
Security update
martindale Apr 1, 2023
a0ca209
Re-work Remote props
martindale Apr 1, 2023
9ec0478
Update Remote tests
martindale Apr 1, 2023
b46dd73
Report production install
martindale Apr 1, 2023
fb890cd
Begin work on validation
martindale Apr 2, 2023
ec96388
Disable default message signer
martindale Apr 8, 2023
5c962d5
Update Message tests
martindale Apr 8, 2023
f8a7329
Update test workflow
martindale Apr 8, 2023
09bbf87
Add validate() test
martindale Apr 8, 2023
dada192
Remove crypto from constants
martindale Apr 8, 2023
f1893d7
Add bn.js
martindale Apr 8, 2023
3e8dc02
Add `spendable` property to Actor
martindale Apr 9, 2023
5a16beb
Add Fabric Labs logo
martindale Apr 9, 2023
25fc0de
Replace UPNP implementation, improve Key portability
martindale Apr 12, 2023
cc3d90a
Prune deprecations
martindale Apr 12, 2023
1c9a537
Add 'buffer' to dependencies
martindale Apr 12, 2023
ab169e4
Add sync() to Service, CLI updates
martindale Apr 12, 2023
011a007
Cover _defineResource in Service tests
martindale Apr 13, 2023
44dca44
Add ACCESSIBILITY.md, update test workflow
martindale Apr 14, 2023
c3776e6
Increase Key test limit to 15 seconds
martindale Apr 16, 2023
bb9365f
Add index.html asset
martindale Apr 16, 2023
e74e45c
Add build, browser scripts
martindale Apr 16, 2023
02ff4bb
Remove .travis.yml
martindale Apr 16, 2023
e47f972
Merge branch 'master' into feature/v0.1.0-RC1
martindale Apr 16, 2023
0a3aaba
Merge branch 'feature/v0.1.0-RC1' of github.com:FabricLabs/fabric int…
martindale Apr 18, 2023
3f753fb
Refactor Hash256 for browser
martindale Apr 18, 2023
0ce1c59
Re-work Hash256 API
martindale Apr 18, 2023
b418038
Add Hash256.compute() test
martindale Apr 18, 2023
f68bd32
Remove wallet from Peer, update docs, various changes
martindale May 14, 2023
6bf4fd6
General update; package re-check, scripts for federations
martindale Jun 14, 2023
72c434f
Merge pull request #132 from FabricLabs/feature/clean-install
martindale Jun 14, 2023
9c67c3b
Improve Hash256 portability
martindale Jul 15, 2023
49217c7
Unlock Service settings, migrate to Noble
martindale Sep 12, 2023
1d0c7cc
Update package-lock.json
martindale Dec 20, 2023
f67bf14
Amend Service definition
martindale Dec 27, 2023
9463dbd
Update package-lock.json
martindale Dec 27, 2023
7c8f857
Add explicit Python installation
martindale Dec 27, 2023
fbf49a2
Add Token tests
martindale Dec 27, 2023
e9436d6
Update to Node 18 in package.json, update install report
martindale Dec 27, 2023
47aa98b
Fix 2 critical security issues
martindale Dec 27, 2023
9c8ce67
Update .nvmrc
martindale Dec 27, 2023
1a10466
Update package-lock.json
martindale Jan 1, 2024
eb4c07c
Merge pull request #142 from FabricLabs/feature/node-18
martindale Jan 1, 2024
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
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: npm test
on:
pull_request:
branches:
Expand All @@ -24,6 +24,10 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: npm ci
- name: Generate coverage report
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.17.1
v18.19.0
2 changes: 2 additions & 0 deletions PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ The base list of Fabric Message Types is as follows:
#### The `GENERIC` Message Type
UTF8-encoded JSON payload.

If the `version` field is `1` the payload MUST be valid JSON.

#### The `ANNOUNCE` Message Type
Used for Peer announcements.

Expand Down
113 changes: 68 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,40 @@
[![GitHub contributors][badge-contributors]][contributors]
[![Community][badge-chat]][chat]

[The `@fabric/core` project][fabric-github] provides an API for building peer-to-peer applications on [Bitcoin][bitcoin].

Fabric is an experimental approach to the secure establishment and execution of
peer-to-peer agreements, up to and including financial transactions. With a
robust library of common components, `npm i @fabric/core` provides all the tools
one might `require` during the development of a well-researched application of
decentralization technology.
peer-to-peer agreements ("contracts") using Bitcoin as a bonding mechanism. The
`@fabric/core` project provides a robust set of implementations as JavaScript
classes, enabling the rapid prototyping and testing of Bitcoin-based
applications for downstream developers.

## Quick Start
`npm i -g FabricLabs/fabric#master`

Install Fabric CLI to your system using the above command, then run:
```
fabric setup
```

| 🚨 Heads up! |
| 🚨 Stop here! |
|--------------|
| Use of Fabric in production is **not recommended** in its current state. Please wait for [an official release][releases] before deploying to production environments, or proceed at your own risk. |
| The output of the above command will include your SEED, which should never be shared. |

## Getting Started
If you're already familiar with `node` and have a project already started, try
`npm install --save @fabric/core` to install [Fabric Core](https://fabric.pub),
the primary library used for most Fabric-based applications.
Once complete, you'll have a fully configured Fabric client available by running:
```
fabric
```

For help, try entering "insert mode" by pressing the "i" key then typing `/help` and pressing enter — you'll get a short help prompt followed by a list of available commands. Feel free to explore!

If you run into any trouble, read on for clues, then [join the chat][chat-help] with any remaining questions.

You'll also want `bitcoind` installed, and fully synchronized with your
preferred network. You can use `scripts/playnet.sh` to run a local playnet
node, for which you can use the faucet: https://faucet.playnet.fabric.pub

## Contributing
Fork and clone [the Fabric GitHub repository][fabric-github] and launch a local
web server with `npm run examples` to view the examples, or `npm run docs` once
you're ready to integrate Fabric into your application.
Expand All @@ -46,9 +61,9 @@ npm run build
- `npm start` creates a local Fabric node.

## Native Dependencies
Installing Fabric from npm (`npm i @fabric/core`) will generally compile the
following dependencies from the local system:

Installing Fabric from npm (`npm i @fabric/core` or
`npm i FabricLabs/fabric#develop`) will generally compile the following
dependencies from the local system:
- `secp256k1`
- `level`
- `zeromq`
Expand All @@ -64,44 +79,51 @@ it as an event source.

#### Simple Example
```js
const Fabric = require('@fabric/core');
const fabric = new Fabric();

fabric.on('message', function (message) {
console.log('Received message from Fabric:', message);
const Peer = require('@fabric/core/types/peer');

async function main () {
const peer = new Peer({
alias: 'Example',
peers: ['hub.fabric.pub:7777']
});

peer.on('message', (message) => {
console.log('Received message from Fabric:', message);
});

peer.start();
return { peer };
}

main().catch((exception) => {
console.error('Example error:', exception);
}).then((output) => {
console.log('Example output:', output);
});

fabric.start();
```

`service` now contains a full instance of Fabric, including `SET` and `GET`
methods for publishing and retrieving documents. Use `npm run examples` to see
more.

### Message Types
Message types are as follows:

#### `message`
The generic message event.

**Properties:**
- `@type` name of the event type.
- `@data` the content of the event, if any.

### Using Fabric in the Browser
Fabric generates a `fabric.min.js` bundle, which can be included with any HTML
[`@fabric/http`][fabric-http] generates a `fabric.min.js` bundle, which can be included with any HTML
document to expose the API in a browser.

## Other Fabrics
Several other projects have used the name Fabric, as it's a great way to
describe a network of things, conjuring feelings of _nets_ and _webs_. Here are
some links to them, as they offer some interesting things completely unrelated
to our goals.

- Fabric python project (#fabric on Freenode)
- Fabric application framework by Twitter
- HyperLedger Fabric, by IBM

```html
<html>
<body>
<div>
<h1>Example</h1>
</div>
<script src="/bundles/fabric.min.js"></script>
<script type="text/javascript">
window.fabric.addEventListener('', (event) => {
console.log('Fabric Event:', event);
});

window.fabric.start();
console.log('Fabric started!');
</script>
</body>
</html>
```

## Plugins
Fabric is an extensible framework, supporting a variety of plugins.
Expand Down Expand Up @@ -139,6 +161,7 @@ Fabric on Twitter: [@FabricProtocol][twitter]
[coverage]: https://codecov.io/gh/FabricLabs/fabric
[development]: https://grove.chat/#/room/#development:fabric.pub
[fabric-github]: https://github.com/FabricLabs/fabric
[fabric-http]: https://github.com/FabricLabs/fabric-http
[protocol]: PROTOCOL.md
[learning]: https://grove.chat/#/room/#learning:fabric.pub

Expand Down
3 changes: 3 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Welcome to Fabric!
[api-docs]: https://dev.fabric.pub/docs
[api-examples]: https://dev.fabric.pub/examples

[actors]: ACTORS.md
[contracts]: CONTRACTS.md

[readme]: README.md
[welcome]: WELCOME.md
[quickstart]: QUICKSTART.md
Expand Down
4 changes: 3 additions & 1 deletion constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const MAX_PEERS = 32;
const PRECISION = 100;

// Fabric Core
const FABRIC_USER_AGENT = 'Fabric/Bitcoin 0.1.0-dev (@fabric/core#v0.1.0-RC1)';
const FABRIC_USER_AGENT = 'Fabric Core 0.1.0 (@fabric/core#v0.1.0-RC1)';
const BITCOIN_NETWORK = 'mainnet';
const BITCOIN_GENESIS = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f';
const BITCOIN_GENESIS_ROOT = '4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b';
const FABRIC_KEY_DERIVATION_PATH = "m/44'/7777'/0'/0/0";
Expand Down Expand Up @@ -119,6 +120,7 @@ module.exports = {
PEER_PORT,
MAX_PEERS,
PRECISION,
BITCOIN_NETWORK,
BITCOIN_GENESIS,
BITCOIN_GENESIS_ROOT,
FABRIC_KEY_DERIVATION_PATH,
Expand Down
Loading
Loading