Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Implementation of Geth node debugging API's (web3-eth-debug). #2678

Merged
merged 17 commits into from
Apr 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
@@ -120,6 +120,33 @@ export SetMaxMessageSizeMethod from './methods/shh/SetMaxMessageSizeMethod';
export SetMinPoWMethod from './methods/shh/SetMinPoWMethod';
export ShhVersionMethod from './methods/shh/ShhVersionMethod';

// Debug
export BackTraceAtMethod from './methods/debug/BackTraceAtMethod';
export BlockProfileMethod from './methods/debug/BlockProfileMethod';
export CpuProfileMethod from './methods/debug/CpuProfileMethod';
export DumpBlockMethod from './methods/debug/DumpBlockMethod';
export GcStatsMethod from './methods/debug/GcStatsMethod';
export GetBlockRlpMethod from './methods/debug/GetBlockRlpMethod';
export GoTraceMethod from './methods/debug/GoTraceMethod';
export MemStatsMethod from './methods/debug/MemStatsMethod';
export SeedHashMethod from './methods/debug/SeedHashMethod';
export SetBlockProfileRateMethod from './methods/debug/SetBlockProfileRateMethod';
export SetHeadMethod from './methods/debug/SetHeadMethod';
export StacksMethod from './methods/debug/StacksMethod';
export StartCpuProfileMethod from './methods/debug/StartCpuProfileMethod';
export StartGoTraceMethod from './methods/debug/StartGoTraceMethod';
export StopCpuProfileMethod from './methods/debug/StopCpuProfileMethod';
export StopGoTraceMethod from './methods/debug/StopGoTraceMethod';
export TraceBlockByHashMethod from './methods/debug/TraceBlockByHashMethod';
export TraceBlockByNumberMethod from './methods/debug/TraceBlockByNumberMethod';
export TraceBlockFromFileMethod from './methods/debug/TraceBlockFromFileMethod';
export TraceBlockMethod from './methods/debug/TraceBlockMethod';
export TraceTransactionMethod from './methods/debug/TraceTransactionMethod';
export VerbosityMethod from './methods/debug/VerbosityMethod';
export VmoduleMethod from './methods/debug/VmoduleMethod';
export WriteBlockProfileMethod from './methods/debug/WriteBlockProfileMethod';
export WriteMemProfileMethod from './methods/debug/WriteMemProfileMethod';

// Txpool
export ContentMethod from './methods/txpool/ContentMethod';
export InspectMethod from './methods/txpool/InspectMethod';
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/BackTraceAtMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file BackTraceAtMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class BackTraceAtMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_backtraceAt', 1, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/BlockProfileMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file BlockProfileMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class BlockProfileMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_blockProfile', 2, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/CpuProfileMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file CpuProfileMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class CpuProfileMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_cpuProfile', 2, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/DumpBlockMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file DumpBlockMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class DumpBlockMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_dumpBlock', 1, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/GcStatsMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file GcStatsMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class GcStatsMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_gcStats', 0, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/GetBlockRlpMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file GetBlockRlpMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class GetBlockRlpMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_getBlockRlp', 1, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/GoTraceMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file GoTraceMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class GoTraceMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_goTrace', 2, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/MemStatsMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file MemStatsMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class MemStatsMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_memStats', 0, utils, formatters, moduleInstance);
}
}
36 changes: 36 additions & 0 deletions packages/web3-core-method/src/methods/debug/SeedHashMethod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file SeedHashMethod.js
* @author Prince Sinha <[email protected]>
* @date 2019
*/

import AbstractMethod from '../../../lib/methods/AbstractMethod';

export default class SeedHashMethod extends AbstractMethod {
/**
* @param {Utils} utils
* @param {Object} formatters
* @param {AbstractWeb3Module} moduleInstance
*
* @constructor
*/
constructor(utils, formatters, moduleInstance) {
super('debug_seedHash', 0, utils, formatters, moduleInstance);
}
}
Loading