Skip to content

Commit

Permalink
Merge pull request #157 from ShyftNetwork/development
Browse files Browse the repository at this point in the history
Merge Development Changes Into Staging - to Facilitate A Release
  • Loading branch information
GregTheGreek authored Jan 21, 2019
2 parents 52bf7ed + a1be5b2 commit 0698f90
Show file tree
Hide file tree
Showing 320 changed files with 10,936 additions and 4,037 deletions.
24 changes: 1 addition & 23 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,12 @@
# Each line is a file pattern followed by one or more owners.

accounts/usbwallet @karalabe
accounts/abi @gballet
consensus @karalabe
core/ @karalabe @holiman
eth/ @karalabe
les/ @zsfelfoldi
light/ @zsfelfoldi
mobile/ @karalabe
p2p/ @fjl @zsfelfoldi
p2p/simulations @lmars
p2p/protocols @zelig
swarm/api/http @justelad
swarm/bmt @zelig
swarm/dev @lmars
swarm/fuse @jmozah @holisticode
swarm/grafana_dashboards @nonsense
swarm/metrics @nonsense @holisticode
swarm/multihash @nolash
swarm/network/bitvector @zelig @janos
swarm/network/priorityqueue @zelig @janos
swarm/network/simulations @zelig @janos
swarm/network/stream @janos @zelig @holisticode @justelad
swarm/network/stream/intervals @janos
swarm/network/stream/testing @zelig
swarm/pot @zelig
swarm/pss @nolash @zelig @nonsense
swarm/services @zelig
swarm/state @justelad
swarm/storage/encryption @zelig @nagydani
swarm/storage/mock @janos
swarm/storage/feed @nolash @jpeletier
swarm/testutil @lmars
whisper/ @gballet @gluk256
2 changes: 1 addition & 1 deletion .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 30
# Label requiring a response
responseRequiredLabel: more-information-needed
responseRequiredLabel: "need:more-information"
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
staleLabel: "status:inactive"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ shyftBlockExplorerApi/vendor/*

build/_workspace/*

./shyft-config/keystore/
./shyft-config/unlockPasswords.txt
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ RUN \

FROM alpine:3.8
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
WORKDIR /go/src/ShyftNetwork/go-empyrean/
WORKDIR /go-empyrean/
COPY --from=build-env /bin/geth /bin/
COPY --from=build-env /bin/bootnode /bin/

COPY ./config.toml ./
COPY ./ShyftNetwork.json ./
COPY ./wait-for.sh ./
COPY ./shyft-cli/initShyftGeth.sh ./shyft-cli/

EXPOSE 8545 8546 31333 31333/udp 8081
CMD ["./shyft-cli/initShyftGeth.sh", "geth --config config.toml"]
CMD ["geth"]
82 changes: 82 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!---
TO INSURE THE FASTEST RESPONSE POSSIBLE, PLEASE READ THESE INSTRUCTIONS
CAREFULLY.
-->

<!--- Please provide a short summary of the issue in the Title above -->

<!--- When you see empty square brackets below, that's a checkbox. Replace the space with
[x] to check the box -->


## Expected Behavior

<!---
If you're describing a bug, tell us what should happen.
If you're suggesting a change/improvement, tell us how it should work.
-->

## Current Behavior

<!---
If describing a bug, tell us what happens instead of the expected behavior.
If suggesting a change/improvement, explain the difference from current
behavior.
-->

## Possible Solution

<!---
Not obligatory, but this is the place to suggest the underlying cause and
possible fix for the bug, if you have one, or ideas how to implement the
addition or change.
-->

## Steps to Reproduce (for bugs)

<!---
This is the most important information you can give us in this bug report.
Without good information here, it will take much longer to get your issue
resolved!
If possible, please provide a link to a live example, or an unambiguous set of
steps to reproduce this bug. Include code to reproduce, if relevant.
-->
1.
2.
3.
4.

## Context
<!---
How has this issue affected you? What are you trying to accomplish? Is this
issue likely to block you or others from getting your work done?
-->

## Your Environment
* Version:
* OS: [ ] OSX, [ ] Linux, [ ] Windows
* OS Version:
* Version of Truffle/Remix/Other tools used:
* NodeJS Version:
* Commit hash:
* I intend to submit a pull request to fix this issue: [ ]

<!--- When you're finished with the above, you may need to delete these comments to avoid
whitespace formatting issues -->

<!--- Modified from: https://github.com/trufflesuite/ganache-cli/blob/v7.0.0-beta.0/ISSUE_TEMPLATE.md -->
18 changes: 18 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
* **Please check if the PR fulfills these requirements**
- [ ] Unit tests for the changes have been added
- [ ] Docs have been added / updated (for bug fixes / features)


* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)



* **If this is a feature change, what is the new behavior ?**



* **Does this PR introduce a breaking change?** (how will this change the workflow of developers or users?)



* **Other information**:
42 changes: 17 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ Once cloned, in a terminal window run the following command:

Before running any CLI options ensure you run **`make geth`** in the root directory.

``.shyft-geth.sh --setup`` This sets up postgres and the shyft chain db
``./shyft-config/shyft-geth.sh --setup`` This sets up postgres and the shyft chain db

``./shyft-geth.sh --start`` This starts GETH
``./shyft-config/shyft-geth.sh --start`` This starts GETH

At this point you should see GETH running in the terminal and if you opened your postgres instance you should see data being populated into the tables. It might look something similiar to the image below.

To stop Geth, **`crtl+C`** in the terminal window, if you proceed with the start script mentioned above the Shyft chain will begin from the last block height, if you wish to start the chain fresh from genesis follow the below steps:

``./shyft-geth.sh --reset`` This drops postgres and chaindb data
``./shyft-config/shyft-geth.sh --reset`` This drops postgres and chaindb data

``./shyft-geth.sh --start`` Starts GETH
``./shyft-config/shyft-geth.sh --start`` Starts GETH

To see transactions being submitted on the network see the sendTransactions command in the CLI section of this readme.

Expand Down Expand Up @@ -105,7 +105,7 @@ Steps for regenerating are as follows:
2. Run the following command to regenerate the contract bindings:
./build/bin/abigen --sol shyft-cli/web3/validSignersDeploy/ValidSigners.sol --pkg shyft_contracts --out generated_bindings/whisper_signer_binding.go
./build/bin/abigen --sol ./shyft-config/shyft-cli/web3/validSignersDeploy/ValidSigners.sol --pkg shyft_contracts --out generated_bindings/whisper_signer_binding.go
```

Expand All @@ -118,15 +118,15 @@ Two sets of Docker Images are available for ShyftGeth, the Postgresql Database,

**To build the images for the first time please run the following command:**

`./shyft-geth.sh --setup # clears persisted directories prior to docker build`
`./shyft-geth --setup # clears persisted directories prior to docker build`

`docker-compose up --build`

If you would like to reinitialize/rebuild the docker images you can run the above mentioned command as well.

To launch ShyftGeth, PG, the ShyftBlock Explorer Api and UI anytime after initial build - issue the following commands from the root of the project directory:

`./shyft-geth.sh --setup # clears persisted directories prior to docker build`
`./shyft-geth --setup # clears persisted directories prior to docker build`

**`docker-compose up`**

Expand Down Expand Up @@ -172,7 +172,7 @@ ie. for shyftBlockExplorerApi:

The Postgresql Database Container will persist the database data to the directory ``./pg-data`` _. So if you do want to reinitialize the database you should delete this directory as well as the blockchain data directories ``(./shyftData ./privatenet)`` prior to launching the docker containers. There is a shell script available to delete these folders to run it execute the following command:

**``./shyft-cli/resetShyftGeth.sh``**
**``./shyft-config/shyft-cli/resetShyftGeth``**

Blockchain data is persisted to **``./ethash/.ethash and ./shyftData__``**. If you would like to reset the test blockchain you will need to delete the **``__./ethash ./shyftData & ./privatenet__``** directories.

Expand Down Expand Up @@ -235,12 +235,12 @@ _TODO_

#### CLI

Run `./shyft-geth.sh` with one of the following flags:
Run `./shyft-geth` with one of the following flags:

- `--setup` - Setups postgres and the shyft chain db.
- `--start` - Starts geth.
- `--reset` - Drops postgress and chain db, and reinstantiates both.
- `--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth.sh --js sendTransactions`.
- `--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth --js sendTransactions`.

#### Chain Rollbacks

Expand Down Expand Up @@ -533,12 +533,12 @@ limit blocks converge to (`--targetgaslimit`) and the price transactions are acc

#### CLI

Run `./shyft-geth.sh` with one of the following flags:
Run `./shyft-config/shyft-geth` with one of the following flags:

- `--setup` - Setups postgres and the shyft chain db.
- `--start` - Starts geth.
- `--reset` - Drops postgress and chain db, and reinstantiates both.
- `--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth.sh --js sendTransactions`.
- `--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth --js sendTransactions`.

#### Docker Images

Expand Down Expand Up @@ -603,26 +603,18 @@ _TODO_

## Contribution

Thank you for considering to help out with the source code! We welcome contributions from
anyone on the internet, and are grateful for even the smallest of fixes!
If you'd like to contribute to go-empyrean, please fork, fix, commit and send a pull request against the `development` branch.

If you'd like to contribute to go-ethereum, please fork, fix, commit and send a pull request
for the maintainers to review and merge into the main code base. If you wish to submit more
complex changes though, please check up with the core devs first on [our gitter channel](https://gitter.im/ShyftNetwork/go-empyrean)
to ensure those changes are in line with the general philosophy of the project and/or get some
early feedback which can make both your efforts much lighter as well as our review and merge
procedures quick and simple.
We have a list of issues available on github.

For general communication, we communicate on [our gitter channel](https://gitter.im/ShyftNetwork/go-empyrean).

Please make sure your contributions adhere to our coding guidelines:

- Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
- Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
- Pull requests need to be based on and opened against the `master` branch.
- Commit messages should be prefixed with the package(s) they modify.
- E.g. "eth, rpc: make trace configs optional"
- Pull requests need to be based on and opened against the `development` branch.

Please see the [Developers' Guide](https://github.com/empyrean/go-ethereum/wiki/Developers'-Guide)
for more details on configuring your environment, managing project dependencies and testing procedures.

## License

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ func (abi ABI) Pack(name string, args ...interface{}) ([]byte, error) {
return nil, err
}
return arguments, nil

}
method, exist := abi.Methods[name]
if !exist {
return nil, fmt.Errorf("method '%s' not found", name)
}

arguments, err := method.Inputs.Pack(args...)
if err != nil {
return nil, err
Expand All @@ -82,7 +80,7 @@ func (abi ABI) Unpack(v interface{}, name string, output []byte) (err error) {
// we need to decide whether we're calling a method or an event
if method, ok := abi.Methods[name]; ok {
if len(output)%32 != 0 {
return fmt.Errorf("abi: improperly formatted output")
return fmt.Errorf("abi: improperly formatted output: %s - Bytes: [%+v]", string(output), output)
}
return method.Outputs.Unpack(v, output)
} else if event, ok := abi.Events[name]; ok {
Expand Down
Loading

0 comments on commit 0698f90

Please sign in to comment.