diff --git a/CHANGELOG.md b/CHANGELOG.md index c2d4afadd..078ae7298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog -## [Unreleased] +## [0.27.0] - 2019-06-23 +### Added +- [WASM] Support for WASM contracts written in Solidity compiled using solang + +### Fixed +-[RPC/Transact] CallCodeSim and CallTxSim were run against uncommitted checker state rather than committed state were all other reads are routed. They were also passed through Transactor for no particularly good reason. This changes them to run against committed DB state and removes the code path through Transactor. + +### Changed +- [State] TxExecution's Envelope now stored in state so will be reproduced in Vent Tx tables and over RPC, and so matches TxExecutions served from *Sync rpctransact methods ## [0.26.2] - 2019-06-19 @@ -507,7 +515,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. -[Unreleased]: https://github.com/hyperledger/burrow/compare/v0.26.2...HEAD +[0.27.0]: https://github.com/hyperledger/burrow/compare/v0.26.2...v0.27.0 [0.26.2]: https://github.com/hyperledger/burrow/compare/v0.26.1...v0.26.2 [0.26.1]: https://github.com/hyperledger/burrow/compare/v0.26.0...v0.26.1 [0.26.0]: https://github.com/hyperledger/burrow/compare/v0.25.1...v0.26.0 diff --git a/NOTES.md b/NOTES.md index b4cee2e1e..30d091dc2 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,9 @@ +### Added +- [WASM] Support for WASM contracts written in Solidity compiled using solang + ### Fixed -- [Blockchain] Persist LastBlockTime in Blockchain - before this patch LastBlockTime would only be set correctly after the first block had been received after a node is restarted - this can lead to non-determinism in the EVM via the TIMESTAMP opcode that use the LastBlockTime which is itself sourced from Tendermint's block header (from their implementation of BFT time). Implementing no empty blocks made observing this bug more likely by increasing the amount of time spent in a bad state (LastBlockTime is initially set to GenesisTime). +-[RPC/Transact] CallCodeSim and CallTxSim were run against uncommitted checker state rather than committed state were all other reads are routed. They were also passed through Transactor for no particularly good reason. This changes them to run against committed DB state and removes the code path through Transactor. + +### Changed +- [State] TxExecution's Envelope now stored in state so will be reproduced in Vent Tx tables and over RPC, and so matches TxExecutions served from *Sync rpctransact methods diff --git a/acm/acm.pb.go b/acm/acm.pb.go index c826d45dc..716122b25 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -5,14 +5,15 @@ package acm import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" permission "github.com/hyperledger/burrow/permission" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/acm/balance/balance.pb.go b/acm/balance/balance.pb.go index dcf845e9e..1e52810f1 100644 --- a/acm/balance/balance.pb.go +++ b/acm/balance/balance.pb.go @@ -5,11 +5,12 @@ package balance import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index 2487af8d4..14decd2a3 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -5,13 +5,14 @@ package validator import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/bcm/bcm.pb.go b/bcm/bcm.pb.go index 4c0f45b50..9173306b5 100644 --- a/bcm/bcm.pb.go +++ b/bcm/bcm.pb.go @@ -5,6 +5,10 @@ package bcm import ( fmt "fmt" + io "io" + math "math" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -12,9 +16,6 @@ import ( _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/consensus/tendermint/tendermint.pb.go b/consensus/tendermint/tendermint.pb.go index feb604bdf..f3bf40096 100644 --- a/consensus/tendermint/tendermint.pb.go +++ b/consensus/tendermint/tendermint.pb.go @@ -5,13 +5,14 @@ package tendermint import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/crypto/crypto.pb.go b/crypto/crypto.pb.go index 4b0490195..a7bce82f6 100644 --- a/crypto/crypto.pb.go +++ b/crypto/crypto.pb.go @@ -5,12 +5,13 @@ package crypto import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/dump/dump.pb.go b/dump/dump.pb.go index 91ef3b076..adb99f74b 100644 --- a/dump/dump.pb.go +++ b/dump/dump.pb.go @@ -5,6 +5,10 @@ package dump import ( fmt "fmt" + io "io" + math "math" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -15,9 +19,6 @@ import ( github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" exec "github.com/hyperledger/burrow/execution/exec" names "github.com/hyperledger/burrow/execution/names" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index b41c4f57f..75a1f5132 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -195,14 +195,20 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error if createContract { txCache.InitWASMCode(callee, wcode) } - ret, err := wasm.RunWASM(txCache, callee, createContract, wcode, ctx.tx.Data) - if err != nil { - ctx.Logger.InfoMsg("Error returned from WASM", "error", err) - return err - } - err = txCache.Sync() - if err != nil { - return err + ret, exception = wasm.RunWASM(txCache, callee, createContract, wcode, ctx.tx.Data) + if exception != nil { + // Failure. Charge the gas fee. The 'value' was otherwise not transferred. + ctx.Logger.InfoMsg("Error on WASM execution", + structure.ErrorKey, exception) + + ctx.txe.PushError(errors.ErrorCodef(exception.ErrorCode(), "call error: %s\n", + exception.String())) + } else { + ctx.Logger.TraceMsg("Successful execution") + err := txCache.Sync() + if err != nil { + return err + } } ctx.txe.Return(ret, ctx.tx.GasLimit-gas) } else { @@ -211,7 +217,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error ret, exception = vmach.Call(txCache, ctx.txe, caller, callee, code, ctx.tx.Data, value, &gas) if exception != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. - ctx.Logger.InfoMsg("Error on execution", + ctx.Logger.InfoMsg("Error on EVM execution", structure.ErrorKey, exception) ctx.txe.PushError(errors.ErrorCodef(exception.ErrorCode(), "call error: %s\nEVM call trace: %s", diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index 97fb131a2..a75c80951 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -5,11 +5,12 @@ package errors import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index de5c18e22..bee8cee9c 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -5,6 +5,10 @@ package exec import ( fmt "fmt" + io "io" + math "math" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -20,9 +24,6 @@ import ( txs "github.com/hyperledger/burrow/txs" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/execution/names/names.pb.go b/execution/names/names.pb.go index 0c6b9dd23..c6e76166f 100644 --- a/execution/names/names.pb.go +++ b/execution/names/names.pb.go @@ -5,12 +5,13 @@ package names import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/genesis/spec/spec.pb.go b/genesis/spec/spec.pb.go index 47170ba4a..e5dc717d4 100644 --- a/genesis/spec/spec.pb.go +++ b/genesis/spec/spec.pb.go @@ -5,6 +5,9 @@ package spec import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +15,6 @@ import ( balance "github.com/hyperledger/burrow/acm/balance" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/keys/keys.pb.go b/keys/keys.pb.go index 5a262dce5..d38370086 100644 --- a/keys/keys.pb.go +++ b/keys/keys.pb.go @@ -6,13 +6,14 @@ package keys import ( context "context" fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" grpc "google.golang.org/grpc" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/permission/permission.pb.go b/permission/permission.pb.go index bb07ce156..b91f0d764 100644 --- a/permission/permission.pb.go +++ b/permission/permission.pb.go @@ -5,12 +5,13 @@ package permission import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/project/history.go b/project/history.go index 891ce8bf1..f9d484cf3 100644 --- a/project/history.go +++ b/project/history.go @@ -48,7 +48,7 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( - "", + "0.27.0 - 2019-06-23", `### Added - [WASM] Support for WASM contracts written in Solidity compiled using solang diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go index 61aac4f75..ad538aa98 100644 --- a/rpc/rpc.pb.go +++ b/rpc/rpc.pb.go @@ -5,6 +5,9 @@ package rpc import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +15,6 @@ import ( bcm "github.com/hyperledger/burrow/bcm" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" tendermint "github.com/hyperledger/burrow/consensus/tendermint" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpcdump/rpcdump.pb.go b/rpc/rpcdump/rpcdump.pb.go index 79ec1923e..22a0239d7 100644 --- a/rpc/rpcdump/rpcdump.pb.go +++ b/rpc/rpcdump/rpcdump.pb.go @@ -6,13 +6,14 @@ package rpcdump import ( context "context" fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" dump "github.com/hyperledger/burrow/dump" grpc "google.golang.org/grpc" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpcevents/rpcevents.pb.go b/rpc/rpcevents/rpcevents.pb.go index db293aaea..ea0229c54 100644 --- a/rpc/rpcevents/rpcevents.pb.go +++ b/rpc/rpcevents/rpcevents.pb.go @@ -6,14 +6,15 @@ package rpcevents import ( context "context" fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" exec "github.com/hyperledger/burrow/execution/exec" grpc "google.golang.org/grpc" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index 65e755274..d9ea7463d 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -6,6 +6,9 @@ package rpcquery import ( context "context" fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -18,8 +21,6 @@ import ( payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index 915e0c193..ea6523360 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -6,6 +6,10 @@ package rpctransact import ( context "context" fmt "fmt" + io "io" + math "math" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -17,9 +21,6 @@ import ( txs "github.com/hyperledger/burrow/txs" payload "github.com/hyperledger/burrow/txs/payload" grpc "google.golang.org/grpc" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index 3f41ab25e..c99de74e1 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -5,6 +5,9 @@ package payload import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +15,6 @@ import ( github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" spec "github.com/hyperledger/burrow/genesis/spec" permission "github.com/hyperledger/burrow/permission" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/txs/txs.pb.go b/txs/txs.pb.go index e95880013..0e9ac84c0 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -5,6 +5,9 @@ package txs import ( fmt "fmt" + io "io" + math "math" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +15,6 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used.