Comments (9)
I have the same issue when I try to push a transaction with a long memo such as:
"{'type': 'buy-limit', 'symbol': 'eosblackteam-black-eos', 'price': '0.01809', 'channel': 'API'}"
This is the error:
Error: {'code': 500, 'message': 'Internal Service Error', 'error': {'code': 3090003, 'name': 'unsatisfied_authorization', 'what': 'Provided keys, permissions, and delays do not satisfy declared authorizations', 'details': [{'message': 'transaction declares authority \'{"actor":"jerryfanelli","permission":"active"}\', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys ["EOS8KDHwCMdtLDTwAj39fdB8c6igsvMYgWDNV7KwYcNEzbta5EXVc"], and a delay max limit of 3888000000 ms', 'file': 'authorization_manager.cpp', 'line_number': 517, 'method': 'check_authorization'}]}}
The provided keys in the error do not match my public key. However, when I push the same transaction with a shorter memo everything goes through without errors.
from eospy.
@jerryfane this should be fixed in 1.1.7. Can you confirm that?
@plimerence I'm taking a look now. Hopefully should have a fix shortly.
from eospy.
I tried to replicate using the following code and was unable to replicate:
#include <eosiolib/eosio.hpp>
using namespace eosio;
CONTRACT pongpingpong : public eosio::contract{
public:
using contract::contract;
ACTION hi(const std::vector<name>& users) {
for(int i = 0; i < users.size(); i++){
print("Hello, ", name{ users[i] }, ", ");
}
}
};
EOSIO_DISPATCH(pongpingpong, (hi))
python:
import eospy.cleos
ce = eospy.cleos.Cleos(url='http://api.pennstation.eosnewyork.io:7001')
payload = [
{
'args': {
"users": ["test1", "test2", "test3", "test4", "test5",
"test11" , "test12", "test13", "test14", "test15",
"test21", "test22", "test23", "test24", "test25",
"test31", "test32", "test33", "test34", "test35",
"test41", "test42", "test43", "test44", "test45",
"test51", "test52", "test53", "test54", "test55",
"test111" , "test112", "test113", "test114", "test115",
"test121", "test122", "test123", "test124", "test125",
"test131", "test132", "test133", "test134", "test135",
"test141", "test142", "test143", "test144", "test145",
"test151", "test152", "test153", "test154", "test155", ]
},
"account": "pongpingpong",
"name": "hi",
"authorization": [{
"actor": "eosio",
"permission": "active",
}],
}
]
#Converting payload to binary
data=ce.abi_json_to_bin(payload[0]['account'],payload[0]['name'],payload[0]['args'])
#Inserting payload binary form as "data" field in original payload
payload[0]['data']=data['binargs']
#Removing the arguments field
payload[0].pop('args')
#final transaction formed
trx = {"actions":[payload[0]]}
# use a string or EOSKey for push_transaction
key = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
# use EOSKey:
# import eospy.keys
# key = eospy.keys.EOSKey('5HuaTWKeGzZhqyzuzFAjjFjPnnnjdgcp562oBSS8Wv1qgDSkR2W')
resp = ce.push_transaction(trx, key, broadcast=True)
print('------------------------------------------------')
print(resp)
print('------------------------------------------------')
and got the following output which looks correct:
------------------------------------------------
{u'processed': {u'scheduled': False, u'action_traces': [{u'account_ram_deltas': [], u'context_free': False, u'console': u'Hello, test1, Hello, test2, Hello, test3, Hello, test4, Hello, test5, Hello, test11, Hello, test12, Hello, test13, Hello, test14, Hello, test15, Hello, test21, Hello, test22, Hello, test23, Hello, test24, Hello, test25, Hello, test31, Hello, test32, Hello, test33, Hello, test34, Hello, test35, Hello, test41, Hello, test42, Hello, test43, Hello, test44, Hello, test45, Hello, test51, Hello, test52, Hello, test53, Hello, test54, Hello, test55, Hello, test111, Hello, test112, Hello, test113, Hello, test114, Hello, test115, Hello, test121, Hello, test122, Hello, test123, Hello, test124, Hello, test125, Hello, test131, Hello, test132, Hello, test133, Hello, test134, Hello, test135, Hello, test141, Hello, test142, Hello, test143, Hello, test144, Hello, test145, Hello, test151, Hello, test152, Hello, test153, Hello, test154, Hello, test155, ', u'inline_traces': [], u'producer_block_id': None, u'receipt': {u'act_digest': u'307c1ad57250105b72ec7593e9080eb8228321a68b9f951d34b25870217de9da', u'recv_sequence': 8, u'code_sequence': 4, u'receiver': u'pongpingpong', u'global_sequence': 213970, u'abi_sequence': 2, u'auth_sequence': [[u'eosio', 213866]]}, u'except': None, u'elapsed': 418, u'block_time': u'2018-12-28T20:06:04.500', u'trx_id': u'938034ad42978559fa50f29318c07400878d23700081f36c1d9c9ddac1d793bb', u'act': {u'account': u'pongpingpong', u'hex_data': u'37000000008090b1ca000000000091b1ca000000008091b1ca000000000092b1ca000000008092b1ca000000008490b1ca000000008890b1ca000000008c90b1ca000000009090b1ca000000009490b1ca000000000491b1ca000000000891b1ca000000000c91b1ca000000001091b1ca000000001491b1ca000000008491b1ca000000008891b1ca000000008c91b1ca000000009091b1ca000000009491b1ca000000000492b1ca000000000892b1ca000000000c92b1ca000000001092b1ca000000001492b1ca000000008492b1ca000000008892b1ca000000008c92b1ca000000009092b1ca000000009492b1ca000000208490b1ca000000408490b1ca000000608490b1ca000000808490b1ca000000a08490b1ca000000208890b1ca000000408890b1ca000000608890b1ca000000808890b1ca000000a08890b1ca000000208c90b1ca000000408c90b1ca000000608c90b1ca000000808c90b1ca000000a08c90b1ca000000209090b1ca000000409090b1ca000000609090b1ca000000809090b1ca000000a09090b1ca000000209490b1ca000000409490b1ca000000609490b1ca000000809490b1ca000000a09490b1ca', u'data': {u'users': [u'test1', u'test2', u'test3', u'test4', u'test5', u'test11', u'test12', u'test13', u'test14', u'test15', u'test21', u'test22', u'test23', u'test24', u'test25', u'test31', u'test32', u'test33', u'test34', u'test35', u'test41', u'test42', u'test43', u'test44', u'test45', u'test51', u'test52', u'test53', u'test54', u'test55', u'test111', u'test112', u'test113', u'test114', u'test115', u'test121', u'test122', u'test123', u'test124', u'test125', u'test131', u'test132', u'test133', u'test134', u'test135', u'test141', u'test142', u'test143', u'test144', u'test145', u'test151', u'test152', u'test153', u'test154', u'test155']}, u'name': u'hi', u'authorization': [{u'actor': u'eosio', u'permission': u'active'}]}, u'block_num': 213643}], u'net_usage': 536, u'producer_block_id': None, u'receipt': {u'status': u'executed', u'net_usage_words': 67, u'cpu_usage_us': 646}, u'except': None, u'elapsed': 646, u'block_time': u'2018-12-28T20:06:04.500', u'block_num': 213643, u'id': u'938034ad42978559fa50f29318c07400878d23700081f36c1d9c9ddac1d793bb'}, u'transaction_id': u'938034ad42978559fa50f29318c07400878d23700081f36c1d9c9ddac1d793bb'}
------------------------------------------------
@plimerence can you create a new virtualenv and install the latest using:
pip install https://github.com/eosnewyork/eospy/archive/v1.1.7.tar.gz
and try again? Thank you.
from eospy.
@jerryfane this should be fixed in 1.1.7. Can you confirm that?
@plimerence I'm taking a look now. Hopefully should have a fix shortly.
I've just tried but I get this error every time I try to push a transaction now..
Traceback (most recent call last):
File "pycleos.py", line 51, in <module>
resp = ce.push_transaction(trx, key, broadcast=True)
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\cleos.py", line 147, in push_transaction
digest = sig_digest(trx.encode(), chain_info['chain_id'])
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 202, in encode
actions = self._encode_buffer(self.actions)
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 85, in _encode_buffer
return EOSBuffer(value).encode()
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 266, in encode
e_item = self.encode(item)
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 262, in encode
return val.encode()
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 109, in encode
data_len = self._encode_buffer(VarUInt(len(self.data)/2))
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 85, in _encode_buffer
return EOSBuffer(value).encode()
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 255, in encode
return self._write_varuint(val)
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 229, in _write_varuint
buf = vuint.encode()
File "C:\Users\Jerry\AppData\Local\Programs\Python\Python36\lib\site-packages\eospy\types.py", line 56, in encode
buf = int((val) & 0x7f)
TypeError: unsupported operand type(s) for &: 'float' and 'int'
I'm using Windows 10, python 3.6.5 and eospy 1.1.7 (just updated)
from eospy.
pip install https://github.com/eosnewyork/eospy/archive/v1.1.7.tar.gz resolve my issue,thanks
from eospy.
Fantastic @plimerence.
@jerryfane I opened another issue for your issue.
from eospy.
pip install https://github.com/eosnewyork/eospy/archive/v1.1.7.tar.gz resolve my issue,thanks
I have tried with the above step but it still fails for me with the below error I am using Python 3.6.8 64 bit on win 32 bit. Any help is really appreciated.
TypeError: unsupported operand type(s) for &: 'float' and 'int'
from eospy.
@khandavally try updating to 1.1.8 per this issue: #20
from eospy.
@khandavally try updating to 1.1.8 per this issue: #20
Thank you for the reply the issue is same with 1.1.8 any specific import statements require after updating to 1.1.8. Please suggest It will be helpful and appreciate it.
from eospy.
Related Issues (20)
- Do you have security problems using abi_json_to_bin in your code? HOT 4
- Internal Service Error, unsatisfied_authorization HOT 2
- Create multisig account HOT 6
- "ImportError: cannot import name ABC" HOT 1
- Set Contract HOT 2
- Deserialize a packed trx offline HOT 5
- Can you please publish [email protected] to pypi? HOT 1
- What are the potential risks using eospy EOSKey for mainnet? HOT 1
- long sign time and eosjs verify HOT 20
- what function is equal to eosjs-ecc's ecc.sign or ecc.signHash HOT 1
- create other eosin.token example HOT 1
- AttributeError in example/push_transaction HOT 6
- Can't sign transaction with key.sign(digest)
- 3.6.5 int/float issue HOT 1
- set_code and set_abi do not work HOT 1
- HTTPConnectionPool(host='api.pennstation.eosnewyork.io', port=7001): Max retries exceeded with url: /v1/chain/abi_json_to_bin (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75c91050>: Failed to establish a new connection: [Errno 111] Connection refused' HOT 2
- Missing changelog HOT 2
- Get children account list HOT 1
- Getting InvalidKeyFile Error HOT 2
- ImportError: cannot import name 'InvalidKeyFile' from 'eospy.exceptions' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eospy.