meitu / go-ethereum Goto Github PK
View Code? Open in Web Editor NEWgo-ethereum with DPoS
License: GNU Lesser General Public License v3.0
go-ethereum with DPoS
License: GNU Lesser General Public License v3.0
Hi there,
i has used this package with myetherwallet vintage for my private network.when is try to send transaction using myetherwallet it shows error
will you help me to solve this?
Geth
Version: 1.7.4-stable
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1357
Go Version: go1.10.3
Operating System: linux
the transaction should successfull
error: "rlp: input string too short for common.Address, decoding into (types.Transaction)(types.txdata).Recipient"
just create private network and connect with myethereumwallet vintage version. and try to send some value
[backtrace]
有没有相关的bug修复之类的?
正在学习你们的项目,有最新的情况吗
func (ec *EpochContext) lookupValidator(now int64) (validator common.Address, err error) {
validator = common.Address{}
offset := now % epochInterval // the
if offset%blockInterval != 0 {
return common.Address{}, ErrInvalidMintBlockTime
}
offset /= blockInterval
validators, err := ec.DposContext.GetValidators()
if err != nil {
return common.Address{}, err
}
validatorSize := len(validators)
if validatorSize == 0 {
return common.Address{}, errors.New("failed to lookup validator")
}
offset %= int64(validatorSize)
return validators[offset], nil
}
The purpose of setting this variable epochInterval
, how to set the value of this variable, what are the conditions? and Can you explain the implementation principle of this function? ths.
Hi there,
geth version: 1.8.15-stable
go version: 1.11 linux/amd64
Linux version 4.14.47-64.38.amzn2.x86_64
(mockbuild@ip-10-0-1-219)
(gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC))
aws型号 c5.large | vCPU:2 | 内存 (GiB):4
INFO [11-22|01:36:30.725] Submitted transaction fullhash=0x583c48c36a165daed190212facf12813b2a5331b05e43ede7a1e8426936d83d6 recipient=0xe2E55079E31cf95589B5433cF06beb448624d0A7
INFO [11-22|01:36:31.286] Committing block stateHash=cc2f6d…6fbe5b blockHash=3b92a3…2a3b13
INFO [11-22|01:36:31.287] Imported new chain segment blocks=1 txs=1 mgas=0.021 elapsed=428.986µs mgasps=48.953 number=3 hash=607b71…154d5e cache=964.00B
INFO [11-22|01:36:31.287] Commiting module=oval blockHash=3b92a30f0a4b332a95b5bf304d133b5ebe76210f6c329b14148069a77c2a3b13 cbr=cc2f6d729a06198723f407523b4ac61796a0198aa9e9e3d5a1c17e37e56fbe5b
INFO [11-22|01:42:00.336] Committing block stateHash=de1af6…3b83f8 blockHash=71c97f…2c1bdc
INFO [11-22|01:42:00.337] Imported new chain segment blocks=1 txs=1 mgas=0.075 elapsed=456.862µs mgasps=163.472 number=4 hash=295456…55f08d cache=1.27kB
INFO [11-22|01:42:00.337] Commiting module=oval blockHash=71c97f9a55e28a03d9c114a9749d6a8f50dccbc2a3538f4ce6818fb2c52c1bdc cbr=de1af60245d823ff58d280ced344046ef4348957b83900d55cfd8e108d3b83f8
fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x10bd3c9, 0x16)
/usr/local/go/src/runtime/panic.go:608 +0x72
runtime.sysMap(0xc0cc000000, 0x10000000, 0x217fdf8)
/usr/local/go/src/runtime/mem_linux.go:156 +0xc7
runtime.(*mheap).sysAlloc(0x2165e60, 0x10000000, 0x313d68, 0x7fcb9139acd8)
/usr/local/go/src/runtime/malloc.go:619 +0x1c7
runtime.(*mheap).grow(0x2165e60, 0x8000, 0x0)
/usr/local/go/src/runtime/mheap.go:920 +0x42
runtime.(*mheap).allocSpanLocked(0x2165e60, 0x8000, 0x217fe08, 0x448fab)
/usr/local/go/src/runtime/mheap.go:848 +0x337
runtime.(*mheap).alloc_m(0x2165e60, 0x8000, 0x7fcb9cf00101, 0x7fcb9cf025a0)
/usr/local/go/src/runtime/mheap.go:692 +0x119
runtime.(*mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:759 +0x4c
runtime.(*mheap).alloc(0x2165e60, 0x8000, 0x7fcb91010101, 0x42baf5)
/usr/local/go/src/runtime/mheap.go:758 +0x8a
runtime.largeAlloc(0x10000000, 0x460101, 0x7fcb9d0896c0)
/usr/local/go/src/runtime/malloc.go:1019 +0x97
runtime.mallocgc.func1()
/usr/local/go/src/runtime/malloc.go:914 +0x46
runtime.systemstack(0xc000308480)
/usr/local/go/src/runtime/asm_amd64.s:351 +0x66
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1229
......
swapfile 也不还是仍然会发生,敢问美图的高手,有遇到吗?
func (ec *EpochContext) lookupValidator(now int64) (validator common.Address, err error) {
validator = common.Address{}
offset := now % epochInterval // TODO
if offset%blockInterval != 0 {
return common.Address{}, ErrInvalidMintBlockTime
}
offset /= blockInterval
validators, err := ec.DposContext.GetValidators()
if err != nil {
return common.Address{}, err
}
validatorSize := len(validators)
if validatorSize == 0 {
return common.Address{}, errors.New("failed to lookup validator")
}
offset %= int64(validatorSize)
return validators[offset], nil
}
if i wan to set the epochInterval
value , Is there anything I have to pay attention to?, like set epochInterval = 1000
I understand there is no function to add new validators?
发送交易,总提示
EthQuery - RPC Error - Error: [ethjs-rpc] rpc error with payload {"id":2225701439498,"jsonrpc":"2.0","params":["0xf86e0485079126a50082520894ef505300f7496a15200f8de123d86b359a644d7c884563918244f4000080823a85a05b6eb35f91560f13abfc3e2dfd4b5abeb0335aa0b2e4637d37fc870d1e997827a013461af53de237f63440938a5091788a86adf06faed12ba356ec2533205726ef"],"method":"eth_sendRawTransaction"} [object Object]
我用web3.js发送交易没问题
求助
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.