Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

updated kv_table_test wasm #9568

Closed
wants to merge 1 commit into from
Closed

Conversation

kimjh2005
Copy link
Contributor

@kimjh2005 kimjh2005 commented Oct 13, 2020

Change Description

rebuilt with latest eosio.cdt develop

#1. After the changes from rocksdb_nodeos_integration merged, tests/plugin_test fails with error message:
~/contracts/eos/build$ tests/plugin_test
Random number generator seeded to 1602863110
Running 12 test cases...
3070003 wasm_serialization_error: Serialization Error Processing WASM
wrong type for imported function
{}
plugin_test eos-vm.cpp:106 validate
pending console output:
{"console":""}
plugin_test apply_context.cpp:143 exec_one
transaction_header: {"expiration":"2020-01-01T00:00:09","ref_block_num":7,"ref_block_prefix":657989823,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0}, billed_cpu_time_us: 2000
{"header":{"expiration":"2020-01-01T00:00:09","ref_block_num":7,"ref_block_prefix":657989823,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0},"billed":2000}
plugin_test tester.cpp:608 push_transaction

{"account":"kvtable"}
plugin_test  tester.cpp:934 set_code

rethrow
{}
plugin_test get_kv_table_nodeos_tests.cpp:163 test_method

#2. diff of wat output of both wasm binaries
funciton protype of kv_set, kv_get_data, kv_erase are changed.

19,40c19,41
< (type (;17;) (func (param i64 i32 i32 i32) (result i32)))
< (type (;18;) (func (param i64 i32 i32 i32 i32 i64) (result i64)))
< (type (;19;) (func (param i64 i32 i32) (result i64)))
< (type (;20;) (func (param i64 i64 i64)))
< (type (;21;) (func (param i32 i32 i32 i64) (result i64)))
< (type (;22;) (func (param i32 i32 i32) (result i64)))
< (type (;23;) (func (param f64 i32) (result f64)))
< (type (;24;) (func (param i64 i64) (result i32)))
< (type (;25;) (func (param f64) (result f64)))
< (type (;26;) (func (param i32 i64 i64 i32)))
< (type (;27;) (func (param i32 i32) (result i64)))
< (type (;28;) (func (param i32 i32) (result f32)))
< (type (;29;) (func (param i32 i32) (result f64)))
< (type (;30;) (func (param i64 i32) (result i32)))
< (type (;31;) (func (param i32 i32 i32 i32 i32) (result i32)))
< (type (;32;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32)))
< (type (;33;) (func (param i32 i32 i32 i32) (result i32)))
< (type (;34;) (func (param i32 i32 i32 i32 i32 i32 i32 i32)))
< (type (;35;) (func (param i64 i64)))
< (type (;36;) (func (param i32 i64) (result i32)))
< (type (;37;) (func (param i32 i32 i32 i32 i32 i32 i64)))
< (type (;38;) (func (param i32 i64 i32 i32 i32)))

(type (;17;) (func (param i64 i64 i32 i32 i32) (result i32)))
(type (;18;) (func (param i64 i32 i32 i32) (result i32)))
(type (;19;) (func (param i64 i64 i32 i32 i32 i32 i64) (result i64)))
(type (;20;) (func (param i64 i64 i32 i32) (result i64)))
(type (;21;) (func (param i64 i64 i64)))
(type (;22;) (func (param i32 i32 i32 i64) (result i64)))
(type (;23;) (func (param i32 i32 i32) (result i64)))
(type (;24;) (func (param f64 i32) (result f64)))
(type (;25;) (func (param i64 i64) (result i32)))
(type (;26;) (func (param f64) (result f64)))
(type (;27;) (func (param i32 i64 i64 i32)))
(type (;28;) (func (param i32 i32) (result i64)))
(type (;29;) (func (param i32 i32) (result f32)))
(type (;30;) (func (param i32 i32) (result f64)))
(type (;31;) (func (param i64 i32) (result i32)))
(type (;32;) (func (param i32 i32 i32 i32 i32) (result i32)))
(type (;33;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32)))
(type (;34;) (func (param i32 i32 i32 i32) (result i32)))
(type (;35;) (func (param i32 i32 i32 i32 i32 i32 i32 i32)))
(type (;36;) (func (param i64 i64)))
(type (;37;) (func (param i32 i64) (result i32)))
(type (;38;) (func (param i32 i32 i32 i32 i32 i32 i64)))
(type (;39;) (func (param i32 i64 i32 i32 i32)))
65,67c66,68
< (import "env" "kv_get_data" (func (;24;) (type 1)))
< (import "env" "kv_set" (func (;25;) (type 18)))
< (import "env" "kv_erase" (func (;26;) (type 19)))


(import "env" "kv_get_data" (func (;24;) (type 18)))
(import "env" "kv_set" (func (;25;) (type 19)))
(import "env" "kv_erase" (func (;26;) (type 20)))

Change Type

Select ONE

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@nksanthosh nksanthosh self-requested a review October 16, 2020 14:44
@nksanthosh
Copy link
Contributor

Can you please

  1. update why this was necessary and also
  2. post the wast diff of the original and this wasm

@kimjh2005
Copy link
Contributor Author

The file has been already updated in other PR.

@kimjh2005 kimjh2005 closed this Nov 19, 2020
@heifner heifner deleted the update_kv_table_test_wasm branch November 19, 2020 20:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants