Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

feat: B2 pikachu: integration of KVS and Bitcoin testnet and some refactoring #154

Open
wants to merge 1,043 commits into
base: B2-bitcoin-checkpointing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
1043 commits
Select commit Hold shift + click to select a range
f2777ec
added bool to keep track when config has been updated on bitcoin
Feb 1, 2022
d6faae0
edits
Feb 1, 2022
7887a6b
updated participants list when taprootconfig was nil
Feb 1, 2022
ff1445f
reduced the number of parties participating in the signing (only need…
Feb 2, 2022
883144e
debug
Feb 2, 2022
694d0c3
added taproot address in mocked actor
Feb 2, 2022
1756e8f
updated taproot address
Feb 2, 2022
fd873a6
tried to add transaction to update the public key
Feb 2, 2022
3055666
fix minor bug in list-checkpoints
adlrocha Feb 3, 2022
3bc82d0
fix bug updating circ.supply for subnet
adlrocha Feb 3, 2022
a0299e9
updated the cbor file
Feb 3, 2022
51cae4c
removed address-wise fund tracking in subnets
adlrocha Feb 3, 2022
0420d35
convert taproot address to slice of bytes to match mocked actor state
Feb 3, 2022
c8e88fc
trying tx with method 3 to see problem
Feb 3, 2022
f915579
changed parameters definition when pushing tx
Feb 3, 2022
fbefb30
trying something out or transaction sent
Feb 3, 2022
70b1168
minor fix
adlrocha Feb 3, 2022
0c9f9c9
Merge pull request #119 from filecoin-project/feat/cross-msg
adlrocha Feb 3, 2022
5fe2baa
build(deps): bump acorn from 5.7.3 to 5.7.4 in /lotuspond/front
dependabot[bot] Feb 3, 2022
b8c7c8c
more script and condition on dkg, only participants do it
Feb 3, 2022
5726cd4
debug print
Feb 3, 2022
0c0c63c
merge
Feb 3, 2022
7d2e571
put log info back
Feb 3, 2022
d94b562
removed logs
Feb 3, 2022
1f3fd47
debug message
Feb 3, 2022
3fad1f8
debug
Feb 3, 2022
e78c4ab
update go-libp2p to v0.18.0-rc3
vyzo Feb 3, 2022
0cb44b2
debug message
Feb 3, 2022
f9aa04e
change restriction on dkg
Feb 3, 2022
18ffddb
only alice sent the transaction
Feb 3, 2022
f31d8ef
added back condition on dkg, fingers crossed
Feb 3, 2022
d9c7634
Merge pull request #8022 from filecoin-project/deps/update-libp2p
magik6k Feb 3, 2022
cd8ddd2
change session id
Feb 3, 2022
ce7f74f
remove condition on dkg and fixed data perm"
Feb 3, 2022
5e3681a
automate first bitcoin transaction
Feb 3, 2022
297257c
changed the comparison function to not care about order (when compari…
Feb 3, 2022
3606c5c
retrying the condition on dkg
Feb 3, 2022
a728f59
dkg cond:
Feb 3, 2022
0306742
Merge remote-tracking branch 'lotus/master' into rebase-lotus
adlrocha Feb 4, 2022
9c41a6e
Merge pull request #122 from filecoin-project/rebase-lotus
adlrocha Feb 4, 2022
1f905ca
added new list of participants in the checkpoint config to help with …
Feb 4, 2022
085e3d8
checking if intitial tx well spent
Feb 4, 2022
ee7c6a8
fixed minor error
Feb 4, 2022
3248811
debugging
Feb 4, 2022
07f1d4c
debug
Feb 4, 2022
dd662ee
debug
Feb 4, 2022
2256759
debug
Feb 4, 2022
ca99ef5
debug
Feb 4, 2022
1e07098
debug
Feb 4, 2022
9779d52
debug
Feb 4, 2022
d770309
debug
Feb 4, 2022
f17d59b
debug
Feb 4, 2022
26b5ac0
debug
Feb 4, 2022
90cbd50
debug
Feb 4, 2022
76074e3
added FAQ
Feb 10, 2022
b4e86ba
Merge pull request #97 from filecoin-project/dependabot/npm_and_yarn/…
adlrocha Feb 10, 2022
b6ffb8c
Merge pull request #121 from filecoin-project/dependabot/npm_and_yarn…
adlrocha Feb 10, 2022
b34a587
moved the sync function
Feb 10, 2022
a70c179
fixed bug in resolver when rejoining subnet
adlrocha Feb 11, 2022
78398ba
opposite message to revert failing cross-net msg
adlrocha Feb 13, 2022
92accce
build(deps): bump ajv from 6.10.2 to 6.12.6 in /lotuspond/front
dependabot[bot] Feb 14, 2022
0450a92
Update FAQ.md
dnkolegov Feb 14, 2022
8cfd2d0
Added note and minor changes.
adlrocha Feb 14, 2022
bdc2432
Update FAQ.md
adlrocha Feb 14, 2022
83d7c58
Update FAQ.md
adlrocha Feb 14, 2022
88fdc26
Merge pull request #123 from sa8/eudico
adlrocha Feb 14, 2022
eb5fa5f
Merge pull request #126 from filecoin-project/dependabot/npm_and_yarn…
adlrocha Feb 14, 2022
22f6c28
build(deps): bump follow-redirects in /lotuspond/front
dependabot[bot] Feb 14, 2022
3633703
Merge pull request #124 from filecoin-project/fix/resolver-close
adlrocha Feb 14, 2022
7fcfa66
Merge pull request #127 from filecoin-project/dependabot/npm_and_yarn…
adlrocha Feb 14, 2022
2af2931
opposite message to revert failing cross-net msg
adlrocha Feb 13, 2022
745e33b
implemented noop transaction and added unit tests
adlrocha Feb 15, 2022
4ecf056
Merge branch 'feat/revert-cross-msg' of github.com:filecoin-project/e…
adlrocha Feb 15, 2022
95e2a5d
support for arbitrary params in cross-net messages
adlrocha Feb 15, 2022
7597141
Update FAQ.md
adlrocha Feb 15, 2022
eb938f8
Merge pull request #125 from filecoin-project/feat/revert-cross-msg
adlrocha Feb 15, 2022
087a34f
support for arbitrary params in cross-net messages
adlrocha Feb 15, 2022
f644e03
Merge branch 'feat/arbitrary-cross-net-params' of github.com:filecoin…
adlrocha Feb 15, 2022
d8b34fe
Merge pull request #128 from filecoin-project/feat/arbitrary-cross-ne…
adlrocha Feb 15, 2022
f751ccf
Fix README and FAQ
matejpavlovic Feb 18, 2022
4faaad8
Merge pull request #129 from matejpavlovic/fix/readme-faq
adlrocha Feb 18, 2022
a841442
Revert "moved the sync function"
Feb 21, 2022
2cd2555
started refactoring code
Feb 21, 2022
e4308e8
uncommented code and fixed issue with curly bracket
Feb 21, 2022
03b67c4
atomic primitive. atomic-replace actor
adlrocha Feb 22, 2022
dce8e26
added diff in return of match
Feb 22, 2022
0be3909
public key included in diff
Feb 22, 2022
a10993c
changed back public key
Feb 22, 2022
b7d0722
trying something else for miner removal
Feb 22, 2022
c8c617b
debug
Feb 22, 2022
dd93338
debug
Feb 22, 2022
ab41ce3
debug
Feb 22, 2022
6c2ed92
debug
Feb 22, 2022
c88ace2
debug
Feb 22, 2022
840b465
debug
Feb 22, 2022
c881cdf
debug
Feb 22, 2022
62310b8
debug
Feb 22, 2022
390e3c5
debug
Feb 22, 2022
de16ead
added state cbor marshalling
Feb 23, 2022
88f20d1
debug
Feb 23, 2022
c0aa197
debug
Feb 23, 2022
665ac0b
debug
Feb 23, 2022
133cd49
debug
Feb 23, 2022
4a12534
debug
Feb 23, 2022
f9d9479
debug
Feb 23, 2022
997ba26
debug
Feb 23, 2022
5dce379
changed type of miners list from string to byte array
Feb 23, 2022
67edd5a
added back the remove method
Feb 23, 2022
592229e
debug
Feb 23, 2022
001b0f5
wrapping locking primitives
adlrocha Feb 23, 2022
4b084a4
change from array of bytes to address
Feb 23, 2022
c0f1d10
debug
Feb 23, 2022
0d015f9
debug
Feb 23, 2022
a68b93f
debug
Feb 23, 2022
48f7bbe
sample actor with atomic support
adlrocha Feb 23, 2022
c9ad462
debug
Feb 23, 2022
b112f65
debug
Feb 23, 2022
80898ca
debug
Feb 23, 2022
7cb6999
debug
Feb 23, 2022
8eb1065
debug
Feb 23, 2022
3167f08
debug
Feb 23, 2022
e8bc291
debug
Feb 23, 2022
f6a79b9
commented out the actor public key to have something kind of working …
Feb 23, 2022
969fd0e
uncommented miner count (even though not needed) and removed some prints
Feb 23, 2022
e90a426
added a test file although I didn't manage to make it work
Feb 23, 2022
1ac6e2a
fixed cbor_gen
adlrocha Feb 24, 2022
dbd64c4
power actor add miners change struct
Feb 24, 2022
0c68322
changed version in actor
Feb 24, 2022
3fdc844
removed public key from actor
Feb 24, 2022
17d383c
forgot to remove key reference in main file
Feb 24, 2022
e116819
debug
Feb 24, 2022
39ca756
debug
Feb 24, 2022
0854c9c
went back to older, working version
Feb 24, 2022
24cd25b
last try at adding address in actor
Feb 25, 2022
30ea8a5
undid last commit, giving up on the power actor for now
Feb 25, 2022
3742dac
updated to even older commit
Feb 25, 2022
9b82111
trying with the actor again for some reason
Feb 25, 2022
3ddceaa
another revert since actor still not working, gonna work on testnet now
Feb 25, 2022
f175007
updated the data for the kubernetes demo
Feb 25, 2022
7e8f41e
comment
Feb 25, 2022
e2c8111
first edits to integrate bitcoin testnet (to be tested on monday)
Feb 25, 2022
fb3f201
build(deps): bump url-parse from 1.5.3 to 1.5.10 in /lotuspond/front
dependabot[bot] Feb 27, 2022
7b7572c
wip: offchain execution. Pending state discard
adlrocha Feb 28, 2022
45ecd64
removed address from taproot file and bitcoin regtest launch from res…
Feb 28, 2022
758b861
fixed issue with json encoding and updated bitcoin testnet username a…
Feb 28, 2022
6956999
updated usenamr and password for bitcoin testnet
Feb 28, 2022
e3e5924
debug
Feb 28, 2022
a68b62e
debug
Feb 28, 2022
75c852c
debug
Feb 28, 2022
d18e1cd
debug
Feb 28, 2022
4a230bf
debug
Feb 28, 2022
49b181c
debug
Feb 28, 2022
0a2ce3a
debug
Feb 28, 2022
49d8409
wip
adlrocha Feb 28, 2022
4126ee6
debug
Feb 28, 2022
aaf3c79
debug
Feb 28, 2022
6453c9b
fixed issue with fees (due to rouding float to second decimal place
Feb 28, 2022
327915c
off-chain execuetion of locked state for atomic protocol
adlrocha Mar 1, 2022
6bb1787
Merge pull request #135 from filecoin-project/dependabot/npm_and_yarn…
adlrocha Mar 1, 2022
de5bb32
added comments
adlrocha Mar 1, 2022
dc64deb
debug
Mar 1, 2022
37dfee3
debug
Mar 1, 2022
d9e277b
automated initial value definition
Mar 1, 2022
540b04b
debug
Mar 1, 2022
de29aa9
debug
Mar 1, 2022
f303ea4
debug
Mar 1, 2022
761f235
debug
Mar 1, 2022
9b3c2ea
added subnet actor interface
adlrocha Mar 1, 2022
509e47d
Merge pull request #136 from filecoin-project/feat/subnet-interface
adlrocha Mar 1, 2022
d233d28
fixing issue with initialisation
Mar 2, 2022
1881c5f
edits, still have issue with signing checkpoints
Mar 2, 2022
ab67e28
bitcoin testnet demo working until it randomly crashes
Mar 2, 2022
6a2fac3
latest edits, works when restarting from scratch but randomly crashes…
Mar 3, 2022
75af774
addressed comments
adlrocha Mar 4, 2022
acf738f
minor fix
adlrocha Mar 4, 2022
bec8f63
Merge pull request #133 from filecoin-project/feat/atomic-exec
adlrocha Mar 4, 2022
7502ba5
build(deps): bump follow-redirects in /lotuspond/front
dependabot[bot] Jan 15, 2022
b32e612
build(deps): bump acorn from 5.7.3 to 5.7.4 in /lotuspond/front
dependabot[bot] Feb 3, 2022
a2981ed
added FAQ
Feb 10, 2022
2edac4f
Update FAQ.md
dnkolegov Feb 14, 2022
890e00b
Added note and minor changes.
adlrocha Feb 14, 2022
6ef6775
Update FAQ.md
adlrocha Feb 14, 2022
52fd9a3
Update FAQ.md
adlrocha Feb 14, 2022
897d314
build(deps): bump ajv from 6.10.2 to 6.12.6 in /lotuspond/front
dependabot[bot] Feb 14, 2022
b97e96a
fixed bug in resolver when rejoining subnet
adlrocha Feb 11, 2022
8187231
build(deps): bump follow-redirects in /lotuspond/front
dependabot[bot] Feb 14, 2022
27616b8
opposite message to revert failing cross-net msg
adlrocha Feb 13, 2022
77b64da
implemented noop transaction and added unit tests
adlrocha Feb 15, 2022
e85ae4b
Update FAQ.md
adlrocha Feb 15, 2022
cc62dda
support for arbitrary params in cross-net messages
adlrocha Feb 15, 2022
d63c486
atomic primitive. atomic-replace actor
adlrocha Feb 22, 2022
7bea2ba
wrapping locking primitives
adlrocha Feb 23, 2022
8b25269
sample actor with atomic support
adlrocha Feb 23, 2022
9e0a799
wip: offchain execution. Pending state discard
adlrocha Feb 28, 2022
2bcf418
wip
adlrocha Feb 28, 2022
4a78677
off-chain execuetion of locked state for atomic protocol
adlrocha Mar 1, 2022
cffef3e
added comments
adlrocha Mar 1, 2022
2434494
wip
adlrocha Mar 2, 2022
589f84f
implemented SCA logic for atomic exec
adlrocha Mar 2, 2022
e2e0bf1
added comments
adlrocha Mar 2, 2022
dae94c3
avoid storing full locked states. Store only cids of locked state
adlrocha Mar 2, 2022
aa0b2be
propagate result of atomic exec in cross-msg
adlrocha Mar 2, 2022
58114d9
check inputs for atomic exec params
adlrocha Mar 4, 2022
f70f345
Merge branch 'eudico' into feat/atomic-exec-sca
adlrocha Mar 4, 2022
fae2918
Merge pull request #137 from filecoin-project/feat/atomic-exec-sca
dnkolegov Mar 4, 2022
fa65f6f
minor edits
Mar 4, 2022
c6f6644
minor edits
Mar 7, 2022
5409457
integrated bitcoin regtest as well so we can switch easily between th…
Mar 7, 2022
8759593
issue when two participants send the initial tx, they don't have the …
Mar 7, 2022
c482b60
fixed issue, now can add nodes
Mar 7, 2022
97af8c3
minor edits
Mar 8, 2022
8947ef2
4 nodes demo working
Mar 10, 2022
ce9368f
added regtest bash file and switched demo to regtest
Mar 11, 2022
c15cb4a
merged conflict except for go.sum
Mar 11, 2022
8b6f51d
updated go.sum, fixed issue with ffi and mocked actor. Build working
Mar 11, 2022
f5dfd40
removed the public key from the mocked actor (issue not fixed)
Mar 11, 2022
617f690
put back the public key in actor, code working
Mar 14, 2022
bbc9e3b
updated to v7 in mocked power specs/actor (working)
Mar 14, 2022
6634eb2
replaced the type of miners from string to address in mocked actor (n…
Mar 14, 2022
dadaa36
changed miners back to string, and tried changing the actor again now…
Mar 14, 2022
b733578
mocked actor working if called before checkpoint frequency, moved the…
Mar 14, 2022
e0b0e21
added the kvs and started removing unnecessary info (netname and from…
Mar 14, 2022
0622807
latest edits (not working yet)
Mar 15, 2022
863f9d2
new cbor for kvs and other updates. Build working but not tested yet
Mar 15, 2022
160b1c9
added a write operation in the KVS (built but not tested)
Mar 15, 2022
b451c84
kvs cid and setlocal seem to be working
Mar 16, 2022
755a7d1
edits
Mar 16, 2022
bfcac63
updated resolvecrossmsg (built but not tested)
Mar 16, 2022
c584028
fixed an issue with the kvs cbor and wrote some test (all pass)
Mar 16, 2022
dd29200
updated the message handler
Mar 16, 2022
24f0773
updated datastore initialisation
Mar 16, 2022
adbc848
used pull instead of messageresolver to pull data
Mar 16, 2022
3f7a2d5
used resolvecrossmsg
Mar 16, 2022
e167482
edits in initialisation
Mar 16, 2022
2061405
changed initialisation again (not tested)
Mar 16, 2022
92c45d5
changed topic
Mar 16, 2022
f967d59
edits
Mar 18, 2022
857f9d9
debug
Mar 18, 2022
e25519a
debug
Mar 18, 2022
e5a37ec
debug
Mar 18, 2022
102de2c
debug
Mar 18, 2022
f9c6671
debug
Mar 18, 2022
60963db
debug
Mar 18, 2022
a9d0ab2
added back the waitcrossmsgresolved function
Mar 18, 2022
e072cb5
debug
Mar 18, 2022
9b0a937
kvs working, need to change code flow
Mar 22, 2022
3ca5c62
KVS working yay
Mar 22, 2022
0fe2860
added some comment and changed crossmsg with checkpoint in kvs
Mar 22, 2022
5f77674
addressed some of Alfonso's comment
Mar 23, 2022
8f8bd9a
changed the timeout to ctx1 as I had an error wrt timeout
Mar 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 16 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,11 @@ workflows:
suite: itest-deals_padding
target: "./itests/deals_padding_test.go"

- test:
name: test-itest-deals_partial_retrieval_dm-level
suite: itest-deals_partial_retrieval_dm-level
target: "./itests/deals_partial_retrieval_dm-level_test.go"

- test:
name: test-itest-deals_partial_retrieval
suite: itest-deals_partial_retrieval
Expand All @@ -825,6 +830,11 @@ workflows:
suite: itest-deals_publish
target: "./itests/deals_publish_test.go"

- test:
name: test-itest-deals_retry_deal_no_funds
suite: itest-deals_retry_deal_no_funds
target: "./itests/deals_retry_deal_no_funds_test.go"

- test:
name: test-itest-deals
suite: itest-deals
Expand Down Expand Up @@ -885,6 +895,11 @@ workflows:
suite: itest-sector_terminate
target: "./itests/sector_terminate_test.go"

- test:
name: test-itest-self_sent_txn
suite: itest-self_sent_txn
target: "./itests/self_sent_txn_test.go"

- test:
name: test-itest-tape
suite: itest-tape
Expand Down Expand Up @@ -935,7 +950,7 @@ workflows:
codecov-upload: false
suite: conformance-bleeding-edge
target: "./conformance"
vectors-branch: master
vectors-branch: specs-actors-v7
- trigger-testplans:
filters:
branches:
Expand Down Expand Up @@ -966,19 +981,10 @@ workflows:
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-appimage:
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish:
requires:
- build-all
- build-macos
- build-appimage
filters:
branches:
ignore:
Expand Down
11 changes: 1 addition & 10 deletions .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ workflows:
codecov-upload: false
suite: conformance-bleeding-edge
target: "./conformance"
vectors-branch: master
vectors-branch: specs-actors-v7
- trigger-testplans:
filters:
branches:
Expand Down Expand Up @@ -816,19 +816,10 @@ workflows:
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-appimage:
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish:
requires:
- build-all
- build-macos
- build-appimage
filters:
branches:
ignore:
Expand Down
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Related Issues
<!-- link all issues that this PR might resolve/fix. If an issue doesn't exist, include a brief motivation for the change being made.-->

## Proposed Changes
<!-- provide a clear list of the changes being made-->


## Additional Info
<!-- callouts, links to documentation, and etc-->

## Checklist

Before you mark the PR ready for review, please make sure that:
- [ ] All commits have a clear commit message.
- [ ] The PR title is in the form of of `<PR type>: <area>: <change being made>`
- example: ` fix: mempool: Introduce a cache for valid signatures`
- `PR type`: _fix_, _feat_, _INTERFACE BREAKING CHANGE_, _CONSENSUS BREAKING_, _build_, _chore_, _ci_, _docs_,_perf_, _refactor_, _revert_, _style_, _test_
- `area`: _api_, _chain_, _state_, _vm_, _data transfer_, _market_, _mempool_, _message_, _block production_, _multisig_, _networking_, _paychan_, _proving_, _sealing_, _wallet_, _deps_
- [ ] This PR has tests for new functionality or change in behaviour
- [ ] If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or [Discussion Tutorials.](https://github.com/filecoin-project/lotus/discussions/categories/tutorials)
- [ ] CI is green
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ scratchpad

gen.gen
*.key
data/*
data/*/*
!data/*/keystore/
!data/*/config.toml
Expand Down
344 changes: 344 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

23 changes: 2 additions & 21 deletions Dockerfile.lotus
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ WORKDIR /opt/filecoin
ARG RUSTFLAGS=""
ARG GOFLAGS=""

RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway
RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway lotus-stats


FROM ubuntu:20.04 AS base
Expand Down Expand Up @@ -66,8 +66,6 @@ COPY scripts/docker-lotus-entrypoint.sh /

ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV LOTUS_PATH /var/lib/lotus
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
ENV DOCKER_LOTUS_IMPORT_WALLET ""

Expand All @@ -92,8 +90,6 @@ MAINTAINER Lotus Development Team
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/

ENV WALLET_PATH /var/lib/lotus-wallet
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831

RUN mkdir /var/lib/lotus-wallet
RUN chown fc: /var/lib/lotus-wallet
Expand All @@ -114,10 +110,6 @@ MAINTAINER Lotus Development Team

COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/

ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http

USER fc

EXPOSE 1234
Expand All @@ -135,11 +127,7 @@ COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
COPY scripts/docker-lotus-miner-entrypoint.sh /

ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV DOCKER_LOTUS_MINER_INIT true

RUN mkdir /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
RUN chown fc: /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
Expand All @@ -163,10 +151,7 @@ MAINTAINER Lotus Development Team
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/

ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831

RUN mkdir /var/lib/lotus-worker
RUN chown fc: /var/lib/lotus-worker
Expand All @@ -186,23 +171,19 @@ CMD ["-help"]
from base as lotus-all-in-one

ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
ENV LOTUS_PATH /var/lib/lotus
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http
ENV WALLET_PATH /var/lib/lotus-wallet
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
ENV DOCKER_LOTUS_MINER_INIT true

COPY --from=builder /opt/filecoin/lotus /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-shed /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-stats /usr/local/bin/

RUN mkdir /var/tmp/filecoin-proof-parameters
RUN mkdir /var/lib/lotus
Expand Down
75 changes: 75 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Eudico FAQ
_Note: The aim of these FAQs is to get you started fast with Eudico so you can spawn a test network and start contributing to the code in no time. For more in depth documentation or further information about how to perform other actions go to the [Lotus documentation](https://lotus.filecoin.io/docs/set-up/about/), or refer to the base code. Eudico is a fork of Lotus, which means that "almost" everything that works in Lotus should work in Eudico out-of-the-box._

## Q: How to import a wallet?

**A:** Generate a key:
```
./lotus-keygen -t secp256k1
```
Import it (as default if needed):
```
./eudico wallet import –-as-default –-format=json-lotus $file
```

## Q: How to generate the cbor files when creating a new actor?

**A:** The Cbor library is used to help with marshalling and unmarshalling.
In the same folder where your `$actorName_actor.go` and `$actorName_state.go` files are defined, create a `gen` folder with a `gen.go` file that looks like [this](https://github.com/filecoin-project/eudico/blob/eudico/chain/consensus/hierarchical/actors/sca/gen/gen.go
). Add all the correspondings states and parameters, update the import url and add the package using `go get`.
Pre-populate the functions of the interface in a `cbor_gen.go` file as follows:
```
func (t *$YourStruct) MarshalCBOR(w io.Writer) error { return nil }

func (t *$YourStruct) MarshalCBOR(w io.Writer) error { return nil }
```
Run `go run gen.go`.


## Q: How do you send a transaction directly from the code?
**A:** By using the `api-MpoolPushMessage.` See how to use it [here](https://github.com/filecoin-project/eudico/blob/113829e7fc115daac08ea0217170baddcb7788ba/chain/consensus/hierarchical/subnet/manager/manager.go#L375-L391).

## Q: How can a built-in actor be initialize?
**A:** You can see an example of how is done for the SCA in [this piece of code](https://github.com/filecoin-project/eudico/blob/113829e7fc115daac08ea0217170baddcb7788ba/chain/consensus/hierarchical/actors/subnet/genesis.go#L131).

## Q: How can I run an eudico network with a specific consensus protocol?
**A:** Use the following commands:

Run a network:
```
./eudico delegated genesis $ADDR gen.gen
./eudico delegated daemon --genesis=gen.gen
```
Run a miner:
```
./eudico wallet import --format=json-lotus $ADDR
./eudico delegated miner
```

## Q: How can I run two eudico peers on the same host?
**A:** Use a different `EUDICO_PATH` variable and `api` argument for each path.

Terminal 1:
```
export EUDICO_PATH="~/.eudico1/"
./eudico delegated daemon --genesis=gen.gen --api=1234
```

Terminal 2:
```
export EUDICO_PATH="~/.eudico2/"
./eudico delegated daemon --genesis=gen.gen --api=1235
```

## Q: How can two two eudico clients be connected with each other?
**A:** Suppose you have two eudico clients A and B. Run the following commands:

On client A run the command below to output the target's libp2p address, `ADDR_A`
```
./eudico net listen
```

Run on client B:
```
./eudico net connect ADDR_A
```
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ method-gen: api-gen
(cd ./lotuspond/front/src/chain && $(GOCC) run ./methodgen.go)

actors-gen:
$(GOCC) run ./gen/inline-gen . gen/inlinegen-data.json
$(GOCC) run ./chain/actors/agen
$(GOCC) fmt ./...

Expand Down Expand Up @@ -367,4 +368,4 @@ print-%:
@echo $*=$($*)

circleci:
go generate -x ./.circleci
go generate -x ./.circleci
63 changes: 42 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ See the [official Golang installation instructions](https://golang.org/doc/insta

### Build and install Eudico

Once all the dependencies are installed, you can build and install the Eudico suite (`eudico`, `eudico-miner`, and `eudico-worker`).
Once all the dependencies are installed, you can build and install Eudico.

1. Clone the repository:

Expand All @@ -82,39 +82,60 @@ Once all the dependencies are installed, you can build and install the Eudico su

Note: The default branch `eudico` is the dev branch where the latest new features, bug fixes and improvement are in.

2. To join mainnet -- don't!

If you are changing networks from a previous installation or there has been a network reset, read the [Switch networks guide](https://docs.filecoin.io/get-started/lotus/switch-networks/) before proceeding.

For networks other than mainnet, look up the current branch or tag/commit for the network you want to join in the [Filecoin networks dashboard](https://network.filecoin.io), then build Eudico for your specific network below.
2. Build Eudico:

```sh
git checkout <tag_or_branch>
# For example:
git checkout <vX.X.X> # tag for a release
make eudico
```
This will create the `eudico` executable in the current directory.

Currently, the latest code on the _master_ branch corresponds to mainnet.
### Run a local test network.

3. If you are in China, see "[Lotus: tips when running in China](https://docs.filecoin.io/get-started/lotus/tips-running-in-china/)".
4. This build instruction uses the prebuilt proofs binaries. If you want to build the proof binaries from source check the [complete instructions](https://docs.filecoin.io/get-started/lotus/installation/#build-and-install-lotus). Note, if you are building the proof binaries from source, [installing rustup](https://docs.filecoin.io/get-started/lotus/installation/#rustup) is also needed.
**Note**: `eudico` uses the `$HOME/.eudico` folder by default for storage (configuration, chain data, wallets, etc). See [advanced options](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/) for information on how to customize the folder.
If you want to run more than one Eudico node the same host, you need to tell the nodes to use different folders (see [FAQ](FAQ.md#q-how-can-i-run-two-eudico-peers-on-the-same-host))
Make sure that this directory does not exist when you are starting a new network.

5. Build and install Eudico:
First, a key needs to be generated.
In order to do that, compile the Lotus key generator:

```sh
make clean all #mainnet
```bash
make lotus-keygen
```

Then, generate a key:

```bash
./lotus-keygen -t secp256k1
```
This creates a key file, with the name `f1[...].key` (e.g. `f16dv4rlp3b33d5deasf3lxkrbfwhi4q4a5uw5scy.key`) in the local directory.
The file name, without the `.key` extension, is the corresponding Filecoin address.
If this is the only key you generated so far, you can obtain the address, for example, by running

```bash
ADDR=$(echo f1* | tr '.' ' ' | awk '{print $1}')
```

# Or to join a testnet or devnet:
make clean calibnet # Calibration with min 32GiB sectors
Use this address to create a genesis block for the system and start the Eudico daemon.
The following command uses the `delegated` consensus.

sudo make eudico
```bash
./eudico delegated genesis $ADDR gen.gen
./eudico delegated daemon --genesis=gen.gen
```

This will put `eudico`, `eudico-miner` and `eudico-worker` in `/usr/local/bin`.
The daemon will continue running until you stop it.
To start a miner, first import a wallet, using the generated key
(replacing `f1*.key` by the generated key file if more than one key is present in the directory).

`eudico` will use the `$HOME/.eudico` folder by default for storage (configuration, chain data, wallets, etc). See [advanced options](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/) for information on how to customize the folder.
```bash
./eudico wallet import --format=json-lotus f1*.key
```

Then, start the miner.

6. You should now have Eudico installed. You can now [start the Eudico daemon and sync the chain](https://docs.filecoin.io/get-started/lotus/installation/#start-the-lotus-daemon-and-sync-the-chain).
```bash
./eudico delegated miner
```

## License

Expand Down
Loading