Skip to content
Snippets Groups Projects
Commit 1271a9b1 authored by Benjamin Bollen's avatar Benjamin Bollen Committed by GitHub
Browse files

Merge pull request #479 from eris-ltd/release-0.16

updating develop with intermediate fixes from release-0.16
parents 389f4e39 5473ab7e
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ go get github.com/Masterminds/glide
go get -d github.com/eris-ltd/eris-db
REPO=$($GOPATH/src/github.com/eris-ltd/eris-db)
cd $REPO && glide install
cd $REPO/cmd/eris-db && go install```
cd $REPO/cmd/eris-db && go install
```
To run `eris-db`, just type `$ eris-db serve --work-dir <path to chain directory>`, where the chain directory needs to contain the configuration files as generated by `eris chains make`.
......
......@@ -41,23 +41,42 @@ deployment:
branch: release-0.12
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version
- tests/build_tool.sh
- "docker tag quay.io/eris/db:build throw:build && docker rmi quay.io/eris/db:build"
- docker push quay.io/eris/db
- docs/build.sh release
# push the updated documentation
- docs/build.sh
release-0.16:
branch: release-0.16
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version
- tests/build_tool.sh
- "docker tag quay.io/eris/db:build throw:build && docker rmi quay.io/eris/db:build"
- docker push quay.io/eris/db
- docs/build.sh release
# push the updated documentation
- docs/build.sh
master:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with ':latest'
# builds on master are considered immutable so we do not push the version
# tag to allow for hotfixes
- tests/build_tool.sh latest
- docker push quay.io/eris/db
# push the updated documentation and replace latest
- docs/build.sh latest
tagged-releases:
tag: /v[0-9]+(\.[0-9]+)*/
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version;
# once the commit is tagged the docker image for this version tag is
# considered immutable.
- tests/build_tool.sh
- "docker rmi quay.io/eris/db:latest && docker tag quay.io/eris/db:build throw:build && docker rmi quay.io/eris/db:build"
- docker push quay.io/eris/db
# push the updated documentation
- docs/build.sh
# Eris-DB changelog
## 0.16.0
This is a consolidation release that fixes various bugs and improves elements
of the architecture across the Eris Platform to support a quicker release
cadence.
- Features and improvements
- Logging system overhauled based on the central logging interface of go-kit log. Configuration lacking in this release but should be in 0.16.1. Allows powerful routing, filtering, and output options for better operations and increasing the observability of an eris blockchain. More to follow.
- Genesis making is improved and moved into eris-db.
- Config templating is moved into eris-db for better synchronisation of server config between the consumer of it (eris-db) and the producers of it (eris cli and other tools).
- Some documentation updates in code and in specs.
- Makefile added to capture conventions around building and testing and replicate them across different environments such as continuous integration systems.
- Bugfixes
- [RPC/v0] #464 fix divergence from JSON-RPC spec
- [CI] #366 correction to circle ci script
- [eris-client] #378 more descriptive error message
## 0.12.0-RC3
This release marks the start of Eris-DB as the full permissioned blockchain node
......
......@@ -28,7 +28,7 @@ cd $repo
rm -rf $docs_name
go run ./docs/generator.go
if [[ "$1" == "release" ]]
if [[ "$1" == "latest" ]]
then
mkdir -p $docs_name/$slim_name/latest
rsync -av $docs_name/$slim_name/$release_min/ $docs_name/$slim_name/latest/
......
......@@ -1159,7 +1159,7 @@ TODO
<a name="event-subscribe"></a>
####EventSubscribe
Subscribe to a given type of event.
Subscribe to a given type of event. The event is identified by the `event_id` (see [Event types](#event-types). The response provides a subscription identifier `sub_id` which tracks your client and can be used to [unsubscribe](#eventunsubscribe).
#####HTTP
......@@ -1196,9 +1196,9 @@ For more information about events and the event system, see the [Event system](#
***
<a name="event-unsubscribe"></a>
####EventUnubscribe
####EventUnsubscribe
Unsubscribe to an event type.
Unsubscribe to an event by supplying the subscription identifier `sub_id` you obtained from a previous call to [subscribe](#eventsubscribe).
#####HTTP
......@@ -1210,7 +1210,12 @@ Endpoint: `/event_subs/:id`
Method: `erisdb.eventUnsubscribe`
Parameter: -
Parameter:
```
{
sub_id: <string>
}
```
#####Return value
......@@ -2073,4 +2078,4 @@ One that finds those where 0 <= balance <= 1000.
One that finds non-contract accounts with 0 <= balance <= 1000:
`q=balance:0..1000+code:`
\ No newline at end of file
`q=balance:0..1000+code:`
......@@ -20,6 +20,7 @@ import (
"bytes"
"fmt"
"sync"
"time"
tendermint_events "github.com/tendermint/go-events"
wire "github.com/tendermint/go-wire"
......@@ -167,7 +168,15 @@ func (app *ErisMint) Commit() (res tmsp.Result) {
// flush events to listeners (XXX: note issue with blocking)
app.evc.Flush()
return tmsp.NewResultOK(app.state.Hash(), "Success")
// MARMOT:
// set internal time as two seconds per block
app.state.LastBlockTime = app.state.LastBlockTime.Add(time.Duration(2) * time.Second)
fmt.Printf("\n\nMARMOT TIME: %s\n\n", app.state.LastBlockTime)
// MARMOT:
appHash := app.state.Hash()
fmt.Printf("\n\nMARMOT COMMIT: %X\n\n", appHash)
// return tmsp.NewResultOK(app.state.Hash(), "Success")
return tmsp.NewResultOK(appHash, "Success")
}
func (app *ErisMint) Query(query []byte) (res tmsp.Result) {
......
......@@ -15,18 +15,19 @@ import (
)
var (
ErrUnknownAddress = errors.New("Unknown address")
ErrInsufficientBalance = errors.New("Insufficient balance")
ErrInvalidJumpDest = errors.New("Invalid jump dest")
ErrInsufficientGas = errors.New("Insufficient gas")
ErrMemoryOutOfBounds = errors.New("Memory out of bounds")
ErrCodeOutOfBounds = errors.New("Code out of bounds")
ErrInputOutOfBounds = errors.New("Input out of bounds")
ErrCallStackOverflow = errors.New("Call stack overflow")
ErrCallStackUnderflow = errors.New("Call stack underflow")
ErrDataStackOverflow = errors.New("Data stack overflow")
ErrDataStackUnderflow = errors.New("Data stack underflow")
ErrInvalidContract = errors.New("Invalid contract")
ErrUnknownAddress = errors.New("Unknown address")
ErrInsufficientBalance = errors.New("Insufficient balance")
ErrInvalidJumpDest = errors.New("Invalid jump dest")
ErrInsufficientGas = errors.New("Insufficient gas")
ErrMemoryOutOfBounds = errors.New("Memory out of bounds")
ErrCodeOutOfBounds = errors.New("Code out of bounds")
ErrInputOutOfBounds = errors.New("Input out of bounds")
ErrCallStackOverflow = errors.New("Call stack overflow")
ErrCallStackUnderflow = errors.New("Call stack underflow")
ErrDataStackOverflow = errors.New("Data stack overflow")
ErrDataStackUnderflow = errors.New("Data stack underflow")
ErrInvalidContract = errors.New("Invalid contract")
ErrNativeContractCodeCopy = errors.New("Tried to copy native contract code")
)
type ErrPermission struct {
......@@ -156,7 +157,9 @@ func (vm *VM) DelegateCall(caller, callee *Account, code, input []byte, value in
exception := new(string)
// fire the post call event (including exception if applicable)
defer vm.fireCallEvent(exception, &output, caller, callee, input, value, gas)
// NOTE: [ben] hotfix for issue 371;
// introduce event EventStringAccDelegateCall Acc/%X/DelegateCall
// defer vm.fireCallEvent(exception, &output, caller, callee, input, value, gas)
// DelegateCall does not transfer the value to the callee.
......@@ -565,13 +568,17 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas
}
acc := vm.appState.GetAccount(addr)
if acc == nil {
return nil, firstErr(err, ErrUnknownAddress)
if _, ok := registeredNativeContracts[addr]; !ok {
return nil, firstErr(err, ErrUnknownAddress)
}
dbg.Printf(" => returning code size of 1 to indicated existence of native contract at %X\n", addr)
stack.Push(One256)
} else {
code := acc.Code
l := int64(len(code))
stack.Push64(l)
dbg.Printf(" => %d\n", l)
}
code := acc.Code
l := int64(len(code))
stack.Push64(l)
dbg.Printf(" => %d\n", l)
case EXTCODECOPY: // 0x3C
addr := stack.Pop()
if useGasNegative(gas, GasGetAccount, &err) {
......@@ -579,6 +586,10 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas
}
acc := vm.appState.GetAccount(addr)
if acc == nil {
if _, ok := registeredNativeContracts[addr]; ok {
dbg.Printf(" => attempted to copy native contract at %X but this is not supported\n", addr)
return nil, firstErr(err, ErrNativeContractCodeCopy)
}
return nil, firstErr(err, ErrUnknownAddress)
}
code := acc.Code
......
......@@ -416,7 +416,10 @@ func MakeGenesisState(db dbm.DB, genDoc *genesis.GenesisDoc) *State {
}
if genDoc.GenesisTime.IsZero() {
genDoc.GenesisTime = time.Now()
// MARMOT: really?
// set time to 11/18/2016 @ 4:09am (UTC)
genDoc.GenesisTime = time.Unix(1479442162, 0)
// genDoc.GenesisTime = time.Now()
}
// Make accounts state tree
......
......@@ -207,7 +207,7 @@ private_validator_file = "priv_validator.json"
################################################################################
##
## Eris-Mint
## version 0.12.0
## version 0.16.0
##
## The original Ethereum virtual machine with IAVL merkle trees
## and tendermint/go-wire encoding
......
......@@ -41,18 +41,14 @@ docker run --rm --entrypoint cat $IMAGE:build /usr/local/bin/$TARGET > $REPO/tar
docker run --rm --entrypoint cat $IMAGE:build /usr/local/bin/eris-client > $REPO/target/docker/eris-client.dockerartefact
docker build -t $IMAGE:$release_min -f Dockerfile.deploy $REPO
# Cleanup
rm $REPO/target/docker/eris-db.dockerartefact
rm $REPO/target/docker/eris-client.dockerartefact
# Extra Tags
if [[ "$branch" = "release" ]]
# If provided, tag the image with the label provided
if [ "$1" ]
then
docker tag -f $IMAGE:$release_min $IMAGE:$release_maj
docker tag -f $IMAGE:$release_min $IMAGE:latest
docker tag $IMAGE:$release_min $IMAGE:$1
docker rmi $IMAGE:$release_min
fi
if [ "$CIRCLE_BRANCH" ]
then
docker tag -f $IMAGE:$release_min $IMAGE:latest
fi
# Cleanup
rm $REPO/target/docker/eris-db.dockerartefact
rm $REPO/target/docker/eris-client.dockerartefact
docker rmi -f $IMAGE:build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment